learning symbolic automata
play

Learning Symbolic Automata Samuel Drews Loris DAntoni University - PowerPoint PPT Presentation

Learning Symbolic Automata Samuel Drews Loris DAntoni 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}


  1. Learning Symbolic Automata Samuel Drews Loris D’Antoni University of Wisconsin-Madison

  2. Motivation Model System Automata Learning Java API code

  3. 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

  4. 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

  5. Symbolic Automata odd odd even even Alphabet Σ = {0,1,2,3,4,5,6,7,...} Boolean Algebra BA = { ⊥ , odd, even, ⊤ } Transition δ : Q × BA → Q

  6. 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

  7. Λ * Oracle Queries ✓ accept Membership word Query ✗ not accept ✓ equivalent Equivalence automaton Query ✗ not equivalent; counterexample word

  8. Λ * Partitioning Function Partitioning List[2 Σ ] List[BA] Function 1,3 odd Ex: 6 even P([{1,3},{6}]) = [odd, even]

  9. Angluin’s L* (classic automata) Membership Queries Refine Conjecture Observation Classic Table Automaton Equivalence Query + Counterexample

  10. Λ * Sparse Membership Partitioning Queries Intermediary Function Automaton Refine Conjecture Observation Symbolic Table Automaton Equivalence Query + Counterexample

  11. 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 ✓ ✓

  12. 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 ✓ ✓

  13. 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 ✓ ✓

  14. 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 ✓ ✓

  15. 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 ✓ ✓

  16. 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

  17. Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 5,0 ✗✓ 5,0,0 ✓ ✓

  18. Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 5,0 ✗✓ 5,0,0 ✓ ✓

  19. Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 5,0 ✗✓ 5,0,0 ✓ ✓

  20. Observation Table to Intermediary Automaton ε 0 ε ✓ ✓ 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 ✓ ✓ 0 5,0 ✗✓ 5,0,0 ✓ ✓ 0 5,0 5,0,0

  21. Observation Table to Intermediary Automaton ε 0 0 ε ✓ ✓ 5 5 ε 5 ✗ ✗ ✓✓ ✗✗ 5,0 ✗ ✓ 0 0 ✓ ✓ 0 5,0 ✗✓ 5,0,0 ✓ ✓

  22. … to Symbolic Automaton 0 5 ε 5 ✓✓ ✗✗ 0 0 5,0 ✗✓

  23. … to Symbolic Automaton 0 5 ε 5 ✓✓ ✗✗ 0 0 5,0 ✗✓

  24. … to Symbolic Automaton BA = intervals over Z ≥0 0 5 ε 5 ✓✓ ✗✗ 0 [0,∞) 0 5,0 ✗✓ Use partitioning function: P([{0}]) = [0,∞)

  25. … to Symbolic Automaton BA = intervals over Z ≥0 0 5 ε 5 ✓✓ ✗✗ 0 [0,∞) [0,∞) 0 5,0 ✗✓ Use partitioning function: P([{0}]) = [0,∞)

  26. … 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,∞)

  27. … to Symbolic Automaton ε 0 [0,5) ε ✓ ✓ [5,∞) 5 ✗ ✗ 5,0 ✗ ✓ 0 ✓ ✓ [0,∞) [0,∞) 5,0,0 ✓ ✓

  28. Λ * by Example [0,51) ∪ [101,∞) [51,101) [0,∞) [0,∞) Σ = non-negative integers BA = unions of intervals over Σ

  29. [0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) Initialize table: ε Membership query for ε ε ✓ Membership query for 0 (arbitrary) 0 ✓

  30. [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 Σ …

  31. [0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) 0 ε ε ✓ ε 0 ✓ ✓ Build “sparse” automaton from table δ : Q × Σ → Q

  32. [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

  33. [0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) 0 [0,∞) ε ε ✓ ε 0 ✓ ✓ Build symbolic automaton using partitioning function: suppose P({0}) = [0,∞)

  34. [0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) [0,∞) ε ε ✓ 0 ✓ 51 ✗ Equivalence query: Not equivalent! cex (51, ✗ )

  35. [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

  36. [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

  37. [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,∞)

  38. [0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε [0,51) ✓ [51,∞) 51 ✗ 0 ✓ 51,0 ✗ [0,∞) Equivalence query: Not equivalent! cex (101; ✓ )

  39. [0,51) ∪ [101,∞) [51,101) Λ * by Example [0,∞) [0,∞) ε ε [0,51) ✓ [51,∞) 51 ✗ 0 ✓ 51,0 ✗ [0,∞) 101 ✓ Equivalence query: Not equivalent! cex (101; ✓ )

  40. [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; ✓ )

  41. [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,∞)

  42. [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; ✓ )

  43. [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 ✓

  44. [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

  45. [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 ✓ ✓ ✓ ✓

  46. [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,∞)

  47. [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