Professional Documents
Culture Documents
mc2022 Lec3 Slides
mc2022 Lec3 Slides
Model Checking
Lecture #3: Linear-Time Properties
[Baier & Katoen, Chapter 3]
Overview
1 Recapitulation: Traces
2 Linear-Time Properties
3 Safety Properties
4 Liveness Properties
Overview
1 Recapitulation: Traces
2 Linear-Time Properties
3 Safety Properties
4 Liveness Properties
Traces
1
This is an assumption commonly used throughout this lecture.
Joost-Pieter Katoen and Tim Quatmann Lecture 5/45
Safety and Liveness Properties Recapitulation: Traces
Traces
Definition: Traces
Let TS = (S, Act, , I, AP, L) be transition system without terminal states.
Z The trace of execution
fl = s0 –1
s1 –2
s2 –3
...
Traces
Definition: Traces
Let TS = (S, Act, , I, AP, L) be transition system without terminal states.
Z The trace of execution
fl = s0 –1
s1 –2
s2 –3
...
Traces
Definition: Traces
Let TS = (S, Act, , I, AP, L) be transition system without terminal states.
Z The trace of execution
fl = s0 –1
s1 –2
s2 –3
...
Example
Consider the mutex transition system. Let AP = { crit1 , crit2 }.
The trace of the path:
= Ön1 , n2 , y = 1ã Öw1 , n2 , y = 1ã Öc1 , n2 , y = 0ã
Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ — “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “—“ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ —““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “œ
fi
L=o L=o L={ crit1 }
Ön1 , n2 , y = 1ã Ön1 , w2 , y = 1ã Ön1 , c2 , y = 0ã
Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ — “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “—“ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ —““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “œ
...
L=o L=o L={ crit2 }
Example
Consider the mutex transition system. Let AP = { crit1 , crit2 }.
The trace of the path:
= Ön1 , n2 , y = 1ã Öw1 , n2 , y = 1ã Öc1 , n2 , y = 0ã
Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ — “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “—“ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ —““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “œ
fi
L=o L=o L={ crit1 }
Ön1 , n2 , y = 1ã Ön1 , w2 , y = 1ã Ön1 , c2 , y = 0ã
Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ — “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “—“ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ —““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “œ
...
L=o L=o L={ crit2 }
is:
Example
Consider the mutex transition system. Let AP = { crit1 , crit2 }.
The trace of the path:
= Ön1 , n2 , y = 1ã Öw1 , n2 , y = 1ã Öc1 , n2 , y = 0ã
Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ — “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “—“ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ —““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “œ
fi
L=o L=o L={ crit1 }
Ön1 , n2 , y = 1ã Ön1 , w2 , y = 1ã Ön1 , c2 , y = 0ã
Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ — “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “—“ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ œ Õ““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ —““ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ “œ
...
L=o L=o L={ crit2 }
is:
Regular Expressions
Z Let be an alphabet, i.e. countable set of symbols, with A "
Regular Expressions
Z Let be an alphabet, i.e. countable set of symbols, with A "
Regular Expressions
Z Let be an alphabet, i.e. countable set of symbols, with A "
ò
Z The semantics of regular expression E is a language L(E) N :
Regular Expressions
Z Let be an alphabet, i.e. countable set of symbols, with A "
ò
Z The semantics of regular expression E is a language L(E) N :
= { w1 w2 w3 . . . ∂ ºi ' 0. wi " L }.
ò
where for L N , we have L
Ê
= { w1 w2 w3 . . . ∂ ºi ' 0. wi " L }.
ò
where for L N , we have L
Ê
Overview
1 Recapitulation: Traces
2 Linear-Time Properties
3 Safety Properties
4 Liveness Properties
Linear-Time Properties
Definition: Linear-Time Property
A linear-time property (LT property) over AP is a subset of 2 ⌥ .
AP Ê
Linear-Time Properties
Definition: Linear-Time Property
A linear-time property (LT property) over AP is a subset of 2 ⌥ .
AP Ê
Linear-Time Properties
Definition: Linear-Time Property
A linear-time property (LT property) over AP is a subset of 2 ⌥ .
AP Ê
Z Formalization as LT property
Pmutex = set of infinite words A0 A1 A2 . . .
with { crit1 , crit2 } N
/ Ai for all 0 & i
Z Formalization as LT property
Pmutex = set of infinite words A0 A1 A2 . . .
with { crit1 , crit2 } N
/ Ai for all 0 & i
Z Formalization as LT property
Pmutex = set of infinite words A0 A1 A2 . . .
with { crit1 , crit2 } N
/ Ai for all 0 & i
Z Formalization as LT-property
¨
For TS and TS be transition systems (over AP) without terminal states:
Traces(TS) N Traces(TS )
¨
if and only if
¨
for any LT property P: TS Ï P implies TS Ï P.
¨
For TS and TS be transition systems (over AP) without terminal states:
Traces(TS) N Traces(TS )
¨
if and only if
¨
for any LT property P: TS Ï P implies TS Ï P.
“ ”:
¨
For TS and TS be transition systems (over AP) without terminal states:
Traces(TS) N Traces(TS )
¨
if and only if
¨
for any LT property P: TS Ï P implies TS Ï P.
“⌦”:
¨
For TS and TS be transition systems (over AP) without terminal states:
Traces(TS) N Traces(TS )
¨
if and only if
¨
for any LT property P: TS Ï P implies TS Ï P.
Corollary
Traces(TS) = Traces(TS ) iff TS and TS satisfy the same LT properties.
¨ ¨
Overview
1 Recapitulation: Traces
2 Linear-Time Properties
3 Safety Properties
4 Liveness Properties
Invariants
Z LT property Einv over AP is an invariant if it has the form:
Invariants
Z LT property Einv over AP is an invariant if it has the form:
Z Note that
Invariants
Z LT property Einv over AP is an invariant if it has the form:
Z Note that
Z all initial states fulfil and all transitions in the reachable fragment
of TS preserve
Example Invariants
Safety Properties
Z Safety properties may impose requirements on finite path fragments
Z and cannot be verified by considering the reachable states individually
Safety Properties
Z Safety properties may impose requirements on finite path fragments
Z and cannot be verified by considering the reachable states individually
Safety Properties
Z Safety properties may impose requirements on finite path fragments
Z and cannot be verified by considering the reachable states individually
Safety Properties
Z Safety properties may impose requirements on finite path fragments
Z and cannot be verified by considering the reachable states individually
Safety Properties
Safety Properties
Examples
Finite Prefixes
Z For trace ‡ " 2AP ⌥Ê , let pref(‡) be the set of finite prefixes of ‡:
Finite Prefixes
Z For trace ‡ " 2AP ⌥Ê , let pref(‡) be the set of finite prefixes of ‡:
pref(P) = ⌫ pref(‡)
‡"P
Finite Prefixes
Z For trace ‡ " 2AP ⌥Ê , let pref(‡) be the set of finite prefixes of ‡:
pref(P) = ⌫ pref(‡)
‡"P
Closure
Z cl(P) contains the set of infinite traces whose finite prefixes are also
prefixes of P, or equivalently
“ ”:
“⌦”:
if and only if
¨
for any safety property Esafe ⇥ TS Ï Esafe TS Ï Esafe .
if and only if
¨
for any safety property Esafe ⇥ TS Ï Esafe TS Ï Esafe .
if and only if
¨
TS and TS satisfy the same safety properties.
¨
For TS without terminal states and finite TS :
2
Transition systems in which each state has finitely many direct successors.
Joost-Pieter Katoen and Tim Quatmann Lecture 29/45
Safety and Liveness Properties Safety Properties
¨
For TS without terminal states and finite TS :
¨
this does not hold for infinite TS (cf. next slide)
¨ 2
but also holds for image-finite TS .
2
Transition systems in which each state has finitely many direct successors.
Joost-Pieter Katoen and Tim Quatmann Lecture 29/45
Safety and Liveness Properties Safety Properties
Overview
1 Recapitulation: Traces
2 Linear-Time Properties
3 Safety Properties
4 Liveness Properties
Why Liveness?
Why Liveness?
Why Liveness?
Why Liveness?
Liveness Properties
Definition: Liveness property
LT property Elive over AP is a liveness property whenever
pref(Elive ) = 2 ⌥ .
AP ò
Liveness Properties
Definition: Liveness property
LT property Elive over AP is a liveness property whenever
pref(Elive ) = 2 ⌥ .
AP ò
Liveness Properties
Definition: Liveness property
LT property Elive over AP is a liveness property whenever
pref(Elive ) = 2 ⌥ .
AP ò
Overview
1 Recapitulation: Traces
2 Linear-Time Properties
3 Safety Properties
4 Liveness Properties
Z But:
¨
for any LT property P there exists an equivalent LT property P
which is a conjunction of a safety and a liveness property
Z But:
¨
for any LT property P there exists an equivalent LT property P
which is a conjunction of a safety and a liveness property
Alpern-Schneider Characterisation
Decomposition Theorem
Decomposition theorem for LT properties
For any LT property P over AP there exists a safety property Esafe and a
liveness property Elive (both over AP) such that:
P = Esafe = Elive .
Decomposition Theorem
Decomposition theorem for LT properties
For any LT property P over AP there exists a safety property Esafe and a
liveness property Elive (both over AP) such that:
P = Esafe = Elive .
Proof
Let P be an LT Property over AP.
Show:
1) P = cl(P) = P < 2 ⌥ \ cl(P)⌥⌥
AP Ê
Proof
Let P be an LT Property over AP.
Show: P = cl(P) = P < 2 ⌥ \ cl(P)⌥⌥
AP Ê
Proof
Let P be an LT Property over AP.
Show: cl(P) is a safety property
Proof
Let P be an LT Property over AP.
Show: P < 2 ⌥ \ cl(P)⌥⌥ is a liveness property
AP Ê
"Sharpest" Decomposition
"Sharpest" Decomposition
Classification of LT Properties
Summary
Z LT properties are finite sets of infinite words over 2AP (= traces)
Z Each trace refuting a safety property has a finite prefix causing this
Z invariants are safety properties with bad prefix (¬ )
ò
Next Lecture