+ All Categories
Home > Documents > About Alternating Automata

About Alternating Automata

Date post: 24-Feb-2016
Category:
Upload: mairi
View: 59 times
Download: 0 times
Share this document with a friend
Description:
About Alternating Automata. Daniel Choi Provable Software Laboratory KAIST. Overview. OK. Target Program . or. Model Checking. Requirement Properties. (F W). Error Trace Found. Model checking Specify requirement properties and build system model - PowerPoint PPT Presentation
Popular Tags:
33
About Alternating Automata Daniel Choi Provable Software Laboratory KAIST
Transcript
Page 1: About Alternating Automata

About Alternating Autom-ata

Daniel ChoiProvable Software Laboratory

KAIST

Page 2: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Overview

2/33

• Model checking– Specify requirement properties and build system model– Generate possible states from the model and then check

whether given requirement properties are satisfied within the state space

OK

Error TraceFound

or

TargetProgram

RequirementProperties

Model Checking

(F W)

Page 3: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Overview

3/33

Model Checking

Target Program Requirement

Properties

(F W)

Page 4: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Overview

4/33

LTL to Büchi Automata

LTL Formula

Negated Formula Au-tomaton

Is there a smarter way to

express LTL formula?

State Explo-sion!!

Alternating Autom-ata

Vardi ’96, ‘97

Page 5: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Content• Branching Choices in Automaton

– Existential Choice– Universal Choice

• Alternating Automata

• Translate LTL into Alternating Automata

• Future study & Conclusion5/33

Page 6: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Branching Choices in AutomatonExistential Choice

• Automaton A– Accepts an input word w iff there exists

an accepting run of A on w

6/33

41 2A

B

3

B

A

Automaton A

A

Input word : A+Bω

Run 1: 1+2ω

Run 2: 1+3ω

• Run 1 is accepting run• Run 2 is not accepting run

Page 7: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Branching Choices in AutomatonUniversal Choice

• Automaton A– Accepts an input word w iff all the runs

of A on input word w are accepting

7/33

41 2A

B

B

AInput word : A+Bω

Run 1: 1+2ω

Run 2: 1+3ω

Automaton A 43

A

• Run 1 is accepting run• Run 2 is accepting run

Page 8: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

• Deterministic automaton has unique ac-cepting run on input word– Existential Choice

• There exist one accepting run on input word – Universal Choice

• There is unique accepting run

8/33

Branching Choices in AutomatonDeterministic Automaton

41 2 3A

C

AB,C

B

Input word : AAB

Run : 123Deterministic automaton has Existential branching choice and Universal branch-

ing choice (Trivially)

Page 9: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Branching Choices in AutomatonBranching Choices of Several Automatons

• Nondeterministic Automaton– Existential branching choice

• For-all Automaton (Z. Mannar, A. Pruneli, 1987)– Nondeterministic automaton

• Trivial existential branching choice– Universal branching choice

• Alternating Automaton– Allows both existential and universal branching

choices

9/33

Page 10: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Content• Branching Choices in Automaton

– Existential Choice– Universal Choice

• Alternating Automata

• Translate LTL into Alternating Automata

• Future study & Conclusion10/33

Page 11: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataPositive Boolean formulas

• Positive Formulas– Formula that does not contain the negation symbol– Closed under conjunction and disjunction

• Definition of B+(Q)– Set of positive Boolean formulas over Q– Boolean formulas built from elements in Q using ∧ and ∨– true and false are allowed– When Y⊆Q, Y satisfies a formula θ ∈ B+(Q) iff the truth

assignment that assigns true to the members of Y and assigns false to the members of Q\Y satisfies θ

11/33

Page 12: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataExample of B+(Q)

• Q = {q1, q2, q3}• θ = (q1 ∨ q2) ∧ q3 ∈ B+(Q)

• {q1, q3} satisfies θ – Assign true to q1 and q3

– Assign false to Q – {q1, q3} θ = (q1 ∨ q2) ∧ q3 = (true ∨ false) ∧ true = true

• {q1, q2} does not satisfies θ– Assign true to q1 and q2

– Assign false to Q – {q1, q2} θ = (q1 ∨ q2) ∧ q3 = (true ∨ true) ∧ false = false

12/33

Page 13: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataDefinition of Alternating Automata

• A = (Σ, S, s0, ρ, F)– Σ: finite nonempty alphabet– S : finite nonempty set of states– s0 : initial state S (unique initial state)– F : set of accepting states– Transition function ρ: S XΣ→B+(S )

13/33

Page 14: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

• Transitions of Alternating automata can be arbitrary formulas in B+(Q)

• ρ(s, a) = (s1 ∧ s2) ∨ (s3 ∧ s4)– When it is in the state s, automaton accepts aw

If it accepts the word w from both s1 and s2 or from both s3 and s4

14/33

Alternating AutomataTransition of Alternating Automata

Page 15: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataExample of transition

• ρ(s, A) = (s1 ∧ s2) ∨ s• ρ(s, B) = false• ρ(s1, A) = s1 ρ(s2, A) = s2• ρ(s1, B) = true ρ(s2, B) = true

15/33

4s s1A

B

B

A

Automaton A 4s2

Input word : AAB

A

s

s

s1 s2

A

s1 s2

A

B

Page 16: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataDefinition of Tree

• Due to the universal choice, run of an alternating au-tomaton is a tree

• Definition– Tree has one node as a root (denoted by ε)– Every non-root node has a unique parent

• s is the parent of t and t is a child of s if there is an edge from s to t

– Level |x| : distance from the root ε to x• level of root is 0

– Branch β = x0, x1, … • a maximal sequence of nodes s.t. x0 is root and xi is the parent of

xi+1 for all i > 0

16/33

Page 17: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataExample of Tree

• Root : s0

• s0 is parent of s1 and s1 is child of s0

• Level of s2 : |s2| = 2• Branch β1 = s0 s1 s2

s3

• Branch β2 = s0 s1 s4 s5

17/33

s0

s1

s2 s4

s3 s5

Page 18: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataRun of Alternating Finite Automata

• Run of Alternating Finite Automata A– Run of AFA is Σ-labeled tree (τ,T )

• For a finite alphabet where τ is a tree and T is a mapping from nodes(τ) to Σ

– Run of A on finite word w=a0,a1,…,an-1• When r is S-labeled tree,

– If |x| = i < n, r(x) = s, and ρ(s, ai) = θ, then x has k children x1, …, xk for some k ≤ |S |, and {r(x1), …, r(xk)} satisfies θ

• If ρ(r(x), ai) = true, then x does not need to have any children

• If ρ(r(x), ai) = false, then x can not have any children

18/33

Page 19: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataRun of Alternating Büchi Automata

• Run of Alternating Büchi Automata A– Run of ABA is Σ-labeled tree (τ,T )

• For a finite alphabet where τ is a tree and T is a mapping from nodes(τ) to Σ

– Run of A on infinite word w=a0,a1,…,an-1• When r is S-labeled tree,

– If |x| = i, r(x) = s, and ρ(s, ai) = θ, then x has k children x1, …, xk for some k ≤ |S |, and {r(x1), …, r(xk)} satisfies θ

• If ρ(r(x), ai) = true, then x does not need to have any children

• If ρ(r(x), ai) = false, then x can not have any children

19/33

Page 20: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating Automata AFA vs ABA

• Accepting Run– Every branch in an accepting run has to hit the

true transition or hit an accepting state after reading all the input word

• Accepting Run of ABA– Every infinite branch in r includes infinitely

many labels in F– Or, run can also have finite branches

if |x| = i, r(x) = s, and ρ(s, ai) = true

20/33

Page 21: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataExample: AFA and ABA

21/33

• ρ(s, A) = (s1 ∧ s2) ∨ s• ρ(s, B) = false• ρ(s1, A) = s1 ρ(s2, A) = s2• ρ(s1, B) = true ρ(s2, B) = true

4s s1A

B

B

A

Automaton A 4s2

A

s

s

s1 s2

s1 s2

s

s

s1 s2

s1 s2

Input word : AAB

Input word : AABω

Page 22: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Alternating AutomataExample: AFA and ABA

22/33

• ρ(s, A) = (s1 ∧ s2) ∨ s• ρ(s, B) = false• ρ(s1, A) = s1 ρ(s2, A) = s2• ρ(s1, B) = s1 ρ(s2, B) = s2

4s s1A

B

B

A

Automaton A 4s2

A

s

s

s1 s2

s1 s2

s

s

s1 s2

s1 s2

Input word : AAB

Input word : AABω

… …

Page 23: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Content• Branching Choices in Automaton

– Existential Choice– Universal Choice

• Alternating Automata

• Translate LTL into Alternating Automata

• Future study & Conclusion23/33

Page 24: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Translate LTL into Alternating Autom-ata

Meaning of ABA which denotes LTL formula• LTL formula φ, ABA Aφ = (Σ, S, s0, ρ, F)

– Σ = 2Prop

– S: Set of states (S consist all subformulas of and their negation)• |S| is in O(|φ|)

– Initial state : s0

– Set F of accepting states consists of all formulas in S of the form ¬(φ1 U φ2 )

