Avoid useless errors in generated files #21
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
By trying the tool on a real-world contract, there is a bunch of small silly syntax/name errors that get in the way of figuring out what actually needs fixing. This PR addresses that by solving or avoiding a number of those problems, so the resulting model only has errors for things that are not trivial to fix.
Unfortunately, our test suite doesn't cover a lot of those. I need to introduce something like a "Super Contract" to our fixtures, so I can add cases for all of this things to it. This work was just a 1-day spike, and I don't really have time to set that up at this time.
Some of the fixes are:
<missing-type>
in quotes or use another value supported by Quint syntax so these don't result in syntax errors (that mess up Quint error reporting many times)[, foo, bar]
by filtering out empty strings intranslate_list
and others, as we use empty string for untranslated cases (i.e. Lifetimes)height
toBlockInfo
since many contracts use thatTraitObject
,MultiIndex
andIndexedMap
. Also stop translating definitions that are only about indexes as they are completely useless in the model.action
)(Closes Rename quint keywords #11)