Formal Methods:
Module I: Automated Reasoning
Ch. 05: Automata-Theoretic LTL Reasoning
Roberto Sebastiani and Stefano Tonetta
DISI, Università di Trento, Italy – roberto.sebastiani@unitn.it URL: http://disi.unitn.it/rseba/DIDATTICA/fm2021/
Teaching assistant:Giuseppe Spallitta– giuseppe.spallitta@unitn.it
M.S. in Computer Science, Mathematics, & Artificial Intelligence Systems Academic year 2020-2021
last update: Tuesday 20thApril, 2021, 12:48
Copyright notice: some material (text, figures) displayed in these slides is courtesy of R. Alur, M. Benerecetti, A. Cimatti, M. Di Natale, P. Pandya, M. Pistore, M. Roveri, C. Tinelli, and S.Tonetta, who detain its copyright. Some exampes displayed in these slides are taken from [Clarke, Grunberg & Peled, “Model Checking”, MIT Press], and their copyright is
detained by the authors. All the other material is copyrighted by Roberto Sebastiani. Every commercial use of this material is strictly forbidden by the copyright laws without the authorization of the authors. No copy of these slides can be
displayed in public without containing this copyright notice.
Outline
1
Büchi Automata
2
The Automata-Theoretic Approach to LTL Reasoning General Ideas
Language-Emptiness Checking of Büchi Automata From Kripke Models to Büchi Automata
From LTL Formulas to Büchi Automata Complexity
3
Exercises
Outline
1
Büchi Automata
2
The Automata-Theoretic Approach to LTL Reasoning General Ideas
Language-Emptiness Checking of Büchi Automata From Kripke Models to Büchi Automata
From LTL Formulas to Büchi Automata Complexity
3
Exercises
Infinite Word Languages
Modeling infinite computations of reactive systems Given an Alphabet Σ (e.g. Σ
def= {a, b})
An ω-word α over Σ is an infinite sequence a
0, a
1, a
2. . ..
Formally, α : N → Σ.
The set of all infinite words is denoted by Σ
ω.
A ω-language L is collection of ω-words, i.e. L ⊆ Σ
ω. Example: All words over {a, b} with infinitely many a’s.
Notation:
omega words α, β, γ ∈ Σ
ω.
omega-languages L, L
1⊆ Σ
ωFor u ∈ Σ
+, let u
ω= u.u.u . . .
Infinite Word Languages
Modeling infinite computations of reactive systems Given an Alphabet Σ (e.g. Σ
def= {a, b})
An ω-word α over Σ is an infinite sequence a
0, a
1, a
2. . ..
Formally, α : N → Σ.
The set of all infinite words is denoted by Σ
ω.
A ω-language L is collection of ω-words, i.e. L ⊆ Σ
ω. Example: All words over {a, b} with infinitely many a’s.
Notation:
omega words α, β, γ ∈ Σ
ω.
omega-languages L, L
1⊆ Σ
ωFor u ∈ Σ
+, let u
ω= u.u.u . . .
Infinite Word Languages
Modeling infinite computations of reactive systems Given an Alphabet Σ (e.g. Σ
def= {a, b})
An ω-word α over Σ is an infinite sequence a
0, a
1, a
2. . ..
Formally, α : N → Σ.
The set of all infinite words is denoted by Σ
ω.
A ω-language L is collection of ω-words, i.e. L ⊆ Σ
ω. Example: All words over {a, b} with infinitely many a’s.
Notation:
omega words α, β, γ ∈ Σ
ω.
omega-languages L, L
1⊆ Σ
ωFor u ∈ Σ
+, let u
ω= u.u.u . . .
Infinite Word Languages
Modeling infinite computations of reactive systems Given an Alphabet Σ (e.g. Σ
def= {a, b})
An ω-word α over Σ is an infinite sequence a
0, a
1, a
2. . ..
Formally, α : N → Σ.
The set of all infinite words is denoted by Σ
ω.
A ω-language L is collection of ω-words, i.e. L ⊆ Σ
ω. Example: All words over {a, b} with infinitely many a’s.
Notation:
omega words α, β, γ ∈ Σ
ω.
omega-languages L, L
1⊆ Σ
ωFor u ∈ Σ
+, let u
ω= u.u.u . . .
Infinite Word Languages
Modeling infinite computations of reactive systems Given an Alphabet Σ (e.g. Σ
def= {a, b})
An ω-word α over Σ is an infinite sequence a
0, a
1, a
2. . ..
Formally, α : N → Σ.
The set of all infinite words is denoted by Σ
ω.
A ω-language L is collection of ω-words, i.e. L ⊆ Σ
ω. Example: All words over {a, b} with infinitely many a’s.
Notation:
omega words α, β, γ ∈ Σ
ω.
omega-languages L, L
1⊆ Σ
ωFor u ∈ Σ
+, let u
ω= u.u.u . . .
Omega-Automata
We consider automaton running over infinite words.
Let α = aabbbb . . ..
There are several (infinite) possible runs.
Run ρ
1= s
1, s
1, s
1, s
1, s
2, s
2. . . Run ρ
2= s
1, s
1, s
1, s
1, s
1, s
1. . .
Acceptance Conditions: Büchi (Muller, Rabin, Street):
Acceptance is based on states occurring infinitely often Notation Let ρ ∈ Q
ω. Then,
Inf (ρ) = {s ∈ Q | ∃
∞i ∈ N. ρ(i) = s}.
(The set of states occurring infinitely many times in ρ.)
Omega-Automata
We consider automaton running over infinite words.
Let α = aabbbb . . ..
There are several (infinite) possible runs.
Run ρ
1= s
1, s
1, s
1, s
1, s
2, s
2. . . Run ρ
2= s
1, s
1, s
1, s
1, s
1, s
1. . .
Acceptance Conditions: Büchi (Muller, Rabin, Street):
Acceptance is based on states occurring infinitely often Notation Let ρ ∈ Q
ω. Then,
Inf (ρ) = {s ∈ Q | ∃
∞i ∈ N. ρ(i) = s}.
(The set of states occurring infinitely many times in ρ.)
Omega-Automata
We consider automaton running over infinite words.
Let α = aabbbb . . ..
There are several (infinite) possible runs.
Run ρ
1= s
1, s
1, s
1, s
1, s
2, s
2. . . Run ρ
2= s
1, s
1, s
1, s
1, s
1, s
1. . .
Acceptance Conditions: Büchi (Muller, Rabin, Street):
Acceptance is based on states occurring infinitely often Notation Let ρ ∈ Q
ω. Then,
Inf (ρ) = {s ∈ Q | ∃
∞i ∈ N. ρ(i) = s}.
(The set of states occurring infinitely many times in ρ.)
Omega-Automata
We consider automaton running over infinite words.
Let α = aabbbb . . ..
There are several (infinite) possible runs.
Run ρ
1= s
1, s
1, s
1, s
1, s
2, s
2. . . Run ρ
2= s
1, s
1, s
1, s
1, s
1, s
1. . .
Acceptance Conditions: Büchi (Muller, Rabin, Street):
Acceptance is based on states occurring infinitely often Notation Let ρ ∈ Q
ω. Then,
Inf (ρ) = {s ∈ Q | ∃
∞i ∈ N. ρ(i) = s}.
(The set of states occurring infinitely many times in ρ.)
Büchi Automata
Nondeterministic Büchi Automaton
A Nondeterministic Büchi Automaton (NBA) is (Q, Σ, δ, I, F ) s.t.
Q Finite set of states.
Σis a finite alphabet I ⊆ Q set of initial states.
F ⊆ Q set of accepting states.
δ ⊆Q × Σ × Q transition relation (edges).
A Deterministic Büchi Automaton (DBA) is an NBA s.t. the transition relation is functional: δ : Q × Σ 7−→ Q
Runs and Language of NBAs
A run ρ of A on ω-word α = a
0, a
1, a
2, ... is an infinite sequence ρ = q
o, q
1, q
2, . . . s.t. q
0∈ I and q
i−→ q
ai i+1for 0 ≤ i.
The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.
The language accepted by A
L(A) = {α ∈ Σ
ω| A has an accepting run on α}
Büchi Automata
Nondeterministic Büchi Automaton
A Nondeterministic Büchi Automaton (NBA) is (Q, Σ, δ, I, F ) s.t.
Q Finite set of states.
Σis a finite alphabet I ⊆ Q set of initial states.
F ⊆ Q set of accepting states.
δ ⊆Q × Σ × Q transition relation (edges).
A Deterministic Büchi Automaton (DBA) is an NBA s.t. the transition relation is functional: δ : Q × Σ 7−→ Q
Runs and Language of NBAs
A run ρ of A on ω-word α = a
0, a
1, a
2, ... is an infinite sequence ρ = q
o, q
1, q
2, . . . s.t. q
0∈ I and q
i−→ q
ai i+1for 0 ≤ i.
The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.
The language accepted by A
L(A) = {α ∈ Σ
ω| A has an accepting run on α}
Büchi Automata
Nondeterministic Büchi Automaton
A Nondeterministic Büchi Automaton (NBA) is (Q, Σ, δ, I, F ) s.t.
Q Finite set of states.
Σis a finite alphabet I ⊆ Q set of initial states.
F ⊆ Q set of accepting states.
δ ⊆Q × Σ × Q transition relation (edges).
A Deterministic Büchi Automaton (DBA) is an NBA s.t. the transition relation is functional: δ : Q × Σ 7−→ Q
Runs and Language of NBAs
A run ρ of A on ω-word α = a
0, a
1, a
2, ... is an infinite sequence ρ = q
o, q
1, q
2, . . . s.t. q
0∈ I and q
i−→ q
ai i+1for 0 ≤ i.
The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.
The language accepted by A
L(A) = {α ∈ Σ
ω| A has an accepting run on α}
Büchi Automata
Nondeterministic Büchi Automaton
A Nondeterministic Büchi Automaton (NBA) is (Q, Σ, δ, I, F ) s.t.
Q Finite set of states.
Σis a finite alphabet I ⊆ Q set of initial states.
F ⊆ Q set of accepting states.
δ ⊆Q × Σ × Q transition relation (edges).
A Deterministic Büchi Automaton (DBA) is an NBA s.t. the transition relation is functional: δ : Q × Σ 7−→ Q
Runs and Language of NBAs
A run ρ of A on ω-word α = a
0, a
1, a
2, ... is an infinite sequence ρ = q
o, q
1, q
2, . . . s.t. q
0∈ I and q
i−→ q
ai i+1for 0 ≤ i.
The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.
The language accepted by A
L(A) = {α ∈ Σ
ω| A has an accepting run on α}
Büchi Automata
Nondeterministic Büchi Automaton
A Nondeterministic Büchi Automaton (NBA) is (Q, Σ, δ, I, F ) s.t.
Q Finite set of states.
Σis a finite alphabet I ⊆ Q set of initial states.
F ⊆ Q set of accepting states.
δ ⊆Q × Σ × Q transition relation (edges).
A Deterministic Büchi Automaton (DBA) is an NBA s.t. the transition relation is functional: δ : Q × Σ 7−→ Q
Runs and Language of NBAs
A run ρ of A on ω-word α = a
0, a
1, a
2, ... is an infinite sequence ρ = q
o, q
1, q
2, . . . s.t. q
0∈ I and q
i−→ q
ai i+1for 0 ≤ i.
The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.
The language accepted by A
L(A) = {α ∈ Σ
ω| A has an accepting run on α}
Büchi Automata
Nondeterministic Büchi Automaton
A Nondeterministic Büchi Automaton (NBA) is (Q, Σ, δ, I, F ) s.t.
Q Finite set of states.
Σis a finite alphabet I ⊆ Q set of initial states.
F ⊆ Q set of accepting states.
δ ⊆Q × Σ × Q transition relation (edges).
A Deterministic Büchi Automaton (DBA) is an NBA s.t. the transition relation is functional: δ : Q × Σ 7−→ Q
Runs and Language of NBAs
A run ρ of A on ω-word α = a
0, a
1, a
2, ... is an infinite sequence ρ = q
o, q
1, q
2, . . . s.t. q
0∈ I and q
i−→ q
ai i+1for 0 ≤ i.
The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.
The language accepted by A
L(A) = {α ∈ Σ
ω| A has an accepting run on α}
Büchi Automaton: Example
Let Σ = {a, b}.
Let a Deterministic Büchi Automaton (DBA) A
1be
With F = {s
1} the automaton recognizes words with infinitely many a’s.
With F = {s
2} the automaton recognizes words with infinitely
many b’s.
Büchi Automaton: Example
Let Σ = {a, b}.
Let a Deterministic Büchi Automaton (DBA) A
1be
With F = {s
1} the automaton recognizes words with infinitely many a’s.
With F = {s
2} the automaton recognizes words with infinitely
many b’s.
Büchi Automaton: Example
Let Σ = {a, b}.
Let a Deterministic Büchi Automaton (DBA) A
1be
With F = {s
1} the automaton recognizes words with infinitely many a’s.
With F = {s
2} the automaton recognizes words with infinitely
many b’s.
Büchi Automaton: Example (2)
Let a Nondeterministic Büchi Automaton (NBA) A
2be
With F = {s
2}, the automaton A
2recognizes words with finitely
many a. Thus, L(A
2) = L(A
1).
Deterministic vs. Nondeterministic Büchi Automata
Theorem
DBAs are strictly less powerful than NBAs.
The subset construction does not work!
Let DA
2be
DA
2is not equivalent to A
2(e.g., it recognizes (b.a)
ω)
There is no DBA equivalent to A
2Deterministic vs. Nondeterministic Büchi Automata
Theorem
DBAs are strictly less powerful than NBAs.
The subset construction does not work!
Let DA
2be
DA
2is not equivalent to A
2(e.g., it recognizes (b.a)
ω)
There is no DBA equivalent to A
2Deterministic vs. Nondeterministic Büchi Automata
Theorem
DBAs are strictly less powerful than NBAs.
The subset construction does not work!
Let DA
2be
DA
2is not equivalent to A
2(e.g., it recognizes (b.a)
ω)
There is no DBA equivalent to A
2Deterministic vs. Nondeterministic Büchi Automata
Theorem
DBAs are strictly less powerful than NBAs.
The subset construction does not work!
Let DA
2be
DA
2is not equivalent to A
2(e.g., it recognizes (b.a)
ω)
There is no DBA equivalent to A
2Closure Properties
Theorem (union, intersection)
For the NBAs A
1, A
2we can construct
the NBA A s.t. L(A) = L(A
1) ∪ L(A
2). |A| = |A
1| + |A
2|
the NBA A s.t. L(A) = L(A
1) ∩ L(A
2). |A| ≤ |A
1| · |A
2| · 2.
Closure Properties
Theorem (union, intersection)
For the NBAs A
1, A
2we can construct
the NBA A s.t. L(A) = L(A
1) ∪ L(A
2). |A| = |A
1| + |A
2|
the NBA A s.t. L(A) = L(A
1) ∩ L(A
2). |A| ≤ |A
1| · |A
2| · 2.
Closure Properties
Theorem (union, intersection)
For the NBAs A
1, A
2we can construct
the NBA A s.t. L(A) = L(A
1) ∪ L(A
2). |A| = |A
1| + |A
2|
the NBA A s.t. L(A) = L(A
1) ∩ L(A
2). |A| ≤ |A
1| · |A
2| · 2.
Union of two NBAs
Definition: union of NBAs
Let A
1= (Q
1, Σ
1, δ
1, I
1, F
1), A
2= (Q
2, Σ
2, δ
2, I
2, F
2).
Then A = A
1∪ A
2= (Q, Σ, δ, I, F ) is defined as follows Q := Q
1∪ Q
2, I := I
1∪ I
2, F := F
1∪ F
2R(s, s
0) :=
R
1(s, s
0) if s ∈ Q
1R
2(s, s
0) if s ∈ Q
2Theorem
L(A) = L(A
1) ∪ L(A
2)
|A |= |A
1| + |A
2|
Note
A is an automaton which just runs nondeterministically either A
1or A
2(same construction as with ordinary automata)
Union of two NBAs
Definition: union of NBAs
Let A
1= (Q
1, Σ
1, δ
1, I
1, F
1), A
2= (Q
2, Σ
2, δ
2, I
2, F
2).
Then A = A
1∪ A
2= (Q, Σ, δ, I, F ) is defined as follows Q := Q
1∪ Q
2, I := I
1∪ I
2, F := F
1∪ F
2R(s, s
0) :=
R
1(s, s
0) if s ∈ Q
1R
2(s, s
0) if s ∈ Q
2Theorem
L(A) = L(A
1) ∪ L(A
2)
|A |= |A
1| + |A
2|
Note
A is an automaton which just runs nondeterministically either A
1or A
2(same construction as with ordinary automata)
Union of two NBAs
Definition: union of NBAs
Let A
1= (Q
1, Σ
1, δ
1, I
1, F
1), A
2= (Q
2, Σ
2, δ
2, I
2, F
2).
Then A = A
1∪ A
2= (Q, Σ, δ, I, F ) is defined as follows Q := Q
1∪ Q
2, I := I
1∪ I
2, F := F
1∪ F
2R(s, s
0) :=
R
1(s, s
0) if s ∈ Q
1R
2(s, s
0) if s ∈ Q
2Theorem
L(A) = L(A
1) ∪ L(A
2)
|A |= |A
1| + |A
2|
Note
A is an automaton which just runs nondeterministically either A
1or A
2(same construction as with ordinary automata)
Union of two NBAs
Definition: union of NBAs
Let A
1= (Q
1, Σ
1, δ
1, I
1, F
1), A
2= (Q
2, Σ
2, δ
2, I
2, F
2).
Then A = A
1∪ A
2= (Q, Σ, δ, I, F ) is defined as follows Q := Q
1∪ Q
2, I := I
1∪ I
2, F := F
1∪ F
2R(s, s
0) :=
R
1(s, s
0) if s ∈ Q
1R
2(s, s
0) if s ∈ Q
2Theorem
L(A) = L(A
1) ∪ L(A
2)
|A |= |A
1| + |A
2|
Note
A is an automaton which just runs nondeterministically either A
1or A
2(same construction as with ordinary automata)
Union of two NBAs
Definition: union of NBAs
Let A
1= (Q
1, Σ
1, δ
1, I
1, F
1), A
2= (Q
2, Σ
2, δ
2, I
2, F
2).
Then A = A
1∪ A
2= (Q, Σ, δ, I, F ) is defined as follows Q := Q
1∪ Q
2, I := I
1∪ I
2, F := F
1∪ F
2R(s, s
0) :=
R
1(s, s
0) if s ∈ Q
1R
2(s, s
0) if s ∈ Q
2Theorem
L(A) = L(A
1) ∪ L(A
2)
|A |= |A
1| + |A
2|
Note
A is an automaton which just runs nondeterministically either A
1or A
2(same construction as with ordinary automata)
Synchronous Product of NBAs
Definition: synchronous product of NBAs
Let A
1= (Q
1, Σ, δ
1, I
1, F
1) and A
2= (Q
2, Σ, δ
2, I
2, F
2).
Then, A
1× A
2= (Q, Σ, δ, I, F ), where Q = Q
1× Q
2× {1, 2}.
I = I
1× I
2× {1}.
F = F
1× Q
2× {1}.
hp, q, 1i −→ hp
a 0, q
0, 1i iff p −→ p
a 0and q −→ q
a 0and p 6∈ F
1. hp, q, 1i −→ hp
a 0, q
0, 2i iff p −→ p
a 0and q −→ q
a 0and p ∈ F
1. hp, q, 2i −→ hp
a 0, q
0, 2i iff p −→ p
a 0and q −→ q
a 0and q 6∈ F
2. hp, q, 2i −→ hp
a 0, q
0, 1i iff p −→ p
a 0and q −→ q
a 0and q ∈ F
2.
Theorem
L(A
1× A
2) = L(A
1) ∩ L(A
2).
|A
1× A
2| ≤ 2 · |A
1| · |A
2|.
Synchronous Product of NBAs
Definition: synchronous product of NBAs
Let A
1= (Q
1, Σ, δ
1, I
1, F
1) and A
2= (Q
2, Σ, δ
2, I
2, F
2).
Then, A
1× A
2= (Q, Σ, δ, I, F ), where Q = Q
1× Q
2× {1, 2}.
I = I
1× I
2× {1}.
F = F
1× Q
2× {1}.
hp, q, 1i −→ hp
a 0, q
0, 1i iff p −→ p
a 0and q −→ q
a 0and p 6∈ F
1. hp, q, 1i −→ hp
a 0, q
0, 2i iff p −→ p
a 0and q −→ q
a 0and p ∈ F
1. hp, q, 2i −→ hp
a 0, q
0, 2i iff p −→ p
a 0and q −→ q
a 0and q 6∈ F
2. hp, q, 2i −→ hp
a 0, q
0, 1i iff p −→ p
a 0and q −→ q
a 0and q ∈ F
2.
Theorem
L(A
1× A
2) = L(A
1) ∩ L(A
2).
|A
1× A
2| ≤ 2 · |A
1| · |A
2|.
Synchronous Product of NBAs: Intuition
The automaton remembers two tracks, one for each source NBA, and it points to one of the two tracks
As soon as it goes through an accepting state of the current track, it switches to the other track
=⇒ in order to visit infinitely often a state in F (i.e., F
1), it must visit infinitely often some state also in F
2Important subcase: If F
2= Q
2, then Q = Q
1× Q
2.
I = I
1× I
2.
F = F
1× Q
2.
Synchronous Product of NBAs: Intuition
The automaton remembers two tracks, one for each source NBA, and it points to one of the two tracks
As soon as it goes through an accepting state of the current track, it switches to the other track
=⇒ in order to visit infinitely often a state in F (i.e., F
1), it must visit infinitely often some state also in F
2Important subcase: If F
2= Q
2, then Q = Q
1× Q
2.
I = I
1× I
2.
F = F
1× Q
2.
Synchronous Product of NBAs: Intuition
The automaton remembers two tracks, one for each source NBA, and it points to one of the two tracks
As soon as it goes through an accepting state of the current track, it switches to the other track
=⇒ in order to visit infinitely often a state in F (i.e., F
1), it must visit infinitely often some state also in F
2Important subcase: If F
2= Q
2, then Q = Q
1× Q
2.
I = I
1× I
2.
F = F
1× Q
2.
Synchronous Product of NBAs: Example
Synchronous Product of NBAs: Example
Closure Properties (2)
Theorem (complementation) [Safra, MacNaughten]
For the NBA A
1we can construct an NBA A
2such that L(A
2) = L(A
1).
|A
2| = O(2
|A1|·log(|A1|)).
Method: (hint)
(i) convert a Büchi automaton into a Non-Deterministic Rabin automaton
(ii) determinize and Complement the Rabin automaton
(iii) convert the Rabin automaton into a Büchi automaton.
Closure Properties (2)
Theorem (complementation) [Safra, MacNaughten]
For the NBA A
1we can construct an NBA A
2such that L(A
2) = L(A
1).
|A
2| = O(2
|A1|·log(|A1|)).
Method: (hint)
(i) convert a Büchi automaton into a Non-Deterministic Rabin automaton
(ii) determinize and Complement the Rabin automaton
(iii) convert the Rabin automaton into a Büchi automaton.
Closure Properties (2)
Theorem (complementation) [Safra, MacNaughten]
For the NBA A
1we can construct an NBA A
2such that L(A
2) = L(A
1).
|A
2| = O(2
|A1|·log(|A1|)).
Method: (hint)
(i) convert a Büchi automaton into a Non-Deterministic Rabin automaton
(ii) determinize and Complement the Rabin automaton
(iii) convert the Rabin automaton into a Büchi automaton.
Closure Properties (2)
Theorem (complementation) [Safra, MacNaughten]
For the NBA A
1we can construct an NBA A
2such that L(A
2) = L(A
1).
|A
2| = O(2
|A1|·log(|A1|)).
Method: (hint)
(i) convert a Büchi automaton into a Non-Deterministic Rabin automaton
(ii) determinize and Complement the Rabin automaton
(iii) convert the Rabin automaton into a Büchi automaton.
Closure Properties (2)
Theorem (complementation) [Safra, MacNaughten]
For the NBA A
1we can construct an NBA A
2such that L(A
2) = L(A
1).
|A
2| = O(2
|A1|·log(|A1|)).
Method: (hint)
(i) convert a Büchi automaton into a Non-Deterministic Rabin automaton
(ii) determinize and Complement the Rabin automaton
(iii) convert the Rabin automaton into a Büchi automaton.
Generalized Büchi Automaton
Definition
A Generalized Büchi Automaton is a tuple A := (Q, Σ, δ, I, FT ) where FT = hF
1, F
2, . . . , F
ki with F
i⊆ Q.
A run ρ of A is accepting if Inf (ρ) ∩ F
i6= ∅ for each 1 ≤ i ≤ k .
Theorem
For every Generalized Büchi Automaton we can construct a language equivalent plain Büchi Automaton.
Intuition
Let Q
0= Q × {1, . . . , K }.
The automaton remains in phase i till it visits a state in F
i. Then, it
moves to (i mod K ) + 1 mode.
Generalized Büchi Automaton
Definition
A Generalized Büchi Automaton is a tuple A := (Q, Σ, δ, I, FT ) where FT = hF
1, F
2, . . . , F
ki with F
i⊆ Q.
A run ρ of A is accepting if Inf (ρ) ∩ F
i6= ∅ for each 1 ≤ i ≤ k .
Theorem
For every Generalized Büchi Automaton we can construct a language equivalent plain Büchi Automaton.
Intuition
Let Q
0= Q × {1, . . . , K }.
The automaton remains in phase i till it visits a state in F
i. Then, it
moves to (i mod K ) + 1 mode.
Generalized Büchi Automaton
Definition
A Generalized Büchi Automaton is a tuple A := (Q, Σ, δ, I, FT ) where FT = hF
1, F
2, . . . , F
ki with F
i⊆ Q.
A run ρ of A is accepting if Inf (ρ) ∩ F
i6= ∅ for each 1 ≤ i ≤ k .
Theorem
For every Generalized Büchi Automaton we can construct a language equivalent plain Büchi Automaton.
Intuition
Let Q
0= Q × {1, . . . , K }.
The automaton remains in phase i till it visits a state in F
i. Then, it
moves to (i mod K ) + 1 mode.
De-generalization of a generalized NBA
Definition: De-generalization of a generalized NBA
Let A
def= (Q, Σ, δ, I, FT ) a generalized BA s.f. FT
def= {F
1, ..., F
K}.
Then a language-equivalent BA A
0def= (Q
0, Σ, δ
0, I
0, F
0) is built as follows
Q
0= Q
1× {1, ..., K }.
I
0= I × {1}.
F
0= F
1× {1}.
δ
0is s.t., for every i ∈ [1, ..., K ]:
hp, ii −→ hq, ii
aiff p −→ q ∈ δ and p 6∈ F
a i. hp, ii −→ hq, (i mod K ) + 1i iff p
a−→ q ∈ δ and p ∈ F
a i.
Theorem
L(A
0) = L(A).
|A
0| ≤ K · |A|.
De-generalization of a generalized NBA
Definition: De-generalization of a generalized NBA
Let A
def= (Q, Σ, δ, I, FT ) a generalized BA s.f. FT
def= {F
1, ..., F
K}.
Then a language-equivalent BA A
0def= (Q
0, Σ, δ
0, I
0, F
0) is built as follows
Q
0= Q
1× {1, ..., K }.
I
0= I × {1}.
F
0= F
1× {1}.
δ
0is s.t., for every i ∈ [1, ..., K ]:
hp, ii −→ hq, ii
aiff p −→ q ∈ δ and p 6∈ F
a i. hp, ii −→ hq, (i mod K ) + 1i iff p
a−→ q ∈ δ and p ∈ F
a i.
Theorem
L(A
0) = L(A).
|A
0| ≤ K · |A|.
Degeneralizing a Büchi automaton: Example
Degeneralizing a Büchi automaton: Example
Omega-regular Expressions
Definition
A language is called ω-regular if it has the form ∪
ni=1U
i.(V
i)
ωwhere U
i, V
iare regular languages.
Theorem
A language L is ω-regular iff it is NBA-recognizable.
Omega-regular Expressions
Definition
A language is called ω-regular if it has the form ∪
ni=1U
i.(V
i)
ωwhere U
i, V
iare regular languages.
Theorem
A language L is ω-regular iff it is NBA-recognizable.
Outline
1
Büchi Automata
2
The Automata-Theoretic Approach to LTL Reasoning General Ideas
Language-Emptiness Checking of Büchi Automata From Kripke Models to Büchi Automata
From LTL Formulas to Büchi Automata Complexity
3
Exercises
Outline
1
Büchi Automata
2
The Automata-Theoretic Approach to LTL Reasoning General Ideas
Language-Emptiness Checking of Büchi Automata From Kripke Models to Büchi Automata
From LTL Formulas to Büchi Automata Complexity
3
Exercises
Automata-Theoretic LTL Satisfiability and Entailment
LTL Validity/Satisfiability Let ψ be an LTL formula
|= ψ (LTL)
⇐⇒ ¬ψ unsat
⇐⇒ L(A¬ψ) = ∅
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
LTL Entailment
Let ϕ, ψ be an LTL formula
ϕ |= ψ (LTL)|= ϕ → ψ (LTL)
⇐⇒ ϕ ∧ ¬ψ unsat
⇐⇒ L(Aϕ∧¬ψ) = ∅
A
ϕ∧¬ψis a Büchi Automaton which represents all and only the
paths that satisfy ϕ ∧ ¬ψ (satisfy ϕ and do not satisfy ψ)
Automata-Theoretic LTL Satisfiability and Entailment
LTL Validity/Satisfiability Let ψ be an LTL formula
|= ψ (LTL)
⇐⇒ ¬ψ unsat
⇐⇒ L(A¬ψ) = ∅
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
LTL Entailment
Let ϕ, ψ be an LTL formula
ϕ |= ψ (LTL)|= ϕ → ψ (LTL)
⇐⇒ ϕ ∧ ¬ψ unsat
⇐⇒ L(Aϕ∧¬ψ) = ∅
A
ϕ∧¬ψis a Büchi Automaton which represents all and only the
paths that satisfy ϕ ∧ ¬ψ (satisfy ϕ and do not satisfy ψ)
Automata-Theoretic LTL Satisfiability and Entailment
LTL Validity/Satisfiability Let ψ be an LTL formula
|= ψ (LTL)
⇐⇒ ¬ψ unsat
⇐⇒ L(A¬ψ) = ∅
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
LTL Entailment
Let ϕ, ψ be an LTL formula
ϕ |= ψ (LTL)|= ϕ → ψ (LTL)
⇐⇒ ϕ ∧ ¬ψ unsat
⇐⇒ L(Aϕ∧¬ψ) = ∅
A
ϕ∧¬ψis a Büchi Automaton which represents all and only the
paths that satisfy ϕ ∧ ¬ψ (satisfy ϕ and do not satisfy ψ)
Automata-Theoretic LTL Satisfiability and Entailment
LTL Validity/Satisfiability Let ψ be an LTL formula
|= ψ (LTL)
⇐⇒ ¬ψ unsat
⇐⇒ L(A¬ψ) = ∅
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
LTL Entailment
Let ϕ, ψ be an LTL formula
ϕ |= ψ (LTL)|= ϕ → ψ (LTL)
⇐⇒ ϕ ∧ ¬ψunsat
⇐⇒ L(Aϕ∧¬ψ) = ∅
A
ϕ∧¬ψis a Büchi Automaton which represents all and only the
paths that satisfy ϕ ∧ ¬ψ (satisfy ϕ and do not satisfy ψ)
Automata-Theoretic LTL Satisfiability and Entailment
LTL Validity/Satisfiability Let ψ be an LTL formula
|= ψ (LTL)
⇐⇒ ¬ψ unsat
⇐⇒ L(A¬ψ) = ∅
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
LTL Entailment
Let ϕ, ψ be an LTL formula
ϕ |= ψ (LTL)|= ϕ → ψ (LTL)
⇐⇒ ϕ ∧ ¬ψunsat
⇐⇒ L(Aϕ∧¬ψ) = ∅
A
ϕ∧¬ψis a Büchi Automaton which represents all and only the
paths that satisfy ϕ ∧ ¬ψ (satisfy ϕ and do not satisfy ψ)
Automata-Theoretic LTL Satisfiability and Entailment
LTL Validity/Satisfiability Let ψ be an LTL formula
|= ψ (LTL)
⇐⇒ ¬ψ unsat
⇐⇒ L(A¬ψ) = ∅
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
LTL Entailment
Let ϕ, ψ be an LTL formula
ϕ |= ψ (LTL)|= ϕ → ψ (LTL)
⇐⇒ ϕ ∧ ¬ψunsat
⇐⇒ L(Aϕ∧¬ψ) = ∅
A
ϕ∧¬ψis a Büchi Automaton which represents all and only the
paths that satisfy ϕ ∧ ¬ψ (satisfy ϕ and do not satisfy ψ)
Automata-Theoretic LTL Model Checking
LTL Model Checking
Let M be a Kripke model and ψ be an LTL formula
M |= ψ (LTL)⇐⇒ L(M) ⊆ L(ψ)
⇐⇒ L(M) ∩ L(ψ) = ∅
⇐⇒ L(M) ∩ L(¬ψ) = ∅
⇐⇒ L(AM) ∩ L(A¬ψ) = ∅
⇐⇒ L(AM× A¬ψ) = ∅
A
Mis a Büchi Automaton equivalent to M (which represents all and only the executions of M)
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
=⇒ A
M× A
¬ψrepresents all and only the paths appearing in M and
not in ψ.
Automata-Theoretic LTL Model Checking
LTL Model Checking
Let M be a Kripke model and ψ be an LTL formula
M |= ψ (LTL)⇐⇒ L(M) ⊆ L(ψ)
⇐⇒ L(M) ∩ L(ψ) = ∅
⇐⇒ L(M) ∩ L(¬ψ) = ∅
⇐⇒ L(AM) ∩ L(A¬ψ) = ∅
⇐⇒ L(AM× A¬ψ) = ∅
A
Mis a Büchi Automaton equivalent to M (which represents all and only the executions of M)
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
=⇒ A
M× A
¬ψrepresents all and only the paths appearing in M and
not in ψ.
Automata-Theoretic LTL Model Checking
LTL Model Checking
Let M be a Kripke model and ψ be an LTL formula
M |= ψ (LTL)⇐⇒ L(M) ⊆ L(ψ)
⇐⇒ L(M) ∩ L(ψ) = ∅
⇐⇒ L(M) ∩ L(¬ψ) = ∅
⇐⇒ L(AM) ∩ L(A¬ψ) = ∅
⇐⇒ L(AM× A¬ψ) = ∅
A
Mis a Büchi Automaton equivalent to M (which represents all and only the executions of M)
A
¬ψis a Büchi Automaton which represents all and only the paths that satisfy ¬ψ (do not satisfy ψ)
=⇒ A
M× A
¬ψrepresents all and only the paths appearing in M and
not in ψ.
Automata-Theoretic LTL Model Checking
Four steps Let ϕ
def= ¬ψ:
(i) Compute A
M(ii) Compute A
ϕ(iii) Compute the product A
M× A
ϕ(iv) Check the emptiness of L(A
M× A
ϕ)
Automata-Theoretic LTL Model Checking
Four steps Let ϕ
def= ¬ψ:
(i) Compute A
M(ii) Compute A
ϕ(iii) Compute the product A
M× A
ϕ(iv) Check the emptiness of L(A
M× A
ϕ)
Automata-Theoretic LTL Model Checking
Four steps Let ϕ
def= ¬ψ:
(i) Compute A
M(ii) Compute A
ϕ(iii) Compute the product A
M× A
ϕ(iv) Check the emptiness of L(A
M× A
ϕ)
Automata-Theoretic LTL Model Checking
Four steps Let ϕ
def= ¬ψ:
(i) Compute A
M(ii) Compute A
ϕ(iii) Compute the product A
M× A
ϕ(iv) Check the emptiness of L(A
M× A
ϕ)
Automata-Theoretic LTL Model Checking
Four steps Let ϕ
def= ¬ψ:
(i) Compute A
M(ii) Compute A
ϕ(iii) Compute the product A
M× A
ϕ(iv) Check the emptiness of L(A
M× A
ϕ)
Outline
1
Büchi Automata
2
The Automata-Theoretic Approach to LTL Reasoning General Ideas
Language-Emptiness Checking of Büchi Automata From Kripke Models to Büchi Automata
From LTL Formulas to Büchi Automata Complexity
3
Exercises
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.
Complexity: O(n)
Drawbacks: it stores too much information and does not find
directly a counterexample.
NBA emptiness checking
Find an accepting cycle reachable from an initial state.
A naive algorithm:
(i) a DFS finds the final states f reachable from an initial state;
(ii) for each f , a second DFS finds if it can reach f (i.e., if there exists a loop)
Complexity: O(n
2) SCC-based algorithm:
(i) Tarjan’s algorithm uses a DFS to find the SCCs in linear time;
(ii) drop all SCCs which do not have at least one arc, and which do not contain at least one accepting state f
(iii) another DFS finds if the union of non-trivial SCCs is reachable from an initial state.