• φ1 U φ2 does not ensure that φ1 U φ2 holds at that point, since it does not en-sure that eventually holds φ2

• ¬(φ1 U φ2 ) ensures that φ1 U φ2 indeed fails at that point, since φ2 fails from that point on

24/33

Page 25: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Translate LTL into Alternating Autom-ata

Transition function• Transition function ρ

25/33

Page 26: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Translate LTL into Alternating Büchi AutomataExample : Eventually p

• φ = true U p

• Aφ = (2{p}, {φ, ¬φ, ¬p, p}, φ, ρ, {¬φ})

26/33

s ρ(s, {p})

ρ(s, {})

φ true φ

¬φ false ¬φ

p true false¬p false true

Page 27: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST 27/33

Translate LTL into Alternating Büchi AutomataExample : ㅁ⋄ p

• LTL formula φ, ABA Aφ = (Σ, S, s0, ρ, F) – Σ = 2{p}

– S: { ㅁ⋄ p, ¬ ㅁ⋄ p, ⋄p, ¬⋄p, p, ¬p}– s0 : ㅁ⋄ p– F: {¬(true U ¬⋄p), ¬⋄p}

– ρ(true U ¬⋄p, a) = ¬ (ρ(⋄p, a))∨(ρ(true, a) ∧true U ¬⋄p) = ¬ (ρ(true U p, a))∨(true U ¬⋄p)= ¬ (ρ(p, a) ∨ (ρ(true, a) ∧⋄p))∨(true U ¬⋄p)= ¬ (ρ(p, a) ∨⋄p)∨(true U ¬⋄p)

– ρ(¬(true U ¬⋄p), a) = ¬ (ρ(⋄p, a))∨(ρ(true, a) ∧true U ¬⋄p) = ¬ (ρ(true U p, a))∨(true U ¬⋄p)= ¬ (ρ(p, a) ∨ (ρ(true, a) ∧⋄p))∨(true U ¬⋄p)= (ρ(p, a) ∨⋄p)∧ ¬(true U ¬⋄p)

Page 28: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST 28/33

s ρ(s, {p}) ρ(s, {})φ φ ⋄p ∧ φ¬φ ¬φ ¬⋄p ∨ ¬φ

⋄p true ⋄p¬⋄p false ¬⋄pp true false¬p false true

Translate LTL into Alternating Büchi AutomataExample : ㅁ⋄ p

Aφ = (Σ, S, s0, ρ, F)Σ = 2{p}

S: { ㅁ⋄ p, ¬ ㅁ⋄ p, ⋄p, ¬⋄p, p, ¬p}s0 : ㅁ⋄ pF: {¬(true U ¬⋄p), ¬⋄p}

Input: ¬p, ¬p, p, …

φ

⋄p φ

⋄p ⋄p φ

φ

Page 29: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

• Compare with Generalized Büchi Automa-ton

29/33

Translate LTL into Alternating Büchi AutomataExample : ㅁ⋄ p

Page 30: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Content• Branching Choices in Automaton

– Existential Choice– Universal Choice

• Alternating Automata

• Translate LTL into Alternating Automata

• Future study & Conclusion30/33

Page 31: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Conclusion• Size of alternating automaton

– Linear in the size of formula (exponentially succinct)

• Alternating automata have same expressive power as nondeterministic automata

• Translate specification into alternating Büchi au-tomaton– automaton is simplified– Translate simplified automaton into a nondeterminis-

tic Büchi automaton

31/33

Page 32: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Future study• Study about other variation of Alternating Automata

– Weak Alternating Automata– Two-way Alternating Automata– Alternating Tree Automata

• Other properties of Alternating Automata– Memoryless property– Fixed point logic and alternating automata– Converting alternating Büchi automata to nondeterministic Büchi

automata

• Alternating-time Temporal Logic– R. Alur, T. Henzinger and Kupferman, “Alternating-time Temporal

Logic,” COMPOS’97

32/33

Page 33: About Alternating Automata

About Alternating Automata, Daniel Choi @ PSWLAB, KAIST

Reference• Checking Finite Traces using Alternating Automata

by Bernd Finkbeiner and Henny Sipma In FMSD Vol. 24, Issue 2 (March 2004)

• Weak Alternating Automata Are Not That Weakby Orna Kupferman and Moshe Y. Vardi In ISTCS'97

• An Automata Theoretic Approach to Linear Temporal Logicby Moshe Y. Vardi In BANFF’94

• Tree Automata Technique and Applications, Chapter 7by H. Comon, M Dauchet, R. Gilleron, F Jacquemard, D. Lugiez, S. Tison and M. Tommasi, At http://www.grappa.univ-lille3.fr/tata/

33/33


Recommended