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

*From*: Stephan Merz <stephan.merz@xxxxxxxxx>*Date*: Wed, 27 Feb 2019 11:24:52 +0100*References*: <23d91440-9ef9-44a5-91f6-daf7277a8e23@googlegroups.com> <C8D9AEFE-22E4-46FB-857B-996203FF6924@gmail.com> <2a987563-c9a4-4f26-bffd-6ef58fae99a3@googlegroups.com>

Hi,
Don't think too procedurally: TLA+ is a logic, and an action is a constraint on pairs of states. There is no notion of temporal order ("before" or "after") inside an atomic transition. In your original specification, you used a state variable for storing the value popped from the queue. If you want to get rid of that state variable, you'll typically introduce a bound (logical) variable using an existential quantifier (as in my first suggestion) or a LET (as in the second one). In contrast, the current content of the queue is part of the system configuration and is therefore represented by a state variable q. Transitions involving the Pop operation must respect the constraint that the value of q after the transition (q') equals the tail of the value before the transition (q), which procedurally corresponds to an assignment q := Tail(q). 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 post to this group, send email to tlaplus@xxxxxxxxxxxxxxxx. Visit this group at https://groups.google.com/group/tlaplus. For more options, visit https://groups.google.com/d/optout. |

**References**:**[tlaplus] [Noob] Avoiding unnecessary variables***From:*Michael Chonewicz

**Re: [tlaplus] [Noob] Avoiding unnecessary variables***From:*Stephan Merz

**Re: [tlaplus] [Noob] Avoiding unnecessary variables***From:*Michael Chonewicz

- Prev by Date:
**Re: [tlaplus] [Noob] Avoiding unnecessary variables** - Next by Date:
**[tlaplus] Re: add fairness properties to a specification with PlusCal INSTANCEs** - Previous by thread:
**Re: [tlaplus] [Noob] Avoiding unnecessary variables** - Next by thread:
**[tlaplus] Re: [Noob] Avoiding unnecessary variables** - Index(es):