Professional Documents
Culture Documents
Simon Robillard
Autumn 2019
1 / 24
Specification of Systems with Temporal Logic
Introduction
Section 1
Introduction
2 / 24
Specification of Systems with Temporal Logic
Introduction
Before We Begin
3 / 24
Specification of Systems with Temporal Logic
Introduction
5 / 24
Specification of Systems with Temporal Logic
Introduction
7 / 24
Specification of Systems with Temporal Logic
Introduction
Boolean Abstractions
I we use Boolean variables for our labels: for a set of variables
P, states are labelled with elements of 2P
I if p ∈ L(σ), then p is true in state σ, otherwise ¬p is true
I in theory, we can use a countably infinite set of variables
I in practice, you may need a coarse abstraction
Example: two processes in a critical section, P = {crit1 , crit2 }
{crit1 }
{} {crit1 , crit2 }
{crit2 } 8 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Section 2
9 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Syntax of LTL
10 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Intuitive semantics
Atomic proposition: p
p
...
Next state: Xϕ
...
Until: ϕ U ψ ψ
...
ϕ
11 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Interpretations
w2
12 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Definition of semantics
w |= p ≡ p ∈ w0
w |= Xϕ ≡ w 1 |= ϕ
w |= ϕ U ψ ≡ there exists i ≥ 0 such that:
• w i |= ψ
• for all 0 ≤ j < i, w j |= ϕ
w |= ¬ϕ ≡ w |= ϕ is not true
w |= ϕ ∨ ψ ≡ w |= ϕ or w |= ψ
13 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Derived Operators
Derived Boolean operators:
> ≡ p ∨ ¬p
⊥ ≡ ¬>
ϕ∧ψ ≡ ¬(¬ϕ ∨ ¬ψ)
ϕ =⇒ ψ ≡ ¬ϕ ∨ ψ
ϕ ⇐⇒ ψ ≡ (ϕ =⇒ ψ) ∧ (ψ =⇒ ϕ)
Derived modalities
Fϕ ≡ >Uϕ
Gϕ ≡ ¬(F¬ϕ)
ϕRψ ≡ ¬(¬ϕ U ¬ψ)
ϕWψ ≡ (ϕ U ψ) ∨ Gϕ
ϕMψ ≡ (ϕ R ψ) ∧ Fϕ
14 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Exercise 1
15 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Exercise 1
15 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
16 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
A Note on Negation
w 6|= ϕ ≡ w |= ¬ϕ
{p} {} {p}
17 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Equivalence Rules
Negation Distributivity
Idempotency Unrolling
G ≡ GGϕ Gϕ ≡ ϕ ∧ XGϕ
F ≡ FFϕ Fϕ ≡ ϕ ∨ XFϕ
ϕ U ψ ≡ ϕ U (ϕ U ψ) ϕ U ψ ≡ ψ ∨ (ϕ ∧ X(ϕ U ψ))
18 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Exercise 2
19 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
20 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Exercise 3
21 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
G¬(crit1 ∧ crit2 )
¬access W authenticated
I Liveness (request):
G(request =⇒ Fgrant)
22 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Liveness vs Safety
23 / 24
Specification of Systems with Temporal Logic
Linear Temporal Logic: Syntax and Semantics
Exercise 4
24 / 24