forward closure and the finite variant property
play

Forward Closure and the Finite Variant Property Christopher Bouchard - PowerPoint PPT Presentation

Forward Closure and the Finite Variant Property Christopher Bouchard 1 Kimberly A. Gero 1 Christopher Lynch 2 Paliath Narendran 1 1 University at AlbanySUNY, Albany, NY, USA 2 Clarkson University, Potsdam, NY, USA Frontiers of Combining Systems


  1. Forward Closure and the Finite Variant Property Christopher Bouchard 1 Kimberly A. Gero 1 Christopher Lynch 2 Paliath Narendran 1 1 University at Albany—SUNY, Albany, NY, USA 2 Clarkson University, Potsdam, NY, USA Frontiers of Combining Systems 2013

  2. Motivation Consider the following two theories: E 1 : f ( g ( u , x ) , g ( v , y )) ≈ g ( f ( u , v ) , f ( x , y )) E 2 : f ( f ( x , y ) , f ( x , y )) ≈ f ( x , y ) 2

  3. Motivation Consider the following two theories: E 1 : f ( g ( u , x ) , g ( v , y )) ≈ g ( f ( u , v ) , f ( x , y )) Undecidable unification problem ∗ E 2 : f ( f ( x , y ) , f ( x , y )) ≈ f ( x , y ) Decidable unification problem Can be shown by forward closure ∗ S. Anantharaman, et al. “Unification modulo Synchronous Distributivity.” 2012. 2

  4. Section 1 Introduction

  5. Terms Purely syntactic Composed of. . . 4

  6. Terms Purely syntactic Composed of. . . Constants: t 1 = a 4

  7. Terms Purely syntactic Composed of. . . Constants: Variables: t 1 = a t 2 = x 4

  8. Terms Purely syntactic Composed of. . . Constants: Variables: Function Symbols: t 1 = a t 2 = x t 3 = g ( a , f ( x )) 4

  9. Terms Purely syntactic Composed of. . . Constants: Variables: Function Symbols: t 1 = a t 2 = x t 3 = g ( a , f ( x )) g t 3 = a f x 4

  10. Terms Purely syntactic Composed of. . . Constants: Variables: Function Symbols: t 1 = a t 2 = x t 3 = g ( a , f ( x )) g t 3 = a f x 4

  11. Terms Purely syntactic Composed of. . . Constants: Variables: Function Symbols: t 1 = a t 2 = x t 3 = g ( a , f ( x )) t 3 = t 3 4

  12. Rewriting Rewrite Rule: t 1 → t 2 Rewrite System: Set of rewrite rules Example (Associativity) f ( x , f ( y , z )) − → f ( f ( x , y ) , z ) 5

  13. Rewriting Rewrite Rule: t 1 → t 2 Rewrite System: Set of rewrite rules Example (Associativity) f ( x , f ( y , z )) − → f ( f ( x , y ) , z ) f f x − → z f f y z x y 5

  14. Convergence Confluence: s ∗ ∗ t 1 t 2 6

  15. Convergence Confluence: s ∗ ∗ t 1 t 2 ∗ ∗ u 6

  16. Convergence Confluence: s ∗ ∗ t 1 t 2 ∗ ∗ u Termination: No infinite descending chain t 0 → t 1 → t 2 → · · · 6

  17. Convergence Confluence: s ∗ ∗ t 1 t 2 ∗ ∗ u Termination: No infinite descending chain t 0 → t 1 → t 2 → · · · Confluence + Termination = Convergence 6

  18. Equational Unification Unification modulo a set of axioms E ? ? Given a set of equations EQ = { s 1 = t 1 , . . . , s n = t n } Substitution σ is an E -unifier of EQ iff: σ ( s 1 ) ≈ E σ ( t 1 ) ∧ · · · ∧ σ ( s n ) ≈ E σ ( t n ) 7

  19. Section 2 Motivation

  20. Motivation Equational unification has lots of applications: Automated reasoning Programming languages (e.g., Maude) Protocol analysis (e.g., Maude-NPA) 9

  21. Motivation Equational unification has lots of applications: Automated reasoning Programming languages (e.g., Maude) Protocol analysis (e.g., Maude-NPA) But equational unification is undecidable in general Even when restricted to “nice” theories 9

  22. Motivation How to identify decidable cases? ∗ C. Lynch and B. Morawska. “Basic Syntactic Mutation.” 2002. † H. Comon-Lundh and S. Delaune. “The finite variant property: How to get rid of some algebraic properties.” 2005. 10

  23. Motivation How to identify decidable cases? Two important syntactic approaches: Basic Syntactic Mutation ∗ The Finite Variant Property † ∗ C. Lynch and B. Morawska. “Basic Syntactic Mutation.” 2002. † H. Comon-Lundh and S. Delaune. “The finite variant property: How to get rid of some algebraic properties.” 2005. 10

  24. Motivation How to identify decidable cases? Two important syntactic approaches: Basic Syntactic Mutation ∗ The Finite Variant Property † Forward closure unifies these approaches. ∗ C. Lynch and B. Morawska. “Basic Syntactic Mutation.” 2002. † H. Comon-Lundh and S. Delaune. “The finite variant property: How to get rid of some algebraic properties.” 2005. 10

  25. Section 3 Forward Closure

  26. Forward Closure Extension of work by Hermann on chain properties ∗ Compress rewriting steps New rules capture chains of original rules ∗ M. Hermann. “Chain Properties of Rule Closures.” 1990. 12

  27. Overlap Overlap two rules and get a new rule General idea: p ǫ ǫ If t 1 − − − → − − − → t 3 then t 1 − − − − − − − → t 2 t 3 ρ 1 ρ 2 ρ 1 � p ρ 2 13

  28. Overlap To compute ρ 1 � p ρ 2 for p ∈ FP os ( r 1 ) : ρ 1 : − → r 1 l 1 ρ 2 : − → r 2 l 2 14

  29. Overlap To compute ρ 1 � p ρ 2 for p ∈ FP os ( r 1 ) : p ρ 1 : − → l 1 r 1 | p ρ 2 : − → r 2 l 2 14

  30. Overlap ? θ = mgu( = ) r 1 | p l 2 15

  31. Overlap ρ 1 � p ρ 2 : − → θ ( l 1 ) θ ( r 1 [ r 2 ] p ) 16

  32. Overlap p ρ 1 � p ρ 2 : − → θ ( l 1 ) θ ( r 2 ) 16

  33. Overlap Example ρ 1 : f ( g ( u 1 , x 1 ) , g ( v 1 , y 1 )) → g ( f ( u 1 , v 1 ) , f ( x 1 , y 1 )) ρ 2 : f ( g ( u 2 , x 2 ) , g ( v 2 , y 2 )) → g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) 17

  34. Overlap Example ρ 1 : f ( g ( u 1 , x 1 ) , g ( v 1 , y 1 )) → g ( f ( u 1 , v 1 ) , f ( x 1 , y 1 )) ρ 2 : f ( g ( u 2 , x 2 ) , g ( v 2 , y 2 )) → g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) ρ 1 � 1 ρ 2 : 17

  35. Overlap Example ρ 1 : f ( g ( u 1 , x 1 ) , g ( v 1 , y 1 )) → g ( f ( u 1 , v 1 ) , f ( x 1 , y 1 )) ρ 2 : f ( g ( u 2 , x 2 ) , g ( v 2 , y 2 )) → g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) θ : { u 1 �→ g ( u 2 , x 2 ) , v 1 �→ g ( v 2 , y 2 ) } ρ 1 � 1 ρ 2 : 17

  36. Overlap Example ρ 1 : f ( g ( u 1 , x 1 ) , g ( v 1 , y 1 )) → g ( f ( u 1 , v 1 ) , f ( x 1 , y 1 )) ρ 2 : f ( g ( u 2 , x 2 ) , g ( v 2 , y 2 )) → g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) θ : { u 1 �→ g ( u 2 , x 2 ) , v 1 �→ g ( v 2 , y 2 ) } ρ 1 � 1 ρ 2 : f ( g ( g ( u 2 , x 2 ) , x 1 ) , g ( g ( v 2 , y 2 ) , y 1 )) → g ( g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) , f ( x 1 , y 1 )) 17

  37. Overlap Example ρ 1 : f ( g ( u 1 , x 1 ) , g ( v 1 , y 1 )) → g ( f ( u 1 , v 1 ) , f ( x 1 , y 1 )) ρ 2 : f ( g ( u 2 , x 2 ) , g ( v 2 , y 2 )) → g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) θ : { u 1 �→ g ( u 2 , x 2 ) , v 1 �→ g ( v 2 , y 2 ) } ρ 1 � 1 ρ 2 : f ( g ( g ( u 2 , x 2 ) , x 1 ) , g ( g ( v 2 , y 2 ) , y 1 )) → g ( g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) , f ( x 1 , y 1 )) 17

  38. Overlap Example ρ 1 : f ( g ( u 1 , x 1 ) , g ( v 1 , y 1 )) → g ( f ( u 1 , v 1 ) , f ( x 1 , y 1 )) ρ 2 : f ( g ( u 2 , x 2 ) , g ( v 2 , y 2 )) → g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) θ : { u 1 �→ g ( u 2 , x 2 ) , v 1 �→ g ( v 2 , y 2 ) } ρ 1 � 1 ρ 2 : f ( g ( g ( u 2 , x 2 ) , x 1 ) , g ( g ( v 2 , y 2 ) , y 1 )) → g ( g ( f ( u 2 , v 2 ) , f ( x 2 , y 2 )) , f ( x 1 , y 1 )) 17

  39. Redundancy Not all overlaps are added to the forward closure. A rule l → r is redundant in a rewrite system R iff: 18

  40. Redundancy Not all overlaps are added to the forward closure. A rule l → r is redundant in a rewrite system R iff: l → r is an instance of a more general rule in R , or 18

  41. Redundancy Not all overlaps are added to the forward closure. A rule l → r is redundant in a rewrite system R iff: l → r is an instance of a more general rule in R , or Every ground instance of l ≈ r can be proven by smaller ground instances of rules in R 18

  42. Redundancy Not all overlaps are added to the forward closure. A rule l → r is redundant in a rewrite system R iff: l → r is an instance of a more general rule in R , or Every ground instance of l ≈ r can be proven by smaller ground instances of rules in R r l ∗ ∗ R R t 18

  43. Redundancy Not all overlaps are added to the forward closure. A rule l → r is redundant in a rewrite system R iff: l → r is an instance of a more general rule in R , or Every ground instance of l ≈ r can be proven by smaller ground instances of rules in R r l ∗ ∗ R R t 18

  44. Computing Forward Closure Start with a rewrite system R 19

  45. Computing Forward Closure Start with a rewrite system R Overlap each rule in R with each rule in R 19

  46. Computing Forward Closure Start with a rewrite system R Overlap each rule in R with each rule in R Throw out redundant rules 19

  47. Computing Forward Closure Start with a rewrite system R Overlap each rule in R with each rule in R Throw out redundant rules Call this FC 1 ( R ) 19

  48. Computing Forward Closure Start with a rewrite system FC k ( R ) Overlap each rule in FC k ( R ) with each rule in R Throw out redundant rules Call this FC k +1 ( R ) 19

  49. Computing Forward Closure Finally, FC ( R ) = � FC k ( R ) k ≥ 0 20

  50. Computing Forward Closure Finally, FC ( R ) = � FC k ( R ) k ≥ 0 If FC k ( R ) = FC k +1 ( R ) for some k , FC ( R ) is finite Otherwise, FC ( R ) is infinite 20

  51. Forward Closure A term t is an innermost redex of R if it can only be rewritten by R at the root. Key Idea: In FC ( R ) , every innermost redex of R can be rewritten to its normal form in one step. 21

  52. Section 4 Equivalence of FC and the FVP

  53. Forward Closure and the Finite Variant Property We show that a system has a finite forward closure if and only if it has the finite variant property . 23

Recommend


More recommend