• Non ci sono risultati.

Introduction to Formal Methods Chapter 08: Automata-theoretic LTL Model Checking

N/A
N/A
Protected

Academic year: 2021

Condividi "Introduction to Formal Methods Chapter 08: Automata-theoretic LTL Model Checking"

Copied!
309
0
0

Testo completo

(1)

Introduction to Formal Methods

Chapter 08: Automata-theoretic LTL Model Checking

Roberto Sebastiani and Stefano Tonetta

DISI, Università di Trento, Italy – roberto.sebastiani@unitn.it URL: http://disi.unitn.it/rseba/DIDATTICA/fm2020/

Teaching assistant: Enrico Magnago – enrico.magnago@unitn.it

CDLM in Informatica, academic year 2019-2020

last update: Monday 18thMay, 2020, 14: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, 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

(2)

Outline

1 Background: Finite-Word Automata Language Containment

Automata on Finite Words

2 Infinite-Word Automata Automata on Infinite Words Emptiness Checking

3 The Automata-Theoretic Approach to Model Checking Automata-Theoretic LTL Model Checking

From Kripke Structures to Büchi Automata

From LTL Formulas to Büchi Automata: generalities On-the-fly construction of Bu¨chi Automata from LTL Complexity

4 Exercises

(3)

Outline

1 Background: Finite-Word Automata Language Containment

Automata on Finite Words

2 Infinite-Word Automata Automata on Infinite Words Emptiness Checking

3 The Automata-Theoretic Approach to Model Checking Automata-Theoretic LTL Model Checking

From Kripke Structures to Büchi Automata

From LTL Formulas to Büchi Automata: generalities On-the-fly construction of Bu¨chi Automata from LTL Complexity

4 Exercises

(4)

Outline

1 Background: Finite-Word Automata Language Containment

Automata on Finite Words

2 Infinite-Word Automata Automata on Infinite Words Emptiness Checking

3 The Automata-Theoretic Approach to Model Checking Automata-Theoretic LTL Model Checking

From Kripke Structures to Büchi Automata

From LTL Formulas to Büchi Automata: generalities On-the-fly construction of Bu¨chi Automata from LTL Complexity

4 Exercises

(5)

System’s computations

The behaviors (computations) of a system can be seen as sequences of assignments to propositions.

MODULE main

VAR done: Boolean;

ASSIGN

init(done):=0;

next(done):= case

!done: {0,1};

done: done;

esac;

Since the state space is finite, the set of computations can be

represented by a finite automaton.

(6)

System’s computations

The behaviors (computations) of a system can be seen as sequences of assignments to propositions.

MODULE main

VAR done: Boolean;

ASSIGN

init(done):=0;

next(done):= case

!done: {0,1};

done: done;

esac;

Since the state space is finite, the set of computations can be represented by a finite automaton.

or

!done done

done

(7)

Correct computations

Some computations are correct and others are not acceptable.

We can build an automaton for the set of all acceptable computations.

Example: eventually, done will be true forever (FGdone).

(8)

Language Containment Problem

Solution to the verification problem

=⇒ Check if language of the system automaton is contained in the language accepted by the property automaton.

The language containment problem is the problem of deciding if a language is a subset of another language.

L(A 1 ) ⊆ L(A 2 ) ⇐⇒ L(A 1 ) ∩ L(A 2 ) = {}

In order to solve the language containment problem, we need to know:

(i) how to complement an automaton, (ii) how to intersect two automata,

(iii) how to check the language emptiness of an automaton.

(9)

Language Containment Problem

Solution to the verification problem

=⇒ Check if language of the system automaton is contained in the language accepted by the property automaton.

The language containment problem is the problem of deciding if a language is a subset of another language.

L(A 1 ) ⊆ L(A 2 ) ⇐⇒ L(A 1 ) ∩ L(A 2 ) = {}

In order to solve the language containment problem, we need to know:

(i) how to complement an automaton, (ii) how to intersect two automata,

(iii) how to check the language emptiness of an automaton.

(10)

Language Containment Problem

Solution to the verification problem

=⇒ Check if language of the system automaton is contained in the language accepted by the property automaton.

The language containment problem is the problem of deciding if a language is a subset of another language.

L(A 1 ) ⊆ L(A 2 ) ⇐⇒ L(A 1 ) ∩ L(A 2 ) = {}

In order to solve the language containment problem, we need to know:

(i) how to complement an automaton, (ii) how to intersect two automata,

(iii) how to check the language emptiness of an automaton.

(11)

Language Containment Problem

Solution to the verification problem

=⇒ Check if language of the system automaton is contained in the language accepted by the property automaton.

The language containment problem is the problem of deciding if a language is a subset of another language.

L(A 1 ) ⊆ L(A 2 ) ⇐⇒ L(A 1 ) ∩ L(A 2 ) = {}

In order to solve the language containment problem, we need to know:

(i) how to complement an automaton, (ii) how to intersect two automata,

(iii) how to check the language emptiness of an automaton.

(12)

Language Containment Problem

Solution to the verification problem

=⇒ Check if language of the system automaton is contained in the language accepted by the property automaton.

The language containment problem is the problem of deciding if a language is a subset of another language.

L(A 1 ) ⊆ L(A 2 ) ⇐⇒ L(A 1 ) ∩ L(A 2 ) = {}

In order to solve the language containment problem, we need to know:

(i) how to complement an automaton, (ii) how to intersect two automata,

(iii) how to check the language emptiness of an automaton.

(13)

Language Containment Problem

Solution to the verification problem

=⇒ Check if language of the system automaton is contained in the language accepted by the property automaton.

The language containment problem is the problem of deciding if a language is a subset of another language.

L(A 1 ) ⊆ L(A 2 ) ⇐⇒ L(A 1 ) ∩ L(A 2 ) = {}

In order to solve the language containment problem, we need to know:

(i) how to complement an automaton, (ii) how to intersect two automata,

(iii) how to check the language emptiness of an automaton.

(14)

Outline

1 Background: Finite-Word Automata Language Containment

Automata on Finite Words

2 Infinite-Word Automata Automata on Infinite Words Emptiness Checking

3 The Automata-Theoretic Approach to Model Checking Automata-Theoretic LTL Model Checking

From Kripke Structures to Büchi Automata

From LTL Formulas to Büchi Automata: generalities On-the-fly construction of Bu¨chi Automata from LTL Complexity

4 Exercises

(15)

Finite Word Languages

An Alphabet Σ is a collection of symbols (letters).

E.g. Σ = {a, b}.

A finite word is a finite sequence of letters. (E.g. aabb.) The set of all finite words is denoted by Σ .

A language U is a set of words, i.e. U ⊆ Σ .

Example: Words over Σ = {a, b} with equal number of a’s and b’s.

(E.g. aabb or abba.)

Language recognition problem: determine whether a word belongs to a language.

Automata are computational devices able to solve language

recognition problems.

(16)

Finite Word Languages

An Alphabet Σ is a collection of symbols (letters).

E.g. Σ = {a, b}.

A finite word is a finite sequence of letters. (E.g. aabb.) The set of all finite words is denoted by Σ .

A language U is a set of words, i.e. U ⊆ Σ .

Example: Words over Σ = {a, b} with equal number of a’s and b’s.

(E.g. aabb or abba.)

Language recognition problem: determine whether a word belongs to a language.

Automata are computational devices able to solve language

recognition problems.

(17)

Finite Word Languages

An Alphabet Σ is a collection of symbols (letters).

E.g. Σ = {a, b}.

A finite word is a finite sequence of letters. (E.g. aabb.) The set of all finite words is denoted by Σ .

A language U is a set of words, i.e. U ⊆ Σ .

Example: Words over Σ = {a, b} with equal number of a’s and b’s.

(E.g. aabb or abba.)

Language recognition problem: determine whether a word belongs to a language.

Automata are computational devices able to solve language

recognition problems.

(18)

Finite Word Languages

An Alphabet Σ is a collection of symbols (letters).

E.g. Σ = {a, b}.

A finite word is a finite sequence of letters. (E.g. aabb.) The set of all finite words is denoted by Σ .

A language U is a set of words, i.e. U ⊆ Σ .

Example: Words over Σ = {a, b} with equal number of a’s and b’s.

(E.g. aabb or abba.)

Language recognition problem: determine whether a word belongs to a language.

Automata are computational devices able to solve language

recognition problems.

(19)

Finite Word Languages

An Alphabet Σ is a collection of symbols (letters).

E.g. Σ = {a, b}.

A finite word is a finite sequence of letters. (E.g. aabb.) The set of all finite words is denoted by Σ .

A language U is a set of words, i.e. U ⊆ Σ .

Example: Words over Σ = {a, b} with equal number of a’s and b’s.

(E.g. aabb or abba.)

Language recognition problem: determine whether a word belongs to a language.

Automata are computational devices able to solve language

recognition problems.

(20)

Finite Word Languages

An Alphabet Σ is a collection of symbols (letters).

E.g. Σ = {a, b}.

A finite word is a finite sequence of letters. (E.g. aabb.) The set of all finite words is denoted by Σ .

A language U is a set of words, i.e. U ⊆ Σ .

Example: Words over Σ = {a, b} with equal number of a’s and b’s.

(E.g. aabb or abba.)

Language recognition problem: determine whether a word belongs to a language.

Automata are computational devices able to solve language

recognition problems.

(21)

Finite-State Automata

Basic model of computational systems with finite memory.

Widely applicable

Embedded System Controllers.

Languages: Ester-el, Lustre, Verilog.

Synchronous Circuits.

Regular Expression Pattern Matching Grep, Lex, Emacs.

Protocols

Network Protocols

Architecture: Bus, Cache Coherence, Telephony,...

(22)

Finite-State Automata

Basic model of computational systems with finite memory.

Widely applicable

Embedded System Controllers.

Languages: Ester-el, Lustre, Verilog.

Synchronous Circuits.

Regular Expression Pattern Matching Grep, Lex, Emacs.

Protocols

Network Protocols

Architecture: Bus, Cache Coherence, Telephony,...

(23)

Notation

a, b ∈ Σ finite alphabet.

u, v , w ∈ Σ finite words.

 empty word.

u.v concatenation.

u i = u.u. .u repeated i-times.

U, V ⊆ Σ Finite word languages.

(24)

Finite-State Automata Definition

Definition

A Nondeterministic Finite-State Automaton (NFA) 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 final states.

δ ⊆ Q × Σ × Q transition relation (edges).

We use q −→ q a 0 to denote (q, a, q 0 ) ∈ δ.

Definition

A Deterministic Finite-State Automaton (DFA) is a NFA s.t.:

δ : Q × Σ → Q is a total function

Single initial state I = {q 0 }.

(25)

Finite-State Automata Definition

Definition

A Nondeterministic Finite-State Automaton (NFA) 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 final states.

δ ⊆ Q × Σ × Q transition relation (edges).

We use q −→ q a 0 to denote (q, a, q 0 ) ∈ δ.

Definition

A Deterministic Finite-State Automaton (DFA) is a NFA s.t.:

δ : Q × Σ → Q is a total function

Single initial state I = {q 0 }.

(26)

Regular Languages

A run of NFA A on u = a 0 , a 1 , . . . , a n−1 is a finite sequence of states q 0 , q 1 , . . . , q n s.t. q 0 ∈ I and q i −→ q a

i

i+1 for 0 ≤ i < n.

An accepting run is one where q n ∈ F . The language accepted by A is

L(A) = {u ∈ Σ | A has an accepting run on u}

The languages accepted by a NFA are called regular languages.

(27)

Regular Languages

A run of NFA A on u = a 0 , a 1 , . . . , a n−1 is a finite sequence of states q 0 , q 1 , . . . , q n s.t. q 0 ∈ I and q i −→ q a

i

i+1 for 0 ≤ i < n.

An accepting run is one where q n ∈ F . The language accepted by A is

L(A) = {u ∈ Σ | A has an accepting run on u}

The languages accepted by a NFA are called regular languages.

(28)

Regular Languages

A run of NFA A on u = a 0 , a 1 , . . . , a n−1 is a finite sequence of states q 0 , q 1 , . . . , q n s.t. q 0 ∈ I and q i −→ q a

i

i+1 for 0 ≤ i < n.

An accepting run is one where q n ∈ F . The language accepted by A is

L(A) = {u ∈ Σ | A has an accepting run on u}

The languages accepted by a NFA are called regular languages.

(29)

Regular Languages

A run of NFA A on u = a 0 , a 1 , . . . , a n−1 is a finite sequence of states q 0 , q 1 , . . . , q n s.t. q 0 ∈ I and q i −→ q a

i

i+1 for 0 ≤ i < n.

An accepting run is one where q n ∈ F . The language accepted by A is

L(A) = {u ∈ Σ | A has an accepting run on u}

The languages accepted by a NFA are called regular languages.

(30)

Finite-State Automata: examples

The DFA A 1 over Σ = {a, b}:

Recognizes words which do not end in b.

The NFA A 2 over Σ = {a, b}:

Recognizes words which end in b.

(31)

Finite-State Automata: examples

The DFA A 1 over Σ = {a, b}:

Recognizes words which do not end in b.

The NFA A 2 over Σ = {a, b}:

Recognizes words which end in b.

(32)

Determinisation

Theorem (determinisation)

Given a NFA A we can construct a DFA A 0 s.t. L(A) = L(A 0 ).

Size: |A 0 | = 2 O(|A|) .

Each state of A 0 corresponds to a set {s 1 , ..., s j } of states in A (Q 0 ⊆ 2 Q ), with the intended meaning that :

