Professional Documents
Culture Documents
Methods
SE Semester-V
LECTURE-5: Linear Temporal Logics-II
1 Objectives
2 Reference Books
3 Review
5 System Modelling
Course Objective
Course Contents
Finite models and model-checking - Modeling using finite mod-
els, reachability algorithms, Specification logics - LTL on finite
words; automata theoretic model checking algorithms, the SMV
tool, Description Logic, Dataflow analysis of programs with-
out recursion, Handling recursion: pushdown models, reacha-
bility (using games!), dataflow analysis, Symbolic methods for
reachability: Boolean Decision Diagrams, operations on BDDs,
the tools SMV, CTL and CTL model-checking symbolically;
mu-calculus, Software verification: The Floyd-Hoare method
for verifying code, Invariant verification using automatic theo-
rem provers, Satisfiability solvers (SAT solvers); bounded model
checking and testing. Abstraction based model checking, miscel-
laneous topics, Decidable logics and overview of available theo-
rem provers, Predicate abstraction and abstract interpretation,
Handling heaps, Concurrency.
Today’s Objective 5
Today’s Objective
1 Examples of LTL
2 LTL Operators Properties
3 LTL Model Checking Concept
Review
Semantics for ♢ and □ 19
σ |= ♢φ if f ∃j ⩾ 0 : σ[j..] |= φ
σ |= □φ if f ∀j ⩾ 0 : σ[j..] |= φ
Semantics of Negation
Semantics of Negation
T S ̸|= φ ̸≡ T S |= ¬φ
T S |= ¬φ ⇒ T S ̸|= φ
Note that
Semantics of Negation
π1 |= φ and π2 |= ¬φ
Verification Languages 23
verification languages
“♢terminated′′
“(□♢sent) → (♢delivered)′′
Temporal Logic to Communication Protocols 30
Actions:
The transition relation can be expressed as a temporal logic formula.
Actions which can be performed at any time moment if only
conditions on the left implication side are fulfilled are described here.
Example
□(do send → ⃝(sent ∧ ¬ready to send))
Sending the packet via the channel.
Example
G(red ⇒ ¬Xgreen)
Fgreen
G(red ⇒ Fgreen)
4 After being red, the light goes yellow and then eventually
becomes green
Example
□((¬passport ∨ ¬ticket) ⇒ ⃝¬boardf light)
□(requested ⇒ ♢received)
□(received ⇒ ⃝processed)
□(processed ⇒ □ ⃝ done)
Concurrent Reactive Systems 34
Modeling Systems
We need to construct a Formal Specification of the system which
abstract from irrelevant details.
State: Snapshot of the system that captures the values of the
variables at a particular point in time.
System Transition: How the state of the system evolves as the
result of some action.
Computation: Infinite sequence of states along the different
transitions.
Modeling Systems with Kripke Structures 36
An Example
Transition System
Semaphore-Based Mutual Exclusion Algorithm III 43
Safety Property
□(¬crit1 ∨ ¬crit2 )
This formula expresses that always (□) at least one of the two
processes is not in its critical section (¬criti ).
Semaphore-Based Mutual Exclusion Algorithm V 45
Liveness Property
(□♢crit1 ) ∧ (□♢crit2 )
Semaphore-Based Mutual Exclusion Algorithm VI 46
Starvation Freedom
1 The Starvation Freedom
• Every waiting process will eventually enter its critical
section
2 That can-by using the additional proposition waiti -be
formulated as follows:
such that
NO
The Trace 56
The Trace
NO
The Trace
φ{wait2 }{wait1 , wait2 }{crit1 , wait2 }
{wait2 }{wait1 , wait2 }{crit1 , wait2 } . . .
is a possible trace of the transition system but not in Pnostrave
Transition System T Ssem 57
Let ¬p¬q
def
π1 = {s1 }ω s1
def
π2 = {s2 }ω
pq
M ̸|= Gp, in fact: s0
1 π1 |̸ = Gp
2 π2 |= Gp
M ̸|= ¬Gp, in fact: p¬q
1 π1 |̸ = ¬Gp s2
2 π2 |= ¬Gp
Syntactic Properties of LTL Operators 62
φ1 ∨ φ2 ⇔ ¬(¬φ1 ∧ ¬φ2 )
...
Fφ1 ⇔ ⊤Uφ1
Gφ1 ⇔ ⊥ Rφ1
Fφ1 ⇔ ¬G¬φ1
Gφ1 ⇔ ¬F¬φ1
¬Xφ1 ⇔ X¬φ1
φ1 Rφ2 ⇔ ¬(¬φ1 U¬φ2 )
Syntactic Properties of LTL Operators 63
φ1 ∨ φ2 ⇔ ¬(¬φ1 ∧ ¬φ2 )
...
Fφ1 ⇔ ⊤Uφ1
Gφ1 ⇔ ⊥ Rφ1
Fφ1 ⇔ ¬G¬φ1
Gφ1 ⇔ ¬F¬φ1
¬Xφ1 ⇔ X¬φ1
φ1 Rφ2 ⇔ ¬(¬φ1 U¬φ2 )
NOTE
LTL can be defined in terms of ∧, ¬, X, U only
Equivalence of LTL Formulae 64
φ1 ≡ φ2
if
W ords(φ1 ) = W ords(φ2 )
Equivalence of LTL Formulae I 65
Duality Law:
¬⃝φ ≡ ⃝¬φ
¬♢φ ≡ □¬φ
¬□φ ≡ ♢¬φ
Equivalence of LTL Formulae II 66
Idempotency Law:
♢♢φ ≡ ♢φ
□□φ ≡ □φ
φU (φU ψ) ≡ φU ψ
(φU ψ)U ψ ≡ φU ψ
Equivalence of LTL Formulae III 67
Absorption Law:
♢□♢φ ≡ □♢φ
□♢□φ ≡ ♢□φ
Equivalence of LTL Formulae IV 68
Expansion Law:
φU ψ ≡ φ ∨ (φ ∧ ⃝(φU ψ))
♢ψ ≡ ψ ∨ ⃝♢ψ
□ψ ≡ ψ ∧ ⃝□ψ
Equivalence of LTL Formulae VI 70
Distributive Law:
F(a ∧ b) ̸≡ Fa ∧ Fb
and
G(a ∨ b) ̸≡ Ga ∨ Gb
Example 72
Example
Precedence Orders
1 The unary operators bind stronger than the binary ones.
2 ¬ and ⃝ bind equally strong.
3 The temporal operator U takes precedence over ∧, ∨, and
→.
4 Operator U is right-associative
Example
φ1 Uφ2 Uφ3 stands for φ1 U(φ2 Uφ3 ).
Precedence Orders II 74