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

Make SimpleEventually proof a bit less simple. #135

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lemmy
Copy link
Member

@lemmy lemmy commented Jun 6, 2024

Two actions, A and B, allow for the discussion of the non-distributiveness of (weak) fairness.

Happy to remove Equiv again.

@lemmy lemmy added enhancement A new feature, an improvement, or other addition. documentation Adding or editing any form of documentation (documentation files, code comments, website pages, etc) labels Jun 6, 2024
@lemmy lemmy force-pushed the mku-LessSimpleEventually branch from 75e3084 to af4e5fb Compare June 6, 2024 00:11
@lemmy lemmy force-pushed the mku-LessSimpleEventually branch from af4e5fb to 0897ce9 Compare June 6, 2024 00:53
Copy link
Contributor

@muenchnerkindl muenchnerkindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See individual comments. In particular, this uncovers a big problem with the old SMT backend.

examples/SimpleEventually.tla Outdated Show resolved Hide resolved
examples/SimpleEventually.tla Show resolved Hide resolved
@lemmy lemmy force-pushed the mku-LessSimpleEventually branch from 0897ce9 to bb72f61 Compare June 7, 2024 20:50
lemmy added 4 commits June 7, 2024 13:50
Signed-off-by: Markus Alexander Kuppe <[email protected]>
Signed-off-by: Markus Alexander Kuppe <[email protected]>
Signed-off-by: Markus Alexander Kuppe <[email protected]>
@lemmy lemmy force-pushed the mku-LessSimpleEventually branch from bb72f61 to c64d952 Compare June 7, 2024 20:50
Signed-off-by: Markus Alexander Kuppe <[email protected]>
@lemmy lemmy force-pushed the mku-LessSimpleEventually branch from 86cc9b3 to 8a80823 Compare June 7, 2024 21:26
@lemmy
Copy link
Member Author

lemmy commented Jun 7, 2024

See individual comments. In particular, this uncovers a big problem with the old SMT backend.

Please take another look at this PR. I will open an issue for the Equiv proof.

@kape1395
Copy link
Collaborator

kape1395 commented Jun 8, 2024

It fails (line 63) for me with the tlapm from the main branch. Maybe another branch is assumed here?

@lemmy
Copy link
Member Author

lemmy commented Jun 9, 2024

Confirmed to be rejected by HEAD@main on a Codespace (Linux):

@lemmy ➜ /workspaces/tlapm/examples (mku-LessSimpleEventually) $ tlapm --version
102637f-dirty
@lemmy ➜ /workspaces/tlapm/examples (mku-LessSimpleEventually) $ tlapm SimpleEventually.tla 
(* created new ".tlacache/TLAPS.tlaps/TLAPS.thy" *)
(* fingerprints written in ".tlacache/TLAPS.tlaps/fingerprints" *)
File "/usr/local/lib/tlapm/stdlib/TLAPS.tla", line 1, character 1 to line 362, character 77:
[INFO]: All 0 obligation proved.
Zenon error: exhausted search space without finding a proof
(* created new ".tlacache/SimpleEventually.tlaps/SimpleEventually.thy" *)
(* fingerprints written in ".tlacache/SimpleEventually.tlaps/fingerprints" *)
File "./SimpleEventually.tla", line 63, characters 3-4:
[ERROR]: Could not prove or check:
           ASSUME NEW VARIABLE x,
                  NEW VARIABLE y,
                  NEW VARIABLE flip,
                  vars == <<x, y, flip>>,
                  A == /\ x = FALSE
                       /\ x' = TRUE
                       /\ UNCHANGED <<y, flip>>,
                  B ==
                    /\ y = FALSE
                    /\ y' = TRUE
                    /\ flip' = (~flip)
                    /\ UNCHANGED x,
                  C ==
                    /\ y = FALSE
                    /\ y' = TRUE
                    /\ flip' = (~flip)
                    /\ UNCHANGED x,
                  Next == A \/ B \/ C,
                  ExpandENABLED 
           PROVE  TypeOK /\ ~x = TRUE => ENABLED <<Next>>_vars
File "./SimpleEventually.tla", line 1, character 1 to line 73, character 80:
[ERROR]: 1/18 obligations failed.
There were backend errors processing module `"SimpleEventually"`.
 tlapm ending abnormally with (Failure "backend errors: there are unproved obligations")
