Antichains: A New Algorithm for Checking Universality of Finite Automata Laurent Doyen Universit´ e Libre de Bruxelles Joint work with Martin De Wulf, Tom Henzinger, Jean-Fran¸ cois Raskin CAV, Seattle, 17th August, 2006
Outline of the talk • Motivation • Universality - A Game Approach • Example • Experimental Results • Conclusion
Finite State Automaton Finite automaton: A = � Loc , ℓ I , Σ , δ, F � with δ : Loc × Σ → 2 Loc (non-deterministic) 0 ℓ 1 0 , 1 1 0 1 0 , 1 ℓ 0 ℓ 3 ℓ 4 0 0 ℓ 2 1 w ∈ L ( A ) iff some path on w accepts . For w ∈ Σ ∗ , we have w �∈ L ( A ) iff all paths on w reject .
Language Inclusion and Universality An implementation A of a program is correct with regard to its specification B if: L ( A ) ⊆ L ( B ) non-deterministic deterministic
Language Inclusion and Universality L ( A ) ⊆ L ( B ) iff L ( A ∩ B c ) is empty • Computing B c : hard (via determinization) • Checking emptiness: easy iff L ( A c ∪ B ) is universal • Computing A c : easy • Checking universality: hard
Language Inclusion and Universality L ( A ) ⊆ L ( B ) iff L ( A ∩ B c ) is empty • Computing B c : hard (via determinization) • Checking emptiness: easy iff L ( A c ∪ B ) is universal • Computing A c : easy • Checking universality: hard not so hard in practice with antichains.
Universality - Experimental results Antichains 12 dk.brics.automaton Execution time (s) 10 8 6 4 2 0 0 500 1000 1500 2000 2500 3000 3500 4000 Number of states
Universality - Experimental results 12 Antichains dk.brics.automaton 10 Execution Time (s) 1500 1000 500 0 50 100 150 2000 2500 3000 3500 4000 Number of states
Universality - Exexution times (in milliseconds) Number of states 20 40 60 80 100 175 500 Determinization 23 50 141 309 583 2257 - Antichains 1 2 2 3 5 14 76 Number of states 1000 1500 2000 2500 3000 3500 4000 Determinization - - - - - - - Antichains 400 973 1741 2886 5341 9063 13160
Outline of the talk • Motivation • Universality - A Game Approach • Example • Experimental Results • Conclusion
Universality - A game approach Consider a game played by a protagonist and an antagonist The protagonist wants to establish that A is not universal. The protagonist has to provide a finite word w such that no matter how the antagonist reads it using A , the automaton ends up in a rejecting location. ⇒ This is a one-shot game. =
Universality - A game approach 0 Consider a game played by a protagonist and an antagonist ℓ 1 0 , 1 1 0 1 The protagonist wants to establish that A is not universal. 0 , 1 ℓ 0 ℓ 3 ℓ 4 The protagonist has to provide a finite word w such that no 0 0 ℓ 2 matter how the antagonist reads it using A , the automaton ends up in a rejecting location. 1 Example : Protagonist: w = 101 1 0 1 − → ℓ 0 − → ℓ 2 − → ℓ 2 Antagonist: π = ℓ 0 Antagonist wins the play since ℓ 2 is accepting.
Universality - A game approach Consider a game played by a protagonist and an antagonist The protagonist wants to establish that A is not universal. The protagonist has to provide a finite word w such that no matter how the antagonist reads it using A , the automaton ends up in a rejecting location. = ⇒ This is a one-shot game. Protagonist has a strategy to win this game iff A is not universal
Universality - A game approach Consider a game played by a protagonist and an antagonist The protagonist wants to establish that A is not universal. The game is turn-based: • Protagonist provides a word w one letter at a time; • Antagonist updates the state of A accordingly.
Universality - A game approach Consider a game played by a protagonist and an antagonist 0 The protagonist wants to establish that A is not universal. ℓ 1 The game is turn-based: 0 , 1 1 0 1 0 , 1 ℓ 0 ℓ 3 ℓ 4 • Protagonist provides a word w one letter at a time; 0 0 ℓ 2 • Antagonist updates the state of A accordingly. 1 Example : Protagonist: w = 1 1 Antagonist: π = ℓ 0 − → ℓ 0
Universality - A game approach Consider a game played by a protagonist and an antagonist 0 The protagonist wants to establish that A is not universal. ℓ 1 The game is turn-based: 0 , 1 1 0 1 0 , 1 ℓ 0 ℓ 3 ℓ 4 • Protagonist provides a word w one letter at a time; 0 0 ℓ 2 • Antagonist updates the state of A accordingly. 1 Example : Protagonist: w = 10 1 0 Antagonist: π = ℓ 0 − → ℓ 0 − → ℓ 2
Universality - A game approach Consider a game played by a protagonist and an antagonist 0 The protagonist wants to establish that A is not universal. ℓ 1 The game is turn-based: 0 , 1 1 0 1 0 , 1 ℓ 0 ℓ 3 ℓ 4 • Protagonist provides a word w one letter at a time; 0 0 ℓ 2 • Antagonist updates the state of A accordingly. 1 Example : Protagonist: w = 10 1 0 Antagonist: π = ? − → ? − → ? { ℓ 0 } { ℓ 0 } { ℓ 1 , ℓ 2 }
Universality - A game approach Consider a game played by a protagonist and an antagonist 0 The protagonist wants to establish that A is not universal. ℓ 1 The game is turn-based: 0 , 1 1 0 1 0 , 1 ℓ 0 ℓ 3 ℓ 4 • Protagonist provides a word w one letter at a time; 0 0 ℓ 2 • Antagonist updates the state of A accordingly. 1 Example : Protagonist: w = 101 1 0 1 Antagonist: π = ? − → ? − → ? − → ℓ 2 Antagonist wins the play since ℓ 2 is accepting.
Universality - A game approach Consider a game played by a protagonist and an antagonist The protagonist wants to establish that A is not universal. The game is turn-based: • Protagonist provides a word w one letter at a time; • Antagonist updates the state of A accordingly. The protagonist cannot observe the state chosen by the antagonist. = ⇒ This is a blind game (or game of null information).
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F .
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games T
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games 0 − − − → ≡ − − − → 1 − − − → ≡ − − − → T
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games 0 − − − → ≡ − − − → 1 − − − → ≡ − − − → T
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games 0 − − − → ≡ − − − → 1 − − − → ≡ − − − → T
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games x 0 = T CPre ( x 0 )
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games x 1 = CPre ( x 0 ) ∪ x 0 T
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games x 1 T CPre ( x 1 )
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games x 2 = CPre ( x 1 ) ∪ x 1
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games . . . x i − 1 CPre ( x i − 1 )
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Checking universality of A is equivalent to solving a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games Winning states W = µx. ( CPre ( x ) ∪ T )
Universality - A game approach Let A = � Loc , ℓ I , Σ , δ A , F � . Universality of A is equivalent to a blind reachability game G T with target T = Loc \ F . Recipe for solving classical reachability games 1. Compute the set of states that are winning in one move: CPre ( T ) 2. Iterate CPre ( · ): compute W = µx. ( CPre ( x ) ∪ T ) 3. Check whether ℓ I ∈ W
Recommend
More recommend