BCS2213 - Introduction To TLA
BCS2213 - Introduction To TLA
Software Engineering
Formal methods.
Introduction to the Temporal Logic
of Actions
Vitaliy Mezhuyev
History and motivation
== Is defined to equal
□ [] Box
\in In
≠ #, /= Not equal
<> << >> Tuple
Introduction to TLA
For n = 2
(2 > 3) => (2 > 1) is true.
For n = 0
(0 > 3) => (0 > 1) is true.
Precedence
In algebraic formulas, * has higher precedence (binds
more tightly) than +, so x + y*z means x + ( y*z ).
∈ \in Member of
∪ \union Union
∩ \intersect Intersection
⊆ \subseteq Subset
\ \ Set difference
Example,
f == [x \in N |-> x+1]
N is domain of the function f
f[x] = x+1
Action Operators
v' prime operator (only variables are able to be primed)
UNCHANGED v v'=v
UNCHANGED <<v_1, v_2>> v_1'=v_1 /\ v_2'=v_2
Conditions
IF P THEN e_1 ELSE e_2
CASE P_1 -> e_1 [] ... [] P_n ->e_n
CASE P_1 -> e_1 [] ... [] P_n ->e_n [] OTHER -> e
LET d_1 == e_1 ... d_n == e_n IN e
Thank you for your attention!
Please ask questions
Questions for control
1. What is TLA and why TLA is needed?
2. For what kind of systems TLA is good?
3. What is the basic math inside TLA?
4. Explain the implication operation.
5. What is tautology?
6. How we can specify behavior of a system?
7. What is a state of a system?
8. What is a step?
9. What is initial predicate in specification?
10.What is next-state predicate?
11.How to link the previous and the next state of a system?
12.What is an action?
13.What is the meaning of the operator □ (box)?
14.Explain the formula HCini /\ □ HCnxt
15.What is stuttering steps? Why do we need specify it?
16.Explain formula HCini /\ □[HCnxt]hr