Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

TLA+, pluscal: variable is in a set

In TLA+ I can write

x' \in {TRUE, FALSE}

and it will mean, that from this point Model Checker should study two branches, where my variable got different values.
Is there a way to write the same thing in Pluscal?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

First of all, that’s not correct TLA+: you want to write either x' \in {TRUE, FALSE} or (more preferably) \E y \in {TRUE, FALSE}: x' = y.

For PlusCal, you would write

\* P-syntax
with y \in {TRUE, FALSE} do \* or {
  x := y;
end with \* or }

\* C-syntax
with y \in {TRUE, FALSE} {
  x := y;
}

In all cases you can replace {TRUE, FALSE} with the builtin BOOLEAN.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading