-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for compilation to TLA+ #2891
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2891 +/- ##
==========================================
- Coverage 78.89% 78.89% -0.01%
==========================================
Files 467 467
Lines 15966 15975 +9
Branches 2573 2556 -17
==========================================
+ Hits 12597 12604 +7
- Misses 3369 3371 +2 ☔ View full report in Codecov by Sentry. |
@@ -209,7 +209,7 @@ class PrettyWriter( | |||
val sign = PrettyWriter.bindingOps(op) | |||
val doc = | |||
group( | |||
group(text(sign) <> space <> text(x.toString) <> space <> | |||
group(text(sign) <> space <> text(sanatizeID(x.toString)) <> space <> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should it be sanitize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hello
This includes 4 fixes for the Quint/JSON -> TLA+ compilation.
slice
was incorrectly making an increment on the last argument. From the Quint manual:However, this is not valid TLA+ and won't be parsed by SANY. To avoid touching Apalache internals, and as I can't really invest in forking the translation process right now, I'm simply fixing this with a regex replacement before printing. Not a great solution, but super low-risk as this only affects what is printed by the compilation command, which is only used by Quint.
::
separators in our names, which is not parseable by SANY. They were coming from exists/forall expressions, so I'm making sure we also sanitize the names on those.make fmt-fix
(or had formatting run automatically on all files edited)./unreleased/
for any new functionality