Skip to content
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

discard-disable=false seems buggy #2158

Closed
nano-o opened this issue Sep 7, 2022 · 4 comments · Fixed by #2161
Closed

discard-disable=false seems buggy #2158

nano-o opened this issue Sep 7, 2022 · 4 comments · Fixed by #2161
Assignees
Labels

Comments

@nano-o
Copy link
Contributor

nano-o commented Sep 7, 2022

Hello,
I'm using the latest docker image and getting strange results with --discard-disabled=false.
Consider the following spec:

-------------------------------- MODULE Test --------------------------------
Init == TRUE
Next == TRUE
Inv == FALSE
=============================================================================

The command $APALACHE_HOME/script/run-docker.sh check --inv=Inv --discard-disabled=false Test.tla reports no errors.
Am I misunderstanding something or is this a bug?

@konnov
Copy link
Collaborator

konnov commented Sep 8, 2022

Looks like a bug

@thpani
Copy link
Collaborator

thpani commented Sep 9, 2022

Hi @nano-o, thanks for filing this!
Could you tell us if this is currently blocking your work?
We will have limited cycles to investigate during next week, but we'll get to it ASAP!

@thpani thpani self-assigned this Sep 9, 2022
@thpani
Copy link
Collaborator

thpani commented Sep 9, 2022

With --discard-disabled=false, checkInvariantsForPreparedTransition is not called at step 0 (isNext == false):
https://github.com/informalsystems/apalache/blob/44bd91c60e207f44a8ee4804bb9bdcd9639ab70f/tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/SeqModelChecker.scala#L280-L282

Also, mayChangeAssertion is true at step 0 but false on steps >= 1.

--discard-disabled=true is unaffected because it goes into a different code path here:
https://github.com/informalsystems/apalache/blob/44bd91c60e207f44a8ee4804bb9bdcd9639ab70f/tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/SeqModelChecker.scala#L226

shonfeder pushed a commit that referenced this issue Sep 9, 2022
shonfeder pushed a commit that referenced this issue Sep 9, 2022
…iantMode.BeforeJoin` (#2161)

* Remove redundant guard

* Update changelog

* Add regression test for #2158

#2158

Co-authored-by: Shon Feder <[email protected]>
@thpani
Copy link
Collaborator

thpani commented Sep 9, 2022

@nano-o Should be fixed and included in the next release. Thanks again for filing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants