Professional Documents
Culture Documents
TL Slides PDF
TL Slides PDF
VL Formal Models
Martina Seidl
SS 2022
Temporal Logic
1
Kripke Structures
classical semantic model for temporal logic
only states, no actions
LTS with exactly one action (|Σ| = 1)
additionally annotation of states with atomic propositions
has its roots in modal logics
2
Kripke Structures
classical semantic model for temporal logic
only states, no actions
LTS with exactly one action (|Σ| = 1)
additionally annotation of states with atomic propositions
has its roots in modal logics
set of states S
initial states I ⊆ S with I , ∅
a total transition relation T ⊆ S × S (T total iff ∀s ∈ S ∃t ∈ S : (s, t) ∈ T )
labelling/marking/annotation L : S → P(A).
p, q̄ p̄, q̄ p̄, q
B A C
p, q
3
LTS as Kripke Structure
A=Σ SK = SL × Σ IK = IL × Σ L : (s, a) 7→ a
4
2-Bit Counter as Kripke Structure
a
D Q b
D Q
S = B2
I = B2
T = {((0, 0), (0, 1)),
we assume that circuits abstracted to netlists
((0, 1), (1, 0)), . . .}
do not have an initial state
a ∈ L(s) iff s ∈ {(0, 1), (1, 1)}
b ∈ L(s) iff s ∈ {(1, 0), (1, 1)}
5
2-Bit Counter as Kripke Structure
a
D Q b
D Q
S = B2
I = B2
T = {((0, 0), (0, 1)),
we assume that circuits abstracted to netlists
((0, 1), (1, 0)), . . .}
do not have an initial state
a ∈ L(s) iff s ∈ {(0, 1), (1, 1)}
00 01 10 11
b ∈ L(s) iff s ∈ {(1, 0), (1, 1)}
5
2-Bit Counter with Reset as Kripke Structure
b
D Q
a
D Q
S = B3
r I = B3
6
2-Bit Counter with Reset as Kripke Structure
b
D Q
a
D Q
S = B3
r I = B3
6
2-Bit Counter with Reset as Kripke Structure
b
D Q
a
D Q
S = B3
r I = B3
6
2-Bit Counter with Reset as Kripke Structure
b
D Q
a
D Q
S = B3
r I = B3
6
2-Bit Counter with Reset as Kripke Structure
b
D Q
a
D Q
S = B3
r I = B3
6
Finite and Infinite Traces
Let K = (S , I, T, L) be a Kripke structure.
Definition A Trace π of K is a finite or infinite sequence of states
π = (s0 , s1 , . . .)
such that for each pair (si , si+1 ) in π there is (si , si+1 ) ∈ T . Therefore there exists a path in K with
s0 → s1 → s2 → . . .
7
Finite and Infinite Traces
Let K = (S , I, T, L) be a Kripke structure.
Definition A Trace π of K is a finite or infinite sequence of states
π = (s0 , s1 , . . .)
such that for each pair (si , si+1 ) in π there is (si , si+1 ) ∈ T . Therefore there exists a path in K with
s0 → s1 → s2 → . . .
|π| is the length of π, e.g. |π| = 2 for π = (s0 , s1 , s2 ), and |π| = ∞ for infinite traces.
π(i) is the i’th state si of π for i ≤ |π|
πi = (si , si+1 , . . .) denotes the suffix of π starting with the i’th state si for i ≤ |π|
Note: if |π| = ∞ then |πi | = ∞ for all i ∈ N
inifinite repititions are indicated by ω, e.g., for (a, b, c, a, b, c, a, b, c, . . .) we write (a, b, c)ω
7
Linear Temporal Logic (LTL): Syntax
LTL extends propositional logic by temporal operators next X, globally G, finally F, until U.
Definition Let A be a set of propositional variables. Then
8
Linear Temporal Logic (LTL): Syntax
LTL extends propositional logic by temporal operators next X, globally G, finally F, until U.
Definition Let A be a set of propositional variables. Then
8
Linear Temporal Logic (LTL): Semantics
π |= p iff p ∈ L(π(0))
π |= ¬g iff π 6|= g
π |= g ∧ h iff π |= g and π |= h
π |= Xg iff π1 |= g
π |= Fg iff πi |= g for at least one i
π |= Gg iff πi |= g for all i
π |= g U h iff exists i with πi |= h and π j |= g for all j < i