Handle quint quantified variables #2873
Merged
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.
Hello
This PR fixes a problem related to informalsystems/quint#1398. Imagine the following type:
Quint generates two constructors for this type:
In those types,
a
is a quantified type variable, and the type scheme in the quint map, for both constructors, will havea
in thetypeVariables
set, which represents quantified type variables in that type scheme.So far, we've been ignoring those fields in apalache. But, since
a
has the same type name here between the two definitions, this is a problem. Our type converter will generate the sameTlaType1
type number for both of them, and this will result in type issues inside Apalache.In this PR, I add a simple fix to remove quantified variables names from the map that provides same
TlaType1
type numbers to the same names, everytime we finish converting anOpDef
. This is enough, since quint variables are only quantified inOpDef
s.I'm also reverting our original attempt to address related issues, as that was not the appropriate fix, and after informalsystems/quint#1409 it doens't have any effect.
make fmt-fix
(or had formatting run automatically on all files edited)./unreleased/
for any new functionality