Fix termination and performance issues with DecEq#7840
Draft
ana-pantilie wants to merge 4 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needs #7832
Termination fix
Removes the need for the
TERMINATINGpragma in thedecEqdefinitions, Agda can now prove that they terminate.Performance fix
The matching on
reflinsidedecEqtriggered normalization of terms when typechecking, which affected performance significantly, to the point of using more than 128GB of memory for the example @basetunnel and I worked on.The example is an equality proof of the first AST to itself, from
agda-certificates/cardano_constitution_Cardano_Constitution_Validator_Data_Sorted-b48sy0.agda-cert. This was the certificate produced fordefaultConstitutionCodefromcardano-constitution/src/Cardano/Constitution/Validator/Data/Sorted.hs.For this particular example comparing
cons was the most expensive, so avoiding matching onreflin the recursive call todecEq-⟦ t ⟧tag x x₁insidedecEq-TmCondid the trick.