Professional Documents
Culture Documents
mc2022 Lec4 Slides
mc2022 Lec4 Slides
Model Checking
Verifying Regular Properties
[Baier & Katoen, Chapter 4.1+4.2]
Overview
4 ω-Regular Properties
5 Outlook
Overview
4 ω-Regular Properties
5 Outlook
Topic
Safety Properties
Definition: Safety Property
ω
LT property Esafe over AP is a safety property if for all σ ∈ (2 ) \ Esafe :
AP
ω
Esafe ∩ {σ ∈ (2 ) ∣ σ̂ is a prefix of σ } = ∅.
′ AP ′
Safety Properties
Definition: Safety Property
ω
LT property Esafe over AP is a safety property if for all σ ∈ (2 ) \ Esafe :
AP
ω
Esafe ∩ {σ ∈ (2 ) ∣ σ̂ is a prefix of σ } = ∅.
′ AP ′
Examples
Or, equivalently:
Safety property Esafe is regular if there exists
recognizing BadPref(Esafe )
AP
a finite automaton over the alphabet 2
Overview
4 ω-Regular Properties
5 Outlook
Finite Automata
▶ Run q0 q1 . . . qn is accepting if qn ∈ F
▶ Run q0 q1 . . . qn is accepting if qn ∈ F
▶ Run q0 q1 . . . qn is accepting if qn ∈ F
Or, equivalently:
Or, equivalently:
Or, equivalently:
Or, equivalently:
Or, equivalently:
Or, equivalently:
Sets as Formulas
Let NFA A = (Q, Σ, δ, Q0 , F ) over the alphabet Σ = 2 .
AP
Sets as Formulas
Let NFA A = (Q, Σ, δ, Q0 , F ) over the alphabet Σ = 2 .
AP
Sets as Formulas
Let NFA A = (Q, Σ, δ, Q0 , F ) over the alphabet Σ = 2 .
AP
Sets as Formulas
Let NFA A = (Q, Σ, δ, Q0 , F ) over the alphabet Σ = 2 .
AP
▶ p −−false
−−−−→ q stands for ∅
Sets as Formulas
Let NFA A = (Q, Σ, δ, Q0 , F ) over the alphabet Σ = 2 .
AP
▶ p −−false
−−−−→ q stands for ∅
▶ p −−true
−−−→ q stands for { p −−A→ q ∣ ∀A ⊆ AP }
Joost-Pieter Katoen and Tim Quatmann Lecture #4 13/44
Verifying Regular Properties Refresher: Finite Automata
Examples
Details
Example
Overview
4 ω-Regular Properties
5 Outlook
Peterson’s Algorithm
P1 loop forever
⋮ (* non-critical actions *)
⟨b1 ∶= true; x ∶= 2⟩; (* request *)
wait until (x = 1 ∨ ¬b2 )
do critical section od
b1 ∶= false (* release *)
⋮ (* non-critical actions *)
end loop
Does only one thread at a time has access to the bank account?
Problem Statement
Let
1. Esafe be a regular safety property over AP
Synchronous Product
TS ⊗ A = (S , Act, → , I , AP , L )
′ ′ ′ ′ ′
where
)
▶ I ′ = { ⟨s0 , q⟩ ∣ s0 ∈ I ∧ ∃q0 ∈ Q0 . q0 −−L(s
−−0−→ q }.
Example
Theorem
Let TS over AP, Esafe a safety property such that L(A) = BadPref(Esafe )
for some NFA A. Then:
Proof
Example
Counterexamples
/ F and qn+1 ∈ F
q1 , . . . , qn ∈ ⇒ trace(s0 s1 . . . sn ) ∈ L(A).
ÍÒÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ñ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ï
bad prefix for Esafe
Overview
4 ω-Regular Properties
5 Outlook
If a thread wants to update the account, does it ever get the opportunity to do so?
Joost-Pieter Katoen and Tim Quatmann Lecture #4 35/44
Verifying Regular Properties ω-Regular Properties
Traces(TSPet ) ∩ Lω (Elive ) = ∅?
ÍÒÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò ÑÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò ÒÏ
infinite traces
Traces(TSPet ) ∩ Lω (Elive ) = ∅?
ÍÒÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò ÑÒ Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò Ò ÒÏ
infinite traces
(A + B) .B
∗ ω
▶ language of all words with finitely many As:
(A + B) .B
∗ ω
▶ language of all words with finitely many As:
ω
▶ the empty language ∅
ω-Regular Properties
Definition: ω-regular language
The set L of infinite words over the alphabet Σ is ω-regular if L = Lω (G)
for some ω-regular expression G over Σ.
ω-Regular Properties
Definition: ω-regular language
The set L of infinite words over the alphabet Σ is ω-regular if L = Lω (G)
for some ω-regular expression G over Σ.
ω-Regular Properties
Definition: ω-regular language
The set L of infinite words over the alphabet Σ is ω-regular if L = Lω (G)
for some ω-regular expression G over Σ.
▶ Let Σ = { a, b } Then:
▶ Infinitely often a:
ω
((∅ + { b }) .({ a } + { a, b }))
∗
▶ eventually a:
AP ∗ AP ω
(2 ) .({ a } + { a, b }). (2 )
Shorthand Notation
Overview
4 ω-Regular Properties
5 Outlook
Theorem
Let TS over AP, E an ω-regular property and NBA A with Lω (A) = E .
Then:
Proof.
Next lecture.
Next Lecture