Raised at file "stdlib.ml", line 29, characters 17-33
Called from file "src/tlapm_lib.ml", line 435, characters 12-77
Called from file "src/tlapm_lib.ml", line 543, characters 23-43
Called from file "list.ml", line 121, characters 24-34
Called from file "src/tlapm_lib.ml", line 546, characters 13-40
Called from file "src/tlapm_lib.ml", line 558, characters 8-33

Accepted by https://github.com/tlaplus/tlapm/releases/tag/202210041448 on macOS:

markus@avocado [11:49:01] [~/src/TLA/_tlaps/tlapm] [mku-LessSimpleEventually]
-> % tlapm --version
1.5.0

markus@avocado [11:49:06] [~/src/TLA/_tlaps/tlapm] [mku-LessSimpleEventually]
-> % tlapm examples/SimpleEventually.tla
(* created new ".tlacache/TLAPS.tlaps/TLAPS.thy" *)
(* fingerprints written in ".tlacache/TLAPS.tlaps/fingerprints" *)
File "/usr/local/lib/tlaps/TLAPS.tla", line 1, character 1 to line 362, character 77:
[INFO]: All 0 obligation proved.
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.

** Unexpanded symbols: ---

** Unexpanded symbols: ---

** Unexpanded symbols: STATE_TypeOK_

** Unexpanded symbols: ---

** Unexpanded symbols: ---

** Unexpanded symbols: ---

(* created new ".tlacache/SimpleEventually.tlaps/SimpleEventually.thy" *)
(* fingerprints written in ".tlacache/SimpleEventually.tlaps/fingerprints" *)
File "./examples/SimpleEventually.tla", line 1, character 1 to line 73, character 80:
[INFO]: All 18 obligations proved.

@lemmy
Copy link
Member Author

lemmy commented Jun 9, 2024

Stephan's proposed proof already rejected by HEAD@main:

@lemmy ➜ /workspaces/tlapm/examples (mku-LessSimpleEventually) $ tlapm SimpleEventually.tla 
(* created new ".tlacache/TLAPS.tlaps/TLAPS.thy" *)
(* fingerprints written in ".tlacache/TLAPS.tlaps/fingerprints" *)
File "/usr/local/lib/tlapm/stdlib/TLAPS.tla", line 1, character 1 to line 362, character 77:
[INFO]: All 0 obligation proved.
(* loading fingerprints in ".tlacache/SimpleEventually.tlaps/fingerprints" *)
Zenon error: exhausted search space without finding a proof
(* created new ".tlacache/SimpleEventually.tlaps/SimpleEventually.thy" *)
(* fingerprints written in ".tlacache/SimpleEventually.tlaps/fingerprints" *)
File "./SimpleEventually.tla", line 54, characters 3-4:
[ERROR]: Could not prove or check:
           ASSUME NEW VARIABLE x,
                  NEW VARIABLE y,
                  vars == <<x, y>>,
                  A == /\ x = FALSE
                       /\ x' = TRUE
                       /\ UNCHANGED y,
                  B == /\ y = FALSE
                       /\ y' = TRUE
                       /\ UNCHANGED x,
                  Next == A \/ B,
                  ExpandENABLED 
           PROVE  TypeOK /\ ~x = TRUE => ENABLED <<Next>>_vars
File "./SimpleEventually.tla", line 1, character 1 to line 64, character 80:
[ERROR]: 1/18 obligations failed.
There were backend errors processing module `"SimpleEventually"`.
 tlapm ending abnormally with (Failure "backend errors: there are unproved obligations")
Raised at file "stdlib.ml", line 29, characters 17-33
Called from file "src/tlapm_lib.ml", line 435, characters 12-77
Called from file "src/tlapm_lib.ml", line 543, characters 23-43
Called from file "list.ml", line 121, characters 24-34
Called from file "src/tlapm_lib.ml", line 546, characters 13-40
Called from file "src/tlapm_lib.ml", line 558, characters 8-33

@lemmy
Copy link
Member Author

lemmy commented Jun 9, 2024

TLAPS starts to reject Stephan's proposed proof as well as my extension with the introduction of the new SMT encoding in 3f08478. 581ebd8 is the last commit with which TLAPS accepts the proof. :-(

Related: #139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Adding or editing any form of documentation (documentation files, code comments, website pages, etc) enhancement A new feature, an improvement, or other addition.
Development

Successfully merging this pull request may close these issues.

3 participants