--
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+u...@googlegroups.com.
To post to this group, send email to tla...@googlegroups.com.
Visit this group at https://groups.google.com/group/tlaplus.
For more options, visit https://groups.google.com/d/optout.
your claim that all of the three specifications admit the same single behavior is true only because you ignore stuttering...
You can force the equivalence of the specifications by adding the conjunct⬦(t > 100)and this observation shows that liveness conditions may sometimes constrain the safety part of the specifications. Such specifications are known as "not machine-closed" [1], and are hard to reason about. (You'd have to prove the invariant ☐(x=t), but this requires temporal logic reasoning since you must appeal to the liveness condition to show that the execution would be blocked when t hits 100.)
The standard form of TLA+ specifications where liveness conditions are conjunctions of (weak or strong) fairness conditions on sub-actions of the specification (essentially, disjuncts of the next-state relation) ensures that specifications are machine closed, and all safety properties can be proved just from the initial condition and the next-state relation.
Ah, so does machine closure in addition to stuttering invariance place constraints on internal nondeterminism? My cursory reading of machine closure made me believe that in order for it to be violated, the liveness requirement would need to explicitly contain "safety subformulas", but I guess this is an example where this is not the case.
The standard form of TLA+ specifications where liveness conditions are conjunctions of (weak or strong) fairness conditions on sub-actions of the specification (essentially, disjuncts of the next-state relation) ensures that specifications are machine closed, and all safety properties can be proved just from the initial condition and the next-state relation.
Does that guarantee, then, that formulas with different nondeterminism would admit different behaviors and could be distinguished?
The idea of machine closure is that the state machine executing the safety part of the specification does not need "prescience" in order to make those choices that will be compatible with the liveness condition: any choice allowed by the next-state relation can be completed to an infinite behavior satisfying the overall specification, using a fair scheduler.
The only problem is (I think) that such formulas cannot themselves be detected within the logic, correct?
Hi Ron,
I have two comments.
First, the main reason that specifications that aren't machine closed
are usually bad has nothing to do with provability. It's because they
are usually hard to understand. Moreover, if they are supposed to
describe an algorithm, they are almost certainly wrong. There are
rare cases in which a non-machine closed spec is the best way to
describe what a system is supposed to do (rather than how it does it).
The simplest spec I know of sequential consistency is not machine
closed.
Second, you seem to forget that a TLA+ specification is a mathematical
formula. Mathematics cannot express anything about the syntax in
which a mathematical formula is written. You can model a language
like TLA+ in TLA+ and make all sorts of statements about the TLA+
formulas--for example that the meaning of a certain sequence seq of
characters is the formula F, and that seq is the shortest sequence of
characters whose meeaning is F. However, that's a statement about a
sequences of characters, not about a mathematical formula.
Thus, if Wiles's proof is correct, then the following two formulas A
and B are completely equivalent
A == q = 42
B ==
(\A x, y, z, n \in Nat \ {0} : (n>2) => (x^n + y^n # z^n))
=> (q = 42)
Thus, P(A) = P(B) for any mathematical (or TLA+) operator P. A tool
like TLC may be able to evaluate one and not the other, but that's because
tools operate on strings of characters representing formulas, not on
formulas. The correctness condition that TLC is supposed to satisfy
is that if it can evaluate both P(A) and P(B), then it gets the same
value for both . Mathematics gives no meaning to the concept of evaluation
of a formula.
If you want to distinguish between two TLA+ formulas that are
mathematically equivalent (which I believe is what you mean by
equivalent with respect to behaviors), then you're looking for a tool
not for a logic. We already have one such tool: the TLATeX
pretty-printer. Also, a lot of the output that TLC produces depends
on the particular way a specification is written--even if TLC
produces the same yes or no answer of whether the spec satisfies the
properties that TLC is checking. Perhaps there are others tools that
can tell us something useful about a specification that depends on how
it's written.
Leslie
I haven't thought it through, but it seems to me that without stuttering invariance, machine specifications would still be safety properties (i.e., closed), but safety properties would be able to specify undesired "prescience". Stuttering pushes future events indefinitely ahead, into the realm of liveness properties, which makes prescience a machine-closure-breaking liveness property.
So far, I've seen invariance under stuttering justified as pragmatic or obvious, but this is an additional justification, it seems.
Ron
For example, the specification
x = 0 /\ [](x' = x+1)
implies the liveness property
\A n \in Nat : <>(x > n)
so the specification is not a safety property.
A small comment: outside TLA, a formula of the form `Init /\ [] SomeAction` can "block later", because some step other than the first few violates the formula.
Stuttering allows `Init /\ [][ SomeAction ]_v` (outside TLA: `Init /\ []( SomeAction \/ (v = v') )`)
to reach just before the state where it would have blocked above, and then remain there, stuttering forever (the `v = v'` term).
This infinite stuttering may still be undesired, and a liveness property can require that it doesn't happen.
So far, I've seen invariance under stuttering justified as pragmatic or obvious, but this is an additional justification, it seems.
Stuttering invariance is also useful for comparing specifications at different levels of abstraction
On the other hand, it could imply a liveness propertythat doesn't mention steps (of the form `[]<> P` for `P` a state predicate).
Do you have an example of `Init /\ [][A]_v` implying `[]<> P` but not `[]P`?
ASSUME:
1. VARIABLE v (* If there are more, define `v` as a tuple of all mentioned variables. *)
2. STATE Init(v), P(v)
3. ACTION A(v) (* The expression `v'` can appear within the formula `A(v)`. *)
4. \EE v: Init(v)
5. No variable symbols other than `v` occur in `Init(v), P(v), A(v)`
6. |= ( Init(v) /\ [][ A(v) ]_v ) => ( []<>P(v) /\ ~ []P(v) )
PROVE: FALSE (* contradiction *)
I think that the comment about an example that does not imply `[]P` was a good observation that
suggests the following about the element of liveness
(which seems to be the main point about the clock "ticking" in the original comment):
a raw TLA safety property (e.g., `Init /\ []A`) can require liveness properties over nonstuttering steps,
whereas a TLA safety property (e.g., `Init /\ [][A]_v`) cannot.