Skip to content

Conversation

@gebner
Copy link
Contributor

@gebner gebner commented Oct 10, 2024

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 fresh function in Pulse.Typing.Env to use the F* gensym.

The typing of fresh is 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 with fresh. 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 fresh function also has the Dv effect 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.

@gebner
Copy link
Contributor Author

gebner commented Oct 10, 2024

Aseem is happy with the change and it's blocking me, so I'm merging this.

@gebner gebner merged commit efae029 into main Oct 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotated function types with more than 3 parameters fail in non-interactive mode

2 participants