Learning Symbolic Automata Samuel Drews Loris D’Antoni University of Wisconsin-Madison
Motivation Model System Automata Learning Java API code
Classic Automata 1,3,5,7 1,3,5,7 0,2,4,6 0,2,4,6 Alphabet Σ = {0,1,2,3,4,5,6,7} Transition δ : Q × Σ → Q
Classic Automata 1,3,5,7,... 1,3,5,7,... 0,2,4,6,... 0,2,4,6,... Alphabet Σ = {0,1,2,3,4,5,6,7,...} Transition δ : Q × Σ → Q
Symbolic Automata odd odd even even Alphabet Σ = {0,1,2,3,4,5,6,7,...} Boolean Algebra BA = { ⊥ , odd, even, ⊤ } Transition δ : Q × BA → Q
Symbolic Automata odd odd Boolean Algebra φ ∈ BA → ¬φ ∈ BA φ,ψ ∈ BA even → φ ∧ ψ ∈ BA even Alphabet Σ = {0,1,2,3,4,5,6,7,...} Boolean Algebra BA = { ⊥ , odd, even, ⊤ } Transition δ : Q × BA → Q
Λ * Oracle Queries ✓ accept Membership word Query ✗ not accept ✓ equivalent Equivalence automaton Query ✗ not equivalent; counterexample word
Λ * Partitioning Function Partitioning List[2 Σ ] List[BA] Function 1,3 odd Ex: 6 even P([{1,3},{6}]) = [odd, even]
Angluin’s L* (classic automata) Membership Queries Refine Conjecture Observation Classic Table Automaton Equivalence Query + Counterexample
Λ * Sparse Membership Partitioning Queries Intermediary Function Automaton Refine Conjecture Observation Symbolic Table Automaton Equivalence Query + Counterexample
Anatomy of the Observation Table ε 0 Rows: strings that lead to states ε ✓ ✓ (representatives above divider) 5 ✗ ✗ 5,0 ✗ ✓ Columns: suffixes that tell states apart 0 ✓ ✓ Body: whether automaton accepts word 5,0,0 ✓ ✓
Anatomy of the Observation Table ε 0 Rows: strings that lead to states ε ✓ ✓ (representatives above divider) 5 ✗ ✗ 5,0 ✗ ✓ Columns: suffixes that tell states apart 0 ✓ ✓ Body: whether automaton accepts word 5,0,0 ✓ ✓
Anatomy of the Observation Table ε 0 Rows: strings that lead to states ε ✓ ✓ (representatives above divider) 5 ✗ ✗ 5,0 ✗ ✓ Columns: suffixes that tell states apart 0 ✓ ✓ Body: whether automaton accepts word 5,0,0 ✓ ✓
Anatomy of the Observation Table ε 0 Rows: strings that lead to states ε ✓ ✓ (representatives above divider) 5 ✗ ✗ 5,0 ✗ ✓ Columns: suffixes that tell states apart 0 ✓ ✓ Body: whether automaton accepts word 5,0,0 ✓ ✓
Anatomy of the Observation Table ε 0 Rows: strings that lead to states ε ✓ ✓ (representatives above divider) 5 ✗ ✗ 5,0 ✗ ✓ Columns: suffixes that tell states apart 0 ✓ ✓ Body: whether automaton accepts word 5,0,0 ✓ ✓
Anatomy of the Observation Table ε 0 Rows: strings that lead to states ε ✓ ✓ (representatives above divider) 5 ✗ ✗ 5,0 ✗ ✓ Columns: suffixes that tell states apart 0 ✓ ✓ Body: whether automaton accepts word 5,0,0 ✓ ✓ does not accept 5,0·ε accepts 5,0·0
Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 5,0 ✗✓ 5,0,0 ✓ ✓
Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 5,0 ✗✓ 5,0,0 ✓ ✓
Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 5,0 ✗✓ 5,0,0 ✓ ✓
Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 0 5,0 ✗✓ 5,0,0 ✓ ✓ 0 5,0 5,0,0
Observation Table to Intermediary Automaton ε 0 0 ε ✓ ✓ 5 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 0 ✓ ✓ 0 5,0 ✗✓ 5,0,0 ✓ ✓
… to Symbolic Automaton 0 5 ε 5 ✓✓ ✗✗ 0 0 5,0 ✗✓
… to Symbolic Automaton 0 5 ε 5 ✓✓ ✗✗ 0 0 5,0 ✗✓
… to Symbolic Automaton BA = intervals over Z ≥0 0 5 ε 5 ✓✓ ✗✗ 0 [0,∞) 0 5,0 ✗✓ Use partitioning function: P([{0}]) = [0,∞)
… to Symbolic Automaton BA = intervals over Z ≥0 0 5 ε 5 ✓✓ ✗✗ 0 [0,∞) [0,∞) 0 5,0 ✗✓ Use partitioning function: P([{0}]) = [0,∞)
… to Symbolic Automaton BA = intervals over Z ≥0 0 [0,5) 5 [5,∞) ε 5 ✓✓ ✗✗ 0 [0,∞) [0,∞) 0 5,0 ✗✓ Use partitioning function: P([{0},{5}]) = [0,5), [5,∞)
… to Symbolic Automaton ε 0 [0,5) ε ✓ ✓ [5,∞) 5 ✗ ✗ 5,0 ✗ ✓ 0 ✓ ✓ [0,∞) [0,∞) 5,0,0 ✓ ✓
Λ * by Example [0,51) ∪ [101,∞) [51,101) [0,∞) [0,∞) Σ = non-negative integers BA = unions of intervals over Σ
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) Initialize table: ε Membership query for ε ε ✓ Membership query for 0 (arbitrary) 0 ✓
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) Initialize table: ε ε Membership query for ε Λ * : query ε ✓ ε ✓ Membership query for 0 (arbitrary) for single 0 ✓ element 0 ✓ 1 ✓ L* : queries 2 ✓ for all of Σ …
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) 0 ε ε ✓ ε 0 ✓ ✓ Build “sparse” automaton from table δ : Q × Σ → Q
[0,51) ∪ [101,∞) [51,101) Λ * by Example L* : equivalence query Λ * : build symbolic [0,∞) [0,∞) Automaton δ : Q × BA → Q 0 ε ε ✓ ε 0 ✓ ✓ Build “sparse” automaton from table δ : Q × Σ → Q
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) 0 [0,∞) ε ε ✓ ε 0 ✓ ✓ Build symbolic automaton using partitioning function: suppose P({0}) = [0,∞)
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) [0,∞) ε ε ✓ 0 ✓ 51 ✗ Equivalence query: Not equivalent! cex (51, ✗ )
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) Move 51 to top ε ε ε ε ✓ ε ε ✓ ✓ 51 ✗ 51 0 ✓ ✗ 0 ✓ 51 0 ✗ ✓ 51,0 ✗ Not closed : Membership query 51 leads to a new state on 51,0
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) Move 51 to top ε ε ε ε ✓ ε ε ✓ ✓ 51 ✗ L* queries all of 51·Σ 51 0 ✓ ✗ 0 ✓ 51 0 ✗ ✓ 51,0 ✗ Not closed : Membership query 51 leads to a new state on 51,0
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε 0 [0,51) ✓ 51 [51,∞) 51 ✗ ε 51 0 ✓ ✓ ✗ 51,0 ✗ 0 [0,∞) suppose P({0},{51}) = [0,51) , [51,∞) P({0}) = [0,∞)
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε [0,51) ✓ [51,∞) 51 ✗ 0 ✓ 51,0 ✗ [0,∞) Equivalence query: Not equivalent! cex (101; ✓ )
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε [0,51) ✓ [51,∞) 51 ✗ 0 ✓ 51,0 ✗ [0,∞) 101 ✓ Equivalence query: Not equivalent! cex (101; ✓ )
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε [0,51) ✓ [51,∞) 51 ✗ 0 ✓ L* : every cex is a new state 51,0 ✗ Λ * : some cex is refining the [0,∞) 101 outgoing predicates ✓ Equivalence query: Not equivalent! cex (101; ✓ )
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε 0,101 ε [0,51) ∪ [101,∞) ✓ 51 [51,100) 51 ✗ ε 51 0 ✓ ✓ ✗ 51,0 ✗ 0 [0,∞) 101 ✓ suppose P({0,101},{51}) = [0,51) ∪ [101,∞) , [51,∞) P({0}) = [0,∞)
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε [0,51) ∪ [101,∞) ✓ [51,100) 51 ✗ 0 ✓ 51,0 ✗ [0,∞) 101 ✓ Equivalence query: 51,0,0 ✓ Not equivalent! cex (51,0,0; ✓ )
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε 51 and 51,0 seem ε like same state ✓ 51 ✗ 51·0 and 51,0·0 0 ✓ are different states 51,0 ✗ 101 ✓ 0 ?? 51,0,0 ✓
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε 0 51 and 51,0 seem ε ε like same state ✓ ✓ ✓ 51 51 ✗ ✗ ✗ 51·0 and 51,0·0 0 0 ✓ ✓ ✓ are different states 51,0 51,0 ✗ ✗ ✓ 101 101 ✓ ✓ ✓ 0 ?? 51,0,0 51,0,0 ✓ ✓ ✓ Inconsistent : add 0 to E
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε 0 ε 0 ε ε ✓ ✓ ✓ ✓ 51 51 ✗ ✗ ✗ ✗ make closed 51,0 0 ✓ ✓ ✗ ✓ move 51,0 to top 51,0 0 ✗ ✓ ✓ ✓ 101 101 ✓ ✓ ✓ ✓ 51,0,0 51,0,0 ✓ ✓ ✓ ✓
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) 0,101 [0,51) ∪ [101,∞) ε 0 51 [51,100) ε ✓ ✓ ε 51 51 ✓✓ ✗✗ ✗ ✗ 51,0 ✗ ✓ 0 [0,∞) [0,∞) 0 51,0 0 ✓ ✓ ✗✓ 101 ✓ ✓ 51,0,0 ✓ ✓ P({0,101},{51}) = [0,51) ∪ [101,∞) , [51,101) P({0}) = [0,∞)
[0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) [0,51) ∪ [101,∞) ε 0 [51,100) ε ✓ ✓ 51 ✗ ✗ 51,0 ✗ ✓ [0,∞) [0,∞) 0 ✓ ✓ 101 ✓ ✓ Equivalence query: 51,0,0 ✓ ✓ Equivalent!
Recommend
More recommend