• Tidak ada hasil yang ditemukan

Automata on Infinite Words

Dalam dokumen The MIT Press Principles of Model Checking (Halaman 189-193)

Regular Properties

Definition 4.11. Regular Safety Property

4.3 Automata on Infinite Words

Proof: Follows directly from the fact that the number of states in the product automaton TS⊗ Ais in O(|S|·|Q|) (whereS and Qdenote the state space ofTSandA, respectively) and the fact that the time and space complexity of invariant checking is linear in the number of states and transitions of the transition system TS⊗ A. (Thus, we can even establish the boundO(|S|·|Q|+| → |·|δ|) for the runtime where| → |denotes the number of transitions in TSand |δ|the number of transitions inA.)

Automata on Infinite Words 171 To reason about languages of infinite words, the basic operations of regular expressions (union, concatenation, and finite repetition) are extended by infinite repetition, denoted by the Greek letter ω.2 For instance, the infinite repetition of the finite word AB yields the infinite word ABABABABAB. . . (ad infinitum) and is denoted by (AB)ω. For the special case of the empty word, we have εω = ε. For an infinite word, infinite repetition has no effect, that is, σω =σ ifσ Σω. Note that the finite repetition of a word results in a language of finite words, i.e., a subset of Σ, whereas infinite repetition of a (finite or infinite) word results in a single word.

Infinite repetition can be lifted to languages as follows. For language L ⊆ Σ, let Lω be the set of words in ΣΣω that arise from the infinite concatenation of (arbitrary) words in Σ, i.e.,

Lω = {w1w2w3. . .|wi∈ L, i1}.

The result is an ω-language, provided that L ⊆ Σ+, i.e., L does not contain the empty word ε. However, in the sequel, we only need the ω-operator applied to languages of finite words that do not contain the empty word. In this case, i.e., for L ⊆Σ+, we have LωΣω.

In the following definition, the concatenation operator L1.L2 is used that combines a languageL1 of finite words with a languageL2 of infinite words. It is defined byL1.L2= {wσ |w∈ L1, σ∈ L2}.

Definition 4.23. ω-Regular Expression

An ω-regular expression Gover the alphabet Σ has the form G=E1.Fω1 +. . .+En.Fωn

wheren1 andE1, . . . ,En,F1, . . . ,Fn are regular expressions over Σ such thatε /∈ L(Fi), for all 1in.

The semantics of the ω-regular expression Gis a language of infinite words, defined by Lω(G) = L(E1).L(F1)ω∪. . .∪ L(En).L(Fn)ω

whereL(E)Σ denotes the language (of finite words) induced by the regular expression E(see page 914).

Twoω-regular expressionsG1andG2areequivalent, denotedG1 G2, ifLω(G1) =Lω(G2).

2The symbolωdenotes the first infinite ordinal. It already appeared in the notation Σω for the set of infinite words over the alphabet Σ.

Examples for ω-regular expressions over the alphabet Σ ={A,B,C} are (A+B)A(AAB+C)ω or A(B+C)Aω+B(A+C)ω.

If E is a regular expression with ε /∈ L(E), then also Eω can be viewed as an ω-regular expression since it can be identified with E.Eω or ε.Eω. Note that we have L(E)ω = L(E.Eω) =L(ε.Eω).

Definition 4.24. ω-Regular Language

A languageL ⊆Σω is called ω-regular ifL=Lω(G) for someω-regular expressionGover Σ.

For instance, the language consisting of all infinite words over{A,B}that contain infinitely many A’s is ω-regular since it is given by the ω-regular expression (BA)ω. The language consisting of all infinite words over {A,B}that contain only finitely manyA’s isω-regular too. A correspondingω-regular expression is (A+B)Bω. The empty set isω-regular since it is obtained, e.g., by the ω-regular expression ∅ω. More generally, if L ⊆Σ is regular and L isω-regular, then Lω and L.L areω-regular.

