370 likes | 637 Views
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
E N D
About Alternating Automata Daniel Choi Provable Software Laboratory KAIST
Overview OK Target Program or Model Checking Requirement Properties (F W) Error TraceFound About Alternating Automata, Daniel Choi @ PSWLAB, KAIST • 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
Overview Model Checking Requirement Properties Target Program (F W) About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Overview Alternating AutomataVardi ’96, ‘97 LTL Formula State Explosion!! LTL to Büchi Automata Is there a smarter way to express LTL formula? Negated Formula Automaton 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 & Conclusion About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Branching Choices in AutomatonExistential Choice A B Input word : A+Bω 4 A 1 2 Run 1: 1+2ω A B Run 2: 1+3ω Automaton A 3 • Run 1 is accepting run • Run 2 is not accepting run About Alternating Automata, Daniel Choi @ PSWLAB, KAIST • Automaton A • Accepts an input word wiff there exists an accepting run of A on w
Branching Choices in AutomatonUniversal Choice A B Input word : A+Bω 4 A 1 2 Run 1: 1+2ω A B Run 2: 1+3ω Automaton A 4 3 • Run 1 is accepting run • Run 2 is accepting run • Automaton A • Accepts an input word wiff all the runs of A on input word ware accepting About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Branching Choices in AutomatonDeterministic Automaton Deterministic automaton has Existential branching choice and Universal branching choice (Trivially) Input word : AAB A B,C A Run : 123 B 4 1 2 3 C • Deterministic automaton has unique accepting run on input word • Existential Choice • There exist one accepting run on input word • Universal Choice • There is unique accepting run 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 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 & Conclusion 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 θ 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 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 ) About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Alternating AutomataTransition of 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 awIf it accepts the word w from both s1and s2 or from both s3 and s4
Alternating AutomataExample of transition Input word : AAB A B s 4 A s s1 A A B s Automaton A A 4 s2 s1 s2 B s1 s2 About Alternating Automata, Daniel Choi @ PSWLAB, KAIST ρ(s, A) = (s1 ∧ s2) ∨ s ρ(s, B) = false ρ(s1, A) = s1ρ(s2, A) = s2 ρ(s1, B) = trueρ(s2, B) = true
Alternating AutomataDefinition of Tree • Due to the universal choice, run of an alternating automaton is a tree • Definition • Tree has one node as a root (denoted by ε) • Every non-root node has a unique parent • sis 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 About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Alternating AutomataExample of Tree s0 s1 s2 s4 s3 s5 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 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 forsomek ≤ |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 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 forsomek ≤ |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 About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Alternating Automata AFA vsABA • 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 branchesif |x| = i, r(x) = s, and ρ(s, ai) = true About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Alternating AutomataExample: AFA and ABA A B s s 4 A s s1 A s s 4 s2 B Automaton A s1 s2 s1 s2 s1 s2 s1 s2 Input word : AAB Input word : AABω ρ(s, A) = (s1 ∧ s2) ∨ s ρ(s, B) = false ρ(s1, A) = s1ρ(s2, A) = s2 ρ(s1, B) = trueρ(s2, B) = true About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Alternating AutomataExample: AFA and ABA A B s s 4 A s s1 A s s 4 s2 B Automaton A s1 s2 s1 s2 s1 s2 s1 s2 … … Input word : AAB Input word : AABω About Alternating Automata, Daniel Choi @ PSWLAB, KAIST ρ(s, A) = (s1 ∧ s2) ∨ s ρ(s, B) = false ρ(s1, A) = s1ρ(s2, A) = s2 ρ(s1, B) = s1ρ(s2, B) = s2
Content • Branching Choices in Automaton • Existential Choice • Universal Choice • Alternating Automata • Translate LTL into Alternating Automata • Future study & Conclusion About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Translate LTL into Alternating AutomataMeaning 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 ensure that eventually holds φ2 • ¬(φ1 U φ2 ) ensures that φ1 U φ2 indeed fails at that point, since φ2 fails from that point on About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Translate LTL into Alternating AutomataTransition function Transition function ρ About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Translate LTL into Alternating Büchi AutomataExample : Eventually p φ = true U p Aφ = (2{p}, {φ,¬φ, ¬p, p},φ, ρ, {¬φ}) About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Translate LTL into Alternating Büchi AutomataExample : ㅁ⋄p About Alternating Automata, Daniel Choi @ PSWLAB, KAIST • LTL formula φ, ABA Aφ= (Σ, S, s0, ρ, F) • Σ = 2{p} • S: {ㅁ⋄p, ¬ㅁ⋄p, ⋄p, ¬⋄p,p, ¬p} • s0:ㅁ⋄p • F: {¬(true U ¬⋄p), ¬⋄p} • ρ(trueU ¬⋄p, a) = ¬ (ρ(⋄p, a))∨(ρ(true, a)∧true U ¬⋄p) = ¬ (ρ(true U p, a))∨(trueU ¬⋄p)= ¬ (ρ(p, a)∨ (ρ(true, a)∧⋄p))∨(true U ¬⋄p)= ¬ (ρ(p, a)∨⋄p)∨(true U ¬⋄p) • ρ(¬(trueU ¬⋄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)
Translate LTL into Alternating Büchi AutomataExample : ㅁ⋄p • Aφ = (Σ, S, s0, ρ, F) • Σ = 2{p} • S: {ㅁ⋄p, ¬ㅁ⋄p, ⋄p, ¬⋄p,p, ¬p} • s0 :ㅁ⋄p • F: {¬(true U ¬⋄p), ¬⋄p} φ ⋄p φ ⋄p ⋄p φ φ … Input: ¬p, ¬p, p, … About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Translate LTL into Alternating Büchi AutomataExample : ㅁ⋄p About Alternating Automata, Daniel Choi @ PSWLAB, KAIST Compare with Generalized Büchi Automaton
Content • Branching Choices in Automaton • Existential Choice • Universal Choice • Alternating Automata • Translate LTL into Alternating Automata • Future study & Conclusion 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üchiautomaton • automaton is simplified • Translate simplified automaton into a nondeterministic Büchiautomaton 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 • Memorylessproperty • Fixed point logic and alternating automata • Converting alternating Büchiautomata to nondeterministic Büchiautomata • Alternating-time Temporal Logic • R. Alur, T. Henzinger and Kupferman, “Alternating-time Temporal Logic,” COMPOS’97 About Alternating Automata, Daniel Choi @ PSWLAB, KAIST
Reference Checking Finite Traces using Alternating Automataby Bernd Finkbeiner and HennySipma In FMSD Vol. 24, Issue 2 (March 2004) Weak Alternating Automata Are Not That Weakby OrnaKupferman 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/ About Alternating Automata, Daniel Choi @ PSWLAB, KAIST