[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*From*: Stephan Merz <stephan.merz@xxxxxxxxx>*Date*: Thu, 18 Mar 2021 15:14:18 +0100*Ironport-hdrordr*: A9a23:mTpAP6CFSGINA6vlHei7sceALOonbusQ8zAX/mp2TgFYddHdqtC2kJ0guSPcpRQwfDUbmd6GMLSdWn+0z/VIyKQYILvKZmbbkUSlIIxo5YHhhx3McheRysdzzqFlGpIeNPTUDUJmyeb2iTPZL/8EwMObtJyun/vU1X13TQpnApsQjDtRLwaADwlLQxNbDoAyD5qW6o5/oSC8EE5nDPiTIlkgc6z9q8bQlJTgCCR2YiIPzAWVlzun5PrbHnGjr3MjegpVzb0v/GTDmQCR3NTFj9iBxhXR13De4v1t8bPc4+BOHcmdzvUSQw+c7DqAXphrWLGJoVkOzd2H1VBCqrPxiiZlFd56r1nWenixqRvrxhOI6kdW11bSjXuRgX7uuqXCNUoHIvsEoYpYdxvfr2ApuMh10KxNtljpzKZ/PFfllCT559+NfRRrmk2oyEBS69I7vjhEUYBbaLI5l/1jwH9o*References*: <8fa93e13-20e7-48fa-8225-75bb5744e93an@googlegroups.com> <CADaysi+_zsOrWKjizeb2V3Gv5Tp236LbC7JeTFAvWh3p2zRn2g@mail.gmail.com> <CAN3aEu5vuv=VLFOWwq+Ffxj2_d0Mb5tDQXRhuLRb_-_mJbe2Dw@mail.gmail.com>

If you omit "big' = big" in the definition of the action FillSmall, the value of the variable big is completely unconstrained in the successor state (it could be unchanged but also equal 42, {}, "foo" or whatever value). It is almost impossible to reason about a specification that includes such an action, and TLC will produce an error. Leslie's point is to emphasize the fact that a TLA action x' = some_expression is different from the assignment x = some_expression in an imperative programming language such as C.
-- Looking at the "first_number" example, it is easy to see (or check with TLC) that the invariant pc = "middle" => i \in 0 .. 1000 holds of that specification, so adding "i \in 0 .. 1000" as a pre-condition to action Add is redundant. And in fact, the specification also verifies the invariant pc = "start" => i = 0 so the conjunct "i=0" in the Pick action is redundant as well. Of course, there is nothing logically wrong with adding redundant constraints. Stephan
You received this message because you are subscribed to the Google Groups "tlaplus" group. To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx. To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/CC9BC36E-5700-458E-951E-01DA052120B7%40gmail.com. |

**References**:**[tlaplus] Specifying all states on SimpleProgram from the TLA Course***From:*Pablo Fernandez

**Re: [tlaplus] Specifying all states on SimpleProgram from the TLA Course***From:*Imran Meah

**Re: [tlaplus] Specifying all states on SimpleProgram from the TLA Course***From:*pablo fernandez

- Prev by Date:
**Re: [tlaplus] Specifying all states on SimpleProgram from the TLA Course** - Next by Date:
**Re: [tlaplus] Specifying all states on SimpleProgram from the TLA Course** - Previous by thread:
**Re: [tlaplus] Specifying all states on SimpleProgram from the TLA Course** - Next by thread:
**Re: [tlaplus] Specifying all states on SimpleProgram from the TLA Course** - Index(es):