ω-Regular languages possess several closure properties: they are closed under union, inter- section, and complementation. The argument for union is obvious from the definition by ω-regular expressions. The proof for the intersection will be provided later; see Corollary 4.60 on page 198. The more advanced proof for complementation is not provided in this monograph. We refer the interested reader to [174] that covers also other properties of ω-regular languages and various other automata models.

The concepts of ω-regular languages play an important role in verification since most relevant LT properties are ω-regular:

Definition 4.25. ω-Regular Properties

LT propertyP overAPis calledω-regular ifP is anω-regular language over the alphabet 2AP.

For instance, for AP ={a, b}, the invariant Pinv induced by the proposition Φ =a∨ ¬b is anω-regular property since

Pinv =

A0A1A2. . .∈(2AP)ω | ∀i0.(a∈Ai orb /∈Ai)

=

A0A1A2. . .∈(2AP)ω | ∀i0.(Ai∈ {{},{a},{a, b}}

Automata on Infinite Words 173 is given by theω-regular expressionE= ({}+{a}+{a, b})ω over the alphabet Σ = 2AP= {{},{a},{b},{a, b}}. In fact, any invariant over AP is ω-regular (the set AP of atomic propositions is arbitrary) as it can be described by the ω-regular expression Φω where Φ denotes the underlying propositional formula (that has to hold for all reachable states) and is identified with the regular expression given by the sum of allA⊆AP withA|= Φ.

Also, any regular safety propertyPsafeis anω-regular property. This follows from the fact that the complement language

(2AP)ω\Psafe = BadPref(Psafe)

regular

.(2AP)ω

is an ω-regular language. The result that ω-regular languages are closed under comple- mentation (stated above, in the end of Section 4.3.1 on page 172) yields the claim.

Example 4.26. Mutual Exclusion

Another example of an ω-regular property is the property given by the informal statement

“process P visits its critical section infinitely often” which, forAP={wait,crit}, can be formalized by the ω-regular expression:

(({} +{wait}

negative literal¬crit

).({crit}+{wait,crit}

positive literalcrit

))ω.

When allowing a somewhat sloppy notation using propositional formulae, the above ex- pression may be rewritten into ((¬crit).crit)ω.

Starvation freedom in the sense of “whenever process P is waiting then it will enter its critical section eventually later” is an ω-regular property as it can be described by

((¬wait).wait.true.crit)ω + ((¬wait).wait.true.crit).(¬wait)ω

which is a short form for the ω-regular expression over AP={wait,crit} that results by replacing ¬wait with{}+{crit}, wait with{wait}+{wait,crit}, true with{}+{crit}+ {wait}+{wait,crit}, and critwith{crit}+{wait,crit}. Intuitively, the first summand in the above expression stands for the case where P requests and enters its critical section infinitely often, while the second summand stands for the case where P is in its waiting phase only finitely many times.

4.3.2 Nondeterministic B¨uchi Automata

The issue now is to provide a kind of automaton that is suited for accepting ω-regular languages. Finite automata are not adequate for this purpose as they operate on finite

words, while we need an acceptor for infinite words. Automata models that recognize languages of infinite words are called ω-automata. The accepting runs of anω-automaton have to “check” the entire input word (and not just a finite prefix thereof), and thus have to be infinite. This implies that acceptance criteria for infinite runs are needed.

In this monograph, the simplest variant of ω-automata, called nondeterministic B¨uchi automata (NBAs), suffices. The syntax of NBAs is exactly the same as for nondeterministic finite automata (NFAs). NBAs and NFAs differ, however, in their semantics: the accepted language of an NFAAis a language of finite words, i.e.,L(A)Σ, whereas the accepted language of NBA A (denoted Lω(A) is an ω-language, i.e., Lω(A) Σω. The intuitive meaning of the acceptance criterion named after B¨uchi is that the accept set ofA(i.e., the set of accept states in A) has to be visited infinitely often. Thus, the accepted language Lω(A) consists of all infinite words that have a run in which some accept state is visited infinitely often.

Dalam dokumen The MIT Press Principles of Model Checking (Halaman 189-193)