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.
In Pulse, we create free variables to open terms (mainly to check abs terms) and then expect to be able to call F* on those opened terms containing free variables created in Pulse (to normalize, to check equivalence, and to check typing). For this to work, F* must not create variables that clash with Pulse's. (Otherwise the names can clash and we get bugs like #234.)
This PR changes the
freshfunction inPulse.Typing.Envto use the F* gensym.The typing of
freshis a bit questionable now. It promises to return a variable not present in the Pulse environment but that will only be true if all variables were created withfresh. But I suspect that the reflection API requires changes to address the name clash issue (e.g. equiv tokens probably allow you to derive false from a name clash) and this fix here should be workable until we have a proper solution across the board.The
freshfunction also has theDveffect now since it is non-deterministic; this propagates quite a bit (since typing judgements contain free variables) but it doesn't change much since those functions are used from tactics.Fixes #234.