-
-
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
[BUG] Crash in Apalache on spec that works in TLC #914
Comments
I haven't been able to come up with a minimal reproduction case so far, or determine exactly where we are in the spec when we hit the error, but I think I've at least manged to determine the gist of the problem. The out of bounds error is getting hit on the second to last line here, when trying to access the We're using typing information to determine which fields to access when building the record equality expression, and the typing info is leading the indexing astray, because we don't have a field corresponding to the type. Via printf debugging, I've been able to see the types of the two records being compared: The left record: Map(balance -> Int, lastUpdate -> Record["balance" -> Int, "seq" -> Int, "type" -> Const], receiverSig -> Bool, senderSig -> Bool, seq -> Int, type -> Const) And the right: Map(balance -> Int, receiverSig -> Bool, senderSig -> Bool, seq -> Int, type -> Const) I'll put together a simple fix, tho I'm not 100% sure it's the correct approach, and we'll want a minimal reproduction case for a regression test before merging. iiuc, given our (unsound) typing rules for records, these are of the same type, so it's not directly related to #915. |
An exploratory fix, to probe the problem, and get feedback.
An exploratory fix, to probe the problem, and get feedback.
An exploratory fix, to probe the problem, and get feedback.
Description
This spec runs correctly on TLC, but crashes on Apalache:
Input specification
https://github.com/jtremback/payment_channel_spec/tree/cc9d55a8c2e5102462be69b14d8832860d2b327e
The command line parameters used to run the tool
apalache-mc check --inv=Inv PaymentChannel.tla
Expected behavior
Spec should run, with failing invariant.
Log files
System information
macOS Big Sur, Apple M1 chip.
It is running the x86 version of OpenJDK through the Rosetta translation layer (I believe): #751 (comment)
The text was updated successfully, but these errors were encountered: