generic partition refjnement and weighted tree automata
play

Generic Partition Refjnement and Weighted Tree Automata Hans-Peter - PowerPoint PPT Presentation

Generic Partition Refjnement and Weighted Tree Automata Hans-Peter Deifel , Stefan Milius, Lutz Schrder, Thorsten Wimann FM19 10.10.2019 1 / 22 Partition Refjnement 2 / 22 - e g i a P n m log n a j r a T Colour


  1. Generic Partition Refjnement and Weighted Tree Automata Hans-Peter Deifel , Stefan Milius, Lutz Schröder, Thorsten Wißmann FM’19 10.10.2019 1 / 22

  2. Partition Refjnement 2 / 22 - e g i a P n m · log n a j r a T Colour Refjnement m · log n Hopcroft n · l o g n Markov …and Chain many more Lumping n g o l · m

  3. Partition Refjnement 2 / 22 - e g i a P n m · log n a j r a T Colour Refjnement m · log n Hopcroft n · l o g n Markov …and Chain many more Lumping n g o l · m

  4. Partition Refjnement 2 / 22 - e g i a P n m · log n a j r a T Colour Refjnement m · log n Hopcroft n · l o g n Markov …and Chain many more Lumping n g o l · m

  5. Partition Refjnement 2 / 22 - e g i a P n m · log n a j r a T Colour Refjnement m · log n Hopcroft n · l o g n Markov …and Chain many more Lumping n g o l · m

  6. Partition Refjnement 2 / 22 - e g i a P n m · log n a j r a T Colour Refjnement m · log n Hopcroft n · l o g n Markov …and Chain many more Lumping n g o l · m

  7. Coalgebraic Partition Refjnement 3 / 22

  8. Coalgebras Labelled Chains Markov Automata Deterministic Systems Transition FX= Type Functor type functor successor map states 4 / 22 c X FX

  9. Coalgebras Transition Chains Markov Automata Deterministic Systems Labelled FX= type functor successor map states 4 / 22 c X FX Type Functor F : Set → Set P ( A × X ) 2 × X A R ( X ) . . .

  10. Behavioural Equivalence homomorphism Bisimilarity Weighted Equivalence Language Bisimilarity FX= Identifjed by Coalgebra Homomorphism 5 / 22 type functor successor map states c X FX h Fh Y FY d P ( A × X ) 2 × X A R ( X ) . . .

  11. Coalgebraic Partition Refjnement Generic Algorithm Refjnement Interface Partition 6 / 22 F -Coalgebra Functor F for F

  12. Splitting Blocks 7 / 22 ✂ ✂ A 0 . 8 0 . 3 0 . 7 0 . 5 0 . 5 0 . 2 ✂ . . . . . . S B \ S B

  13. Splitting Blocks 7 / 22 ✂ ✂ A 0 . 8 0 . 3 0 . 7 0 . 5 0 . 5 0 . 2 ✂ . . . . . . S B \ S B

  14. Splitting Blocks 7 / 22 ✂ ✂ A 0 . 8 0 . 3 0 . 7 0 . 5 0 . 5 0 . 2 ✂ . . . . . . S B \ S B

  15. Coalgebraic Partition Refjnement Generic Algorithm Refjnement Interface Partition 8 / 22 F -Coalgebra Functor F for F

  16. Functor Encoding Bags Refjnement Interface 9 / 22 Refjnement Interface for F Labels A ♭ : FX → B ( A × X ) Type W (abstract, could be ints, reals, trees, …) init : F 1 × B A → W update : B A × W → W × F 3 × W Labels to S Weight of B

  17. 9 / 22 Bags Functor Encoding Refjnement Interface Refjnement Interface for F Labels A ♭ : FX → B ( A × X ) Type W (abstract, could be ints, reals, trees, …) init : F 1 × B A → W update : B A × W → W × F 3 × W  · · ·  k b  1 · · · Labels to S Weight of B . . . . . . S B \ S B

  18. 9 / 22 Bags Functor Encoding Refjnement Interface Refjnement Interface for F Labels A ♭ : FX → B ( A × X ) Type W (abstract, could be ints, reals, trees, …) init : F 1 × B A → W update : B A × W → W × F 3 × W Example: FX = R X (real-valued functor) Labels to S Weight of B A : = R W : = R × R init ( _ ,  ) = ( 0 ,   ) update ( , ( r, b )) = (( r + b −  ,   ) , . . . )

  19. 9 / 22 Bags Functor Encoding Refjnement Interface Refjnement Interface for F Labels A ♭ : FX → B ( A × X ) Type W (abstract, could be ints, reals, trees, …) init : F 1 × B A → W update : B A × W → W × F 3 × W Labels to S Weight of B Modular: Refjnement Interface can automatically be derived for composite functors (e.g. PD ( − ) , M × M (  − ) )

  20. Implementation “CoPaR” Generic Imple- mentation {f,n} x P({a,b} x X) q: (n, {(a, p), (b, r)}) p: (n, {(a, q), (b, r)}) r: (f, {(a, q), (b, p)}) Refjnement Interface Block 0: r Block 1: q, p Available at: git8.cs.fau.de/ software/copar 10 / 22

  21. Implementation “CoPaR” Generic Imple- mentation {f,n} x P({a,b} x X) q: (n, {(a, p), (b, r)}) p: (n, {(a, q), (b, r)}) r: (f, {(a, q), (b, p)}) Refjnement Interface Block 0: r Block 1: q, p Available at: git8.cs.fau.de/ software/copar 10 / 22

  22. Implementation “CoPaR” Generic Imple- mentation {f,n} x P({a,b} x X) q: (n, {(a, p), (b, r)}) p: (n, {(a, q), (b, r)}) r: (f, {(a, q), (b, p)}) Refjnement Interface Block 0: r Block 1: q, p Available at: git8.cs.fau.de/ software/copar 10 / 22

  23. Implementation - Refjnement Interface Math Haskell init Also Modular: Automatically derived for composite functors 11 / 22 init : F 1 × B A → W update : B A × W → W × F 3 × W class (Ord (F1 f), Ord (F3 f)) ⇒ RefjnementInterface f where :: F1 f → [Label f] → Weight f update :: [Label f ] → Weight f → (Weight f, F3 f, Weight f) (e.g. PD ( − ) , M × M (  − ) )

  24. Complexity Refjnement Interface 12 / 22 init : F 1 × B A → W, update : B A × W → W × F 3 × W O ( | ℓ | · p ( n, m )) O ( | ℓ | · p ( n, m )) | ℓ | number of labels to subblock ( B A ) n number of states in coalgebra m number of edges in coalgebra

  25. Complexity Refjnement Interface Overall Modularity: May add intermediate states 12 / 22 init : F 1 × B A → W, update : B A × W → W × F 3 × W O ( | ℓ | · p ( n, m )) O ( | ℓ | · p ( n, m )) O (( m + n ) · log n · p ( n, m ))

  26. System Groote, Verduzco, de Vink 2018 DFA Hopcroft 1971 Gries 1973/Knuutila 2001 Segala Systems Baier, Engelen, Majster-Cederbaum 2000 Colour Chains Refjnement Berkholz, Bonsma, Grohe 2017 Weighted Tree Automata Högberg, Maletti, May 2007 poly. bound Valmari, Franceschinis 2010 Högberg, Maletti, May 2007 Markov Dovier, Piazza, Policriti 2004 Specifjc algorithm Transition Systems Paige, Tarjan 1987 Valmari 2009 LTS Functor FX Run-Time ( m ≥ n ) P f X m · log n = m · log n P f ( N × X ) m · log m = m · log m m · log n > R ( X ) m · log n = m · log n 2 × X A ( A fjxed) n · log n = n · log n | A | · n · 2 × P f ( A × X ) ≈ | A | · n · log n log ( n + | A | ) m · log n < P f ( A × D X ) m D · log m P f = m D · log m P f B f X m · log n = m · log n M × M (  X ) m · log 2 m ≪ m · n M non-cancellative M × M (  X ) m · log m = m · log n M cancellative

  27. Case Study: Weighted Tree Automata Defjnition 14 / 22 WTA: ( Q,  , M , ƒ, μ ) Q : Set of states  : Ranked alphabet M : Semiring ( M, · , +) ƒ : Final weight distribution ƒ : Q → M μ : Transition function μ :  k → Q k → Q → M

  28. Case Study: Weighted Tree Automata Example Language: zigzag (Högberg, Maletti, May) 15 / 22  = { β / 0 , σ / 2 } , M = N σ �→ 3 zigzg: T  → N zigzg ( β ) = 1 σ �→ 2 β �→ 1 zigzg ( σ ( β, _ ) ) = 2 zigzg ( σ ( σ ( _ , t ) , _ ) ) β β = 2 + zigzg ( t ) �→ 1 �→ 1 ⇒ Recognized by automaton with 3 states

  29. Case Study: Weighted Tree Automata Tasks Describe the functor Find equivalence that corresponds to coalgebraic behavioural equivalence “Backwards Bisimulation” Implement refjnement interface Composite of: 16 / 22

  30. Case Study: Weighted Tree Automata Tasks Describe the functor Find equivalence that corresponds to coalgebraic behavioural equivalence “Backwards Bisimulation” Implement refjnement interface Composite of: 16 / 22 FX = M × M (  X )

  31. Case Study: Weighted Tree Automata Tasks Describe the functor Find equivalence that corresponds to coalgebraic behavioural equivalence “Backwards Bisimulation” Implement refjnement interface Composite of: 16 / 22 FX = M × M (  X )

  32. Case Study: Weighted Tree Automata Tasks Describe the functor Find equivalence that corresponds to coalgebraic behavioural equivalence “Backwards Bisimulation” Implement refjnement interface Composite of: 16 / 22 FX = M × M (  X ) M × − M ( − )  −

  33. Case Study: Weighted Tree Automata Tasks Describe the functor Find equivalence that corresponds to coalgebraic behavioural equivalence “Backwards Bisimulation” Implement refjnement interface Composite of: Done 16 / 22 FX = M × M (  X ) M × − M ( − )  −

  34. Case Study: Weighted Tree Automata Tasks Describe the functor Find equivalence that corresponds to coalgebraic behavioural equivalence “Backwards Bisimulation” Implement refjnement interface Composite of: Done Done 16 / 22 FX = M × M (  X ) M × − M ( − )  −

  35. Case Study: Weighted Tree Automata Tasks Describe the functor Find equivalence that corresponds to coalgebraic behavioural equivalence “Backwards Bisimulation” Implement refjnement interface Composite of: Done ??? Done 16 / 22 FX = M × M (  X ) M × − M ( − )  −

  36. Refjnement Interface 17 / 22 Refjnement Interface for M ( − ) M cancellative ⇔  + c = b + c ⇒  = b M cancellative? Done (via Grothendieck construction) M non-cancellative? ???

  37. Non-cancellative Monoids Problem Don’t evaluate sums; store and manipulate symbolically We know: Trick 18 / 22   k b 1 · · · Need to subtract  B −  S  1 · · · . . . . . . S B \ S B

Recommend


More recommend