A

0

is in the state {s

1

, .., s

j

} if A is in one of the states s

1

, ..., s

j

The (unique) initial state is I 0 = def {s i | s i ∈ I}

The deterministic transition relation δ 0 : 2 Q × Σ 7−→ 2 Q is {s} −→ {s

a i

| s −→ s

a i

}

{s

1

, ..., s

j

, ..., s

n

} −→

a

S

n

j=1

{s

i

| s

j

−→ s

a i

} The set of final states F 0 is such that

{s 1 , ..., s n } ∈ F 0 iff s i ∈ F for some i ∈ {1, ..., n}

(33)

Determinisation

Theorem (determinisation)

Given a NFA A we can construct a DFA A 0 s.t. L(A) = L(A 0 ).

Size: |A 0 | = 2 O(|A|) .

Each state of A 0 corresponds to a set {s 1 , ..., s j } of states in A (Q 0 ⊆ 2 Q ), with the intended meaning that :

A

0

is in the state {s

1

, .., s

j

} if A is in one of the states s

1

, ..., s

j

The (unique) initial state is I 0 = def {s i | s i ∈ I}

The deterministic transition relation δ 0 : 2 Q × Σ 7−→ 2 Q is {s} −→ {s

a i

| s −→ s

a i

}

{s

1

, ..., s

j

, ..., s

n

} −→

a

S

n

j=1

{s

i

| s

j

−→ s

a i

} The set of final states F 0 is such that

{s 1 , ..., s n } ∈ F 0 iff s i ∈ F for some i ∈ {1, ..., n}

(34)

Determinisation

Theorem (determinisation)

Given a NFA A we can construct a DFA A 0 s.t. L(A) = L(A 0 ).

Size: |A 0 | = 2 O(|A|) .

Each state of A 0 corresponds to a set {s 1 , ..., s j } of states in A (Q 0 ⊆ 2 Q ), with the intended meaning that :

A

0

is in the state {s

1

, .., s

j

} if A is in one of the states s

1

, ..., s

j

The (unique) initial state is I 0 = def {s i | s i ∈ I}

The deterministic transition relation δ 0 : 2 Q × Σ 7−→ 2 Q is {s} −→ {s

a i

| s −→ s

a i

}

{s

1

, ..., s

j

, ..., s

n

} −→

a

S

n

j=1

{s

i

| s

j

−→ s

a i

} The set of final states F 0 is such that

{s 1 , ..., s n } ∈ F 0 iff s i ∈ F for some i ∈ {1, ..., n}

(35)

Determinisation

Theorem (determinisation)

Given a NFA A we can construct a DFA A 0 s.t. L(A) = L(A 0 ).

Size: |A 0 | = 2 O(|A|) .

Each state of A 0 corresponds to a set {s 1 , ..., s j } of states in A (Q 0 ⊆ 2 Q ), with the intended meaning that :

A

0

is in the state {s

1

, .., s

j

} if A is in one of the states s

1

, ..., s

j

The (unique) initial state is I 0 = def {s i | s i ∈ I}

The deterministic transition relation δ 0 : 2 Q × Σ 7−→ 2 Q is {s} −→ {s

a i

| s −→ s

a i

}

{s

1

, ..., s

j

, ..., s

n

} −→

a

S

n

j=1

{s

i

| s

j

−→ s

a i

} The set of final states F 0 is such that

{s 1 , ..., s n } ∈ F 0 iff s i ∈ F for some i ∈ {1, ..., n}

(36)

Determinisation

Theorem (determinisation)

Given a NFA A we can construct a DFA A 0 s.t. L(A) = L(A 0 ).

Size: |A 0 | = 2 O(|A|) .

Each state of A 0 corresponds to a set {s 1 , ..., s j } of states in A (Q 0 ⊆ 2 Q ), with the intended meaning that :

A

0

is in the state {s

1

, .., s

j

} if A is in one of the states s

1

, ..., s

j

The (unique) initial state is I 0 = def {s i | s i ∈ I}

The deterministic transition relation δ 0 : 2 Q × Σ 7−→ 2 Q is {s} −→ {s

a i

| s −→ s

a i

}

{s

1

, ..., s

j

, ..., s

n

} −→

a

S

n

j=1

{s

i

| s

j

−→ s

a i

} The set of final states F 0 is such that

{s 1 , ..., s n } ∈ F 0 iff s i ∈ F for some i ∈ {1, ..., n}

(37)

Determinisation [cont.]

NFA A 2 : Words which end in b.

A 2 can be determinised into the automaton DA 2 below.

(#States = 2 Q .)

There are NFAs of size n for which the size of the minimum sized

DFA must have size O(2 n ).

(38)

Determinisation [cont.]

NFA A 2 : Words which end in b.

A 2 can be determinised into the automaton DA 2 below.

(#States = 2 Q .)

There are NFAs of size n for which the size of the minimum sized

DFA must have size O(2 n ).

(39)

Determinisation [cont.]

NFA A 2 : Words which end in b.

A 2 can be determinised into the automaton DA 2 below.

(#States = 2 Q .)

There are NFAs of size n for which the size of the minimum sized

DFA must have size O(2 n ).

(40)

Closure Properties

Theorem (Boolean closure)

Given NFA A 1 , A 2 over Σ we can construct NFA A over Σ s.t.

L(A) = L(A 1 ) (Complement). |A| = 2 O(|A

1

|) . L(A) = L(A 1 ) ∪ L(A 2 ) (union). |A| = |A 1 | + |A 2 |.

L(A) = L(A 1 ) ∩ L(A 2 ) (intersection). |A| ≤ |A 1 | · |A 2 |.

(41)

Closure Properties

Theorem (Boolean closure)

Given NFA A 1 , A 2 over Σ we can construct NFA A over Σ s.t.

L(A) = L(A 1 ) (Complement). |A| = 2 O(|A

1

|) . L(A) = L(A 1 ) ∪ L(A 2 ) (union). |A| = |A 1 | + |A 2 |.

L(A) = L(A 1 ) ∩ L(A 2 ) (intersection). |A| ≤ |A 1 | · |A 2 |.

(42)

Closure Properties

Theorem (Boolean closure)

Given NFA A 1 , A 2 over Σ we can construct NFA A over Σ s.t.

L(A) = L(A 1 ) (Complement). |A| = 2 O(|A

1

|) . L(A) = L(A 1 ) ∪ L(A 2 ) (union). |A| = |A 1 | + |A 2 |.

L(A) = L(A 1 ) ∩ L(A 2 ) (intersection). |A| ≤ |A 1 | · |A 2 |.

(43)

Complementation of a NFA

A NFA A = (Q, Σ, δ, I, F ) is complemented by:

determinising it into a DFA A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 ) complementing it: A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 )

|A 0 | = |A 0 | = 2 O(|A|)

(44)

Complementation of a NFA

A NFA A = (Q, Σ, δ, I, F ) is complemented by:

determinising it into a DFA A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 ) complementing it: A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 )

|A 0 | = |A 0 | = 2 O(|A|)

(45)

Complementation of a NFA

A NFA A = (Q, Σ, δ, I, F ) is complemented by:

determinising it into a DFA A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 ) complementing it: A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 )

|A 0 | = |A 0 | = 2 O(|A|)

(46)

Complementation of a NFA

A NFA A = (Q, Σ, δ, I, F ) is complemented by:

determinising it into a DFA A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 ) complementing it: A 0 = (Q 0 , Σ 0 , δ 0 , I 0 , F 0 )

|A 0 | = |A 0 | = 2 O(|A|)

(47)

Union of two NFAs

Definition: union of NFAs

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 | Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(48)

Union of two NFAs

Definition: union of NFAs

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 | Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(49)

Union of two NFAs

Definition: union of NFAs

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 | Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(50)

Union of two NFAs

Definition: union of NFAs

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 | Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(51)

Union of two NFAs

Definition: union of NFAs

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 | Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(52)

Synchronous Product Construction

Definition: product of NFAs

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 ,

I = I 1 × I 2 , F = F 1 × F 2 ,

hp, qi −→ hp a 0 , q 0 i iff p −→ p a 0 and q −→ q a 0 .

Theorem

L(A 1 × A 2 ) = L(A 1 ) ∩ L(A 2 ).

|(A 1 × A 2 )| ≤ |A 1 | · |A 2 |.

(53)

Synchronous Product Construction

Definition: product of NFAs

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 ,

I = I 1 × I 2 , F = F 1 × F 2 ,

hp, qi −→ hp a 0 , q 0 i iff p −→ p a 0 and q −→ q a 0 .

Theorem

L(A 1 × A 2 ) = L(A 1 ) ∩ L(A 2 ).

|(A 1 × A 2 )| ≤ |A 1 | · |A 2 |.

(54)

Example

A 1 recognizes words with an even number of b’s.

A 2 recognizes words with a number of a’s multiple of 3.

The Product Automaton A 1 × A 2 with F = {s 0 , t 0 }.

(55)

Example

A 1 recognizes words with an even number of b’s.

A 2 recognizes words with a number of a’s multiple of 3.

The Product Automaton A 1 × A 2 with F = {s 0 , t 0 }.

(56)

Example

A 1 recognizes words with an even number of b’s.

A 2 recognizes words with a number of a’s multiple of 3.

The Product Automaton A 1 × A 2 with F = {s 0 , t 0 }.

(57)

Example

A 1 recognizes words with an even number of b’s.

A 2 recognizes words with a number of a’s multiple of 3.

The Product Automaton A 1 × A 2 with F = {s 0 , t 0 }.

(58)

Regular Expressions

Syntax: ∅ |  | a | reg 1 .reg 2 | reg 1 |reg 2 | reg . Every regular expression reg denotes a language L(reg).

Example: a .(b|bb).a . The words with either 1 b or 2 consecutive b’s.

Theorem

For every regular expression reg we can construct a language equivalent NFA of size O(|reg|).

Theorem

For every DFA A we can construct a language equivalent regular

expression reg(A).

(59)

Regular Expressions

Syntax: ∅ |  | a | reg 1 .reg 2 | reg 1 |reg 2 | reg . Every regular expression reg denotes a language L(reg).

Example: a .(b|bb).a . The words with either 1 b or 2 consecutive b’s.

Theorem

For every regular expression reg we can construct a language equivalent NFA of size O(|reg|).

Theorem

For every DFA A we can construct a language equivalent regular

expression reg(A).

(60)

Regular Expressions

Syntax: ∅ |  | a | reg 1 .reg 2 | reg 1 |reg 2 | reg . Every regular expression reg denotes a language L(reg).

Example: a .(b|bb).a . The words with either 1 b or 2 consecutive b’s.

Theorem

For every regular expression reg we can construct a language equivalent NFA of size O(|reg|).

Theorem

For every DFA A we can construct a language equivalent regular

expression reg(A).

(61)

Regular Expressions

Syntax: ∅ |  | a | reg 1 .reg 2 | reg 1 |reg 2 | reg . Every regular expression reg denotes a language L(reg).

Example: a .(b|bb).a . The words with either 1 b or 2 consecutive b’s.

Theorem

For every regular expression reg we can construct a language equivalent NFA of size O(|reg|).

Theorem

For every DFA A we can construct a language equivalent regular

expression reg(A).

(62)

Regular Expressions

Syntax: ∅ |  | a | reg 1 .reg 2 | reg 1 |reg 2 | reg . Every regular expression reg denotes a language L(reg).

Example: a .(b|bb).a . The words with either 1 b or 2 consecutive b’s.

Theorem

For every regular expression reg we can construct a language equivalent NFA of size O(|reg|).

Theorem

For every DFA A we can construct a language equivalent regular

expression reg(A).

(63)

Outline

1 Background: Finite-Word Automata Language Containment

Automata on Finite Words

2 Infinite-Word Automata Automata on Infinite Words Emptiness Checking

3 The Automata-Theoretic Approach to Model Checking Automata-Theoretic LTL Model Checking

From Kripke Structures to Büchi Automata

From LTL Formulas to Büchi Automata: generalities On-the-fly construction of Bu¨chi Automata from LTL Complexity

4 Exercises

(64)

Outline

1 Background: Finite-Word Automata Language Containment

Automata on Finite Words

2 Infinite-Word Automata Automata on Infinite Words Emptiness Checking

3 The Automata-Theoretic Approach to Model Checking Automata-Theoretic LTL Model Checking

From Kripke Structures to Büchi Automata

From LTL Formulas to Büchi Automata: generalities On-the-fly construction of Bu¨chi Automata from LTL Complexity

4 Exercises

(65)

Infinite Word Languages

Modeling infinite computations of reactive systems.

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 . . .

(66)

Infinite Word Languages

Modeling infinite computations of reactive systems.

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 . . .

(67)

Infinite Word Languages

Modeling infinite computations of reactive systems.

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 . . .

(68)

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 ρ.)

(69)

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 ρ.)

(70)

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 ρ.)

(71)

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 ρ.)

(72)

Büchi Automata

Nondeterministic Büchi Automaton

A = (Q, Σ, δ, I, F ), where F ⊆ Q is the set of accepting states.

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 a

i

i+1 for 0 ≤ i.

The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.

The language accepted by A

L(A) = {α ∈ Σ ω | A has an accepting run on α}

(73)

Büchi Automata

Nondeterministic Büchi Automaton

A = (Q, Σ, δ, I, F ), where F ⊆ Q is the set of accepting states.

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 a

i

i+1 for 0 ≤ i.

The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.

The language accepted by A

L(A) = {α ∈ Σ ω | A has an accepting run on α}

(74)

Büchi Automata

Nondeterministic Büchi Automaton

A = (Q, Σ, δ, I, F ), where F ⊆ Q is the set of accepting states.

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 a

i

i+1 for 0 ≤ i.

The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.

The language accepted by A

L(A) = {α ∈ Σ ω | A has an accepting run on α}

(75)

Büchi Automata

Nondeterministic Büchi Automaton

A = (Q, Σ, δ, I, F ), where F ⊆ Q is the set of accepting states.

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 a

i

i+1 for 0 ≤ i.

The run ρ is accepting if Inf (ρ) ∩ F 6= ∅.

The language accepted by A

L(A) = {α ∈ Σ ω | A has an accepting run on α}

(76)

Büchi Automaton: Example

Let Σ = {a, b}.

Let a Deterministic Büchi Automaton (DBA) A 1 be

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.

(77)

Büchi Automaton: Example

Let Σ = {a, b}.

Let a Deterministic Büchi Automaton (DBA) A 1 be

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.

(78)

Büchi Automaton: Example

Let Σ = {a, b}.

Let a Deterministic Büchi Automaton (DBA) A 1 be

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.

(79)

Büchi Automaton: Example (2)

Let a Nondeterministic Büchi Automaton (NBA) A 2 be

With F = {s 2 }, the automaton A 2 recognizes words with finitely many

a. Thus, L(A 2 ) = L(A 1 ).

(80)

Deterministic vs. Nondeterministic Büchi Automata

Theorem

DBAs are strictly less powerful than NBAs.

The subset construction does not work:

let DA 2 be

DA 2 is not equivalent to A 2 (e.g., it recognizes (b.a) ω )

There is no DBA equivalent to A 2

(81)

Deterministic vs. Nondeterministic Büchi Automata

Theorem

DBAs are strictly less powerful than NBAs.

The subset construction does not work:

let DA 2 be

DA 2 is not equivalent to A 2 (e.g., it recognizes (b.a) ω )

There is no DBA equivalent to A 2

(82)

Deterministic vs. Nondeterministic Büchi Automata

Theorem

DBAs are strictly less powerful than NBAs.

The subset construction does not work:

let DA 2 be

DA 2 is not equivalent to A 2 (e.g., it recognizes (b.a) ω )

There is no DBA equivalent to A 2

(83)

Deterministic vs. Nondeterministic Büchi Automata

Theorem

DBAs are strictly less powerful than NBAs.

The subset construction does not work:

let DA 2 be

DA 2 is not equivalent to A 2 (e.g., it recognizes (b.a) ω )

There is no DBA equivalent to A 2

(84)

Closure Properties

Theorem (union, intersection)

For the NBAs A 1 , A 2 we 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.

(85)

Closure Properties

Theorem (union, intersection)

For the NBAs A 1 , A 2 we 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.

(86)

Closure Properties

Theorem (union, intersection)

For the NBAs A 1 , A 2 we 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.

(87)

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 |

Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(same construction as with ordinary automata)

(88)

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 |

Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(same construction as with ordinary automata)

(89)

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 |

Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(same construction as with ordinary automata)

(90)

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 |

Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(same construction as with ordinary automata)

(91)

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 2

R(s, s 0 ) :=

 R 1 (s, s 0 ) if s ∈ Q 1 R 2 (s, s 0 ) if s ∈ Q 2

Theorem

L(A) = L(A 1 ) ∪ L(A 2 )

|A| = |A 1 | + |A 2 |

Note

A is an automaton which just runs nondeterministically either A 1 or A 2

(same construction as with ordinary automata)

(92)

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 0 and q −→ q a 0 and p 6∈ F 1 . hp, q, 1i −→ hp a 0 , q 0 , 2i iff p −→ p a 0 and q −→ q a 0 and p ∈ F 1 . hp, q, 2i −→ hp a 0 , q 0 , 2i iff p −→ p a 0 and q −→ q a 0 and q 6∈ F 2 . hp, q, 2i −→ hp a 0 , q 0 , 1i iff p −→ p a 0 and q −→ q a 0 and q ∈ F 2 . Theorem

L(A 1 × A 2 ) = L(A 1 ) ∩ L(A 2 ).

|A 1 × A 2 | ≤ 2 · |A 1 | · |A 2 |.

(93)

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 0 and q −→ q a 0 and p 6∈ F 1 . hp, q, 1i −→ hp a 0 , q 0 , 2i iff p −→ p a 0 and q −→ q a 0 and p ∈ F 1 . hp, q, 2i −→ hp a 0 , q 0 , 2i iff p −→ p a 0 and q −→ q a 0 and q 6∈ F 2 . hp, q, 2i −→ hp a 0 , q 0 , 1i iff p −→ p a 0 and q −→ q a 0 and q ∈ F 2 . Theorem

