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

[BUG] Out of order assignments #157

Closed
konnov opened this issue Jul 6, 2020 · 0 comments · Fixed by #343
Closed

[BUG] Out of order assignments #157

konnov opened this issue Jul 6, 2020 · 0 comments · Fixed by #343
Assignees
Labels
Milestone

Comments

@konnov
Copy link
Collaborator

konnov commented Jul 6, 2020

Something has changed in the behavior of the assignment finder and type checker between 0.6.0 and unstable.

Now the following test fails:

cd $HOME/devl/apalache-tests/performance/bcastByz
$HOME/devl/apalache/bin/apalache-mc check --length=1 \
  --init=IndInv_Unforg_NoBcast --inv=IndInv_Unforg_NoBcast --cinit=ConstInit4 APAbcastByz.tla

Apalache fails with the message:

Step 0, level 0: checking if 1 transition(s) are enabled and violate the invariant I@15:55:37.782
APAbcastByz.tla:182:6-182:36, '(...), type error: Failed to find type of variable sent' E@15:55:37.798
APAbcastByz.tla:182:6-182:36, =(...), type error: Expected a Boolean, found: None E@15:55:37.803
APAbcastByz.tla:183:34-183:50, '(...), type error: Failed to find type of variable sent' E@15:55:37.808
APAbcastByz.tla:183:15-183:54, [S -> T](...), type error: Expected a finite set, found: None E@15:55:37.811
The outcome is: Error                                             I@15:55:37.843
Checker has found an error                                        I@15:55:37.843
It took me 0 days  0 hours  0 min  2 sec                          I@15:55:37.846
Total time: 2.121 sec                                             I@15:55:37.846
EXITCODE: OK

The reason for that is that sent' is assigned a value after it is used:

Init$0 ==
  (BMC!Skolem((\E t_18$1 \in [Corr -> { "V0", "V1", "SE", "AC" }]: pc' <- t_18$1))
      /\ Corr \in SUBSET (Corr \union Faulty)
      /\ Faulty \in SUBSET (Corr \union Faulty)
      /\ BMC!Skolem((\E t_1b$1 \in SUBSET ({
        <<t_19$1, t_1a$1>>:
          t_19$1 \in Corr \union Faulty,
          t_1a$1 \in {"ECHO"}
      }):
        sent' = t_1b$1))
      /\ BMC!Skolem((\E t_1e$1 \in [Corr
        -> SUBSET (sent'
          \union { <<t_1c$1, t_1d$1>>: t_1c$1 \in Faulty, t_1d$1 \in {"ECHO"} })]:
        rcvd' <- t_1e$1)))
    /\ sent' <- ({} <: {<<Int, STRING>>})
    /\ pc' = [ i$1 \in Corr |-> "V0" ]

We have been discussing for some time that the assignment finder should change the order of subformulas so that the assignments always come first. For some reason, the assignment finder always picks the assignment under the existential,
even if we swap the subformulas.

@konnov konnov added the bug label Jul 6, 2020
@konnov konnov added this to the v0.7-dev-integration milestone Jul 6, 2020
@konnov konnov modified the milestones: v0.7-dev-integration, v0.7.1-known-issues Jul 22, 2020
@konnov konnov removed their assignment Aug 24, 2020
@konnov konnov added the FAF label Dec 11, 2020
@konnov konnov modified the milestones: v0.7.2-known-issues, backlog2020 Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants