Abstract

AbstractWe consider anti-unification for simply typed lambda terms in theories defined by associativity, commutativity, identity (unit element) axioms and their combinations and develop a sound and complete algorithm which takes two lambda terms and computes their equational generalizations in the form of higher-order patterns. The problem is finitary: the minimal complete set of such generalizations contains finitely many elements. We define the notion of optimal solution and investigate special restrictions of the problem for which the optimal solution can be computed in linear or polynomial time.

Highlights

  • Anti-unification algorithms aim at computing generalizations for given terms

  • Anti-unification for typed lambda terms can be restricted to compute generalizations in the form of Miller’s patterns (Miller, 1991), which makes it unitary, and the single least general generalization can be computed in linear time by the algorithm proposed in Baumgartner et al (2017)

  • We introduce the rules for the higher-order pattern generalization algorithm from (Baumgartner et al, 2017), which works for E = ∅

Read more

Summary

Introduction

Anti-unification algorithms aim at computing generalizations for given terms. A generalization of t and s is a term r such that t and s are substitution instances of r. Anti-unification for typed lambda terms can be restricted to compute generalizations in the form of Miller’s patterns (Miller, 1991), which makes it unitary, and the single least general generalization can be computed in linear time by the algorithm proposed in Baumgartner et al (2017). These two approaches combine nicely with each other when one wants to develop a higher-order equational anti-unification algorithm. We present higher-order pattern anti-unification for terms containing function symbols whose equational axioms may include associativity, commutativity, identity (unit element), and their combinations.

Preliminaries
Equational Decomposition Rules
Associative-commutative decomposition rules
Linear generalization modulo AU
Toward Special Restrictions
Associative and Associative-Unit Generalization
Choice functions and optimality
Associative-Commutative and Associative-Commutative-Unit Case
10. Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call