-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix handling of constant operators #2389
Conversation
tla-io/src/main/scala/at/forsyte/apalache/tla/imp/OpApplTranslator.scala
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #2389 +/- ##
==========================================
- Coverage 78.35% 78.34% -0.02%
==========================================
Files 441 441
Lines 15387 15388 +1
Branches 2464 2439 -25
==========================================
- Hits 12057 12056 -1
- Misses 3330 3332 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
That's a neat solution! I thought it would require more effort to translate constant operators, though it has been a while since I have look at It looks good to me. The only thing is that |
Also: |
How does one enable TRACE-level logging when trying to debug things? The only documented thing I found was the Regardless, I didn't really intend to keep those log messages in. I just pushed the PR late at night as soon as I had fixed my problem lol |
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.
Hi @BGR360, thanks a lot for the excellent contribution!
If we can address the open comments, I think this is good to be merged!
Ben, would you like to see this across the finish line?
tla-io/src/main/scala/at/forsyte/apalache/tla/imp/OpApplTranslator.scala
Show resolved
Hide resolved
tla-io/src/main/scala/at/forsyte/apalache/tla/imp/OpApplTranslator.scala
Outdated
Show resolved
Hide resolved
Logback configuration is programmatic in But I think it's fine to remove these log messages before merging, as you suggested. |
Thanks for the review @thpani !
I'm happy to, but it'll be on my own time, whenever I get to it. Perhaps this weekend. If you're offering to take it off my hands and push it through yourself, be my guest!! Though I think this PR can't be called complete until we test whether it actually functions as expected (that you can substitute the higher-order operator when instantiating a spec and it works properly). Currently I've only tested the typechecking. |
Let's do it! This is not super urgent on our side, and we're happy to see external contributions 😃
Ah yes, I actually did a full instantiation of your integration test to make sure it passes model-checking. We should include something similar in this PR! |
ae58fd7
to
fadf782
Compare
fadf782
to
5622ec9
Compare
This is to avoid confusion, we already supported 0th-order `CONSTANT`s / their instantiation with 0th-order operators before.
@thpani What do you mean by this? Something like this? CONSTANTS
\* @type: (Int, (Int) => Bool) => Bool;
MapInt(_, MapFn(_)) |
Looks great! Thanks a lot @BGR360 and @thpani!
I vaguely recall that 2nd order operators are not supported in TLA+. |
Yes, exactly! |
They're defined in Specifying Systems, but idk about tool support. |
Fixes #2388
Closes #709
If this approach seems good to folks, I can clean it up and make this a not-so-draft PR. This fixes the issue for the two specs I posted in the original issue, but I have no idea if it's a really robust fix or not.
make fmt-fix
(or had formatting run automatically on all files edited)./unreleased/
for any new functionality