Skip to content

Collect boundary constraints during conversion checking - #5999

Closed
plt-amy wants to merge 6 commits into
agda:masterfrom
plt-amy:aliao/boundary-unification-problems
Closed

plt-amy wants to merge 6 commits into
agda:masterfrom
plt-amy:aliao/boundary-unification-problems

Conversation

@plt-amy

@plt-amy plt-amy commented Jul 28, 2022 •

Copy link
Copy Markdown
Contributor

Fixes/implements #5997. The design is as described in that issue:

  • The [Closure IPBoundary] is now associated with the interaction point, rather than the clause
  • Each IPBoundary stores an IntMap of (ArgName, Bool) --- the ArgName is used for printing the constraints, the Bool is the actual endpoint
  • Constraints that fit a specific pattern (see the issue and/or the code comments) are collected as boundary constraints.

Open questions (It's late):

  • How does this handle reduction? Since boundary constraints are collected during conversion checking, it stands to reason that they'll all be normalised. Not good!
  • Like mentioned in the code comments, my scoping is wonky. I need to think this through tomorrow.

TODO:

  • Update the give interaction command to check the boundary conditions by themselves before waking up constraints blocked on the interaction meta. We can use this to improve the error message when a term has the wrong boundary. E.g. instead of just saying w != x we could say term [blah] was expected to evaluate to W at face (i = i0) but its actual value is X
  • Add a test to make sure "top-level" boundaries still work
  • Add a test to make sure boundaries work in Path-typed arguments
  • Add a test to make sure boundaries work in hcomp
  • Add a test to make sure boundaries work in Glue
  • Add a test where the boundary consists of redices

@plt-amy
plt-amy marked this pull request as draft July 28, 2022 00:17
@plt-amy

plt-amy commented Jul 28, 2022

Copy link
Copy Markdown
Contributor Author

Really tiny demonstration of boundaries for nested goals in VS Code. Nothing about the editor integration changed so it should work on emacs, too, I just don't use emacs 😉

@ice1000 ice1000 added cubical Cubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transp conversion Conversion checking for terms, types; Subtyping; Size solving constraints Constraints (postponed type checking problems, postponed unification problems, instance constraints) labels Aug 2, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

constraints Constraints (postponed type checking problems, postponed unification problems, instance constraints) conversion Conversion checking for terms, types; Subtyping; Size solving cubical Cubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants