Modeling and Verification of Concurrent Systems: The Verification Phase

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Automata on finite words

Regular safe linear-time properties


Liveness properties: automata on infinite words

Modeling and Verification of Concurrent Systems:


the verification phase

Claude JARD

University of Nantes

Course 2 – November 2019

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Refresh your memory: automata on finite words

A nondeterministic finite automaton (NFA) A is a tuple


(Q, Σ, δ, Q0 , F ) where:
Q is a finite set of states
Σ is an alphabet
δ : Q × Σ → 2Q is a transition function
Q0 ⊆ Q a set of initial states
F ⊆ Q is a set of accept (or final) states

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Language of an NFA

NFA A = (Q, Σ, δ, Q0 , F ) and word w = A1 ...An ∈ Σ∗


An accepted run for w in A is a finite sequence q0 q1 ...qn such
Ai+1
that: q0 ∈ Q0 and qi → qi+1 for all 0 ≤ i < n, and qn ∈ F
w ∈ Σ∗ is accepted by A if there exists an accepting run for w
L(A) = {w ∈ Σ∗ } such that there exists an accepting run for
w in A
NFA A and A0 are equivalent if L(A) = L(A0 )

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Language of an NFA

They are closed under intersection and complementation


They are closed under determinization
L(A) = ∅? = check for a reachable accept state in A and this
can be done using a simple depth-first search
For regular language L there is a unique minimal Deterministic
Finite Automaton (DFA) accepting L

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Regular property of mutual exclusion

How to establish that Mutex TS satisfies the mutex property?


Basic idea: synchronize TS with the automata of the negation of
the property, and check if the corresponding language is empty.

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Example of product

Time complexity: |TS| × |A|

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Negation of liveness expressed by Buchi automata

Introduction of repeated states instead of terminal (accepting)


states

Checking liveness is checking emptyset of the product in term of


languages of infinite words

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Language of a non-deterministic Buchi automaton (NBA)

NBA A = (Q, Σ, δ, Q0 , F ) and word σ = A0 A1 A2 ... ∈ Σω


An accepted run for σ in A is an infinite sequence q0 q1 q2 ...
Ai+1
such that: q0 ∈ Q0 and qi → qi+1 for all 0 ≥ i, and qi ∈ F
for infinitely many i
σ ∈ Σω is accepted by A if there exists an accepting run for σ
The accepted language of A: Lω (A) = {σ ∈ Σω | there exists
an accepting run for σ in A}
NBA A and A0 are equivalent if Lω (A) = Lω (A0 )

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Verification of liveness properties

Build the product with the negation of the property a usual


(we obtain a new Buchi automaton)
Compute the loops and check if they contains a repeated state
Recall: can be achieved by a nested depth-first search (DFS)
[Tarjan]
Time complexity: linear in the size of the product

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio


Automata on finite words
Regular safe linear-time properties
Liveness properties: automata on infinite words

Exercise 4

The class of deterministic Buchi automata (DBA) is not equivalent


to the class of non-deterministic automata (NBA), in contrast with
the finite case
Consider the alphabet {a, b}
Find a DBA accepting words containing an infinite number of
b
The complemented language is formed with words ending with
an infinite number of a, find a DBA accepting it
Find a NBA accepting it

Claude JARD Modeling and Verification of Concurrent Systems: the verificatio

You might also like