Actually abstracting large nat constants#22254
Draft
proux01 wants to merge 1 commit into
Draft
Conversation
b796c3b to
eda7495
Compare
Contributor
Author
|
@silene you're probably the expert here, do you think we should do this? If yes, I'll complete the PR / do the few overlays and cleanup the adhoc |
Contributor
|
I am not convinced. I understand where this is coming from, but I am not sure there is a proper solution. It might be better to not fix it, so that users encounter hard failures as early as possible, rather than to hide the issue and delay it further and further. It is important that users understand that there is an inherent cost to using unary integers. |
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.
Instead of parsing large nat constants as
Nat.of_uint <decimal encoding>and just leaving the term unevaluated and ready to blow up at next computation or unification, we hide the definition ofNat.of_uintbehind a module type, thus preventing any accidental blowup. The actual definition can still be recovered by a simple rewriting.Updated documented syntax by runningmake doc_gram_rsts.Overlays (to be merged before the current PR)