L(A 1 × A 2 ) = L(A 1 ) ∩ L(A 2 ).

|A 1 × A 2 | ≤ 2 · |A 1 | · |A 2 |.

(94)

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 2

Important subcase: If F 2 = Q 2 , then Q = Q 1 × Q 2 .

I = I 1 × I 2 .

F = F 1 × Q 2 .

(95)

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 2

Important subcase: If F 2 = Q 2 , then Q = Q 1 × Q 2 .

I = I 1 × I 2 .

F = F 1 × Q 2 .

(96)

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 2

Important subcase: If F 2 = Q 2 , then Q = Q 1 × Q 2 .

I = I 1 × I 2 .

F = F 1 × Q 2 .

(97)

Product of NBAs: Example

(98)

Product of NBAs: Example

(99)

Closure Properties (2)

Theorem (complementation) [Safra, MacNaughten]

For the NBA A 1 we can construct an NBA A 2 such that L(A 2 ) = L(A 1 ).

|A 2 | = O(2 |A

1

|·log(|A

1

|) ).

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.

(100)

Closure Properties (2)

Theorem (complementation) [Safra, MacNaughten]

For the NBA A 1 we can construct an NBA A 2 such that L(A 2 ) = L(A 1 ).

|A 2 | = O(2 |A

1

|·log(|A

1

|) ).

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.

(101)

Closure Properties (2)

Theorem (complementation) [Safra, MacNaughten]

For the NBA A 1 we can construct an NBA A 2 such that L(A 2 ) = L(A 1 ).

|A 2 | = O(2 |A

1

|·log(|A

1

|) ).

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.

(102)

Closure Properties (2)

Theorem (complementation) [Safra, MacNaughten]

For the NBA A 1 we can construct an NBA A 2 such that L(A 2 ) = L(A 1 ).

|A 2 | = O(2 |A

1

|·log(|A

1

|) ).

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.

(103)

Closure Properties (2)

Theorem (complementation) [Safra, MacNaughten]

For the NBA A 1 we can construct an NBA A 2 such that L(A 2 ) = L(A 1 ).

|A 2 | = O(2 |A

1

|·log(|A

1

|) ).

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.

(104)

Generalized Büchi Automaton

Definition

A Generalized Büchi Automaton is a tuple A := (Q, Σ, δ, I, FT ) where FT = hF 1 , F 2 , . . . , F k i with F i ⊆ Q.

A run ρ of A is accepting if Inf (ρ) ∩ F i 6= ∅ 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 + 1)mod K mode.

(105)

Generalized Büchi Automaton

Definition

A Generalized Büchi Automaton is a tuple A := (Q, Σ, δ, I, FT ) where FT = hF 1 , F 2 , . . . , F k i with F i ⊆ Q.

A run ρ of A is accepting if Inf (ρ) ∩ F i 6= ∅ 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 + 1)mod K mode.

(106)

Generalized Büchi Automaton

Definition

A Generalized Büchi Automaton is a tuple A := (Q, Σ, δ, I, FT ) where FT = hF 1 , F 2 , . . . , F k i with F i ⊆ Q.

A run ρ of A is accepting if Inf (ρ) ∩ F i 6= ∅ 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 + 1)mod K mode.

Riferimenti

Documenti correlati

handle temporal operators AX, EX by computing pre-images handle temporal operators AG, EG, AF, EF, AU, EU, by (implicitly) applying tableaux rules, until a fixpoint is reached..

Kripke structure encoded as Boolean formulas (OBDDs) All operations handled as (quantified) Boolean operations Avoids building the state graph explicitly. reduces dramatically the

(E.g., 300 Boolean vars =⇒ up to 2 300 ≈ 10 100 states!) State Space Explosion:.. too much

Given a fair Kripke model M, a fair non-trivial SCC is an SCC with at least one edge that contains at least one state for every fair condition. =⇒ all states in a fair (non-trivial)

Example: although state 3 belongs to sat(¬heat Uclose), the path which loops forever in 3 does not satisfy ¬heatUclose, as close never holds in that path. We restrict the

[Alternatively: there is no positive U-subformula, so that we must add a AGAF&gt; fairness condition, which is equivalent to say that all states belong to the fairness

Given the following generalized Büchi automaton A def = hQ, Σ, δ, I, FT i, with two sets of accepting states FT def = {F 1, F 2} s.t.. Ex:

limited sensitivity: one good setting, does not require expert users much higher capacity (more variables) than BDD based techniques Various techniques: Bounded Model