🤖 AI Summary
This paper addresses nominal anti-unification—the computation of a least general generalization (LGG) of given terms within contexts containing binding structures. Standard first-order anti-unification fails for bound variables, and this work establishes, for the first time in the nominal syntax framework, that an LGG exists and is unique up to variable renaming and α-equivalence when the underlying atom set is finite. To compute it, we propose the first sound and complete constructive algorithm, integrating nominal logic, equivariance checking, α-equivalence handling, and context-sensitive generalization. We formally prove its polynomial-time complexity. Our approach provides a rigorous and efficient foundation for binding-aware inductive learning and code clone detection.
📝 Abstract
We study nominal anti-unification, which is concerned with computing
least general generalizations for given terms-in-context. In general, the problem does not have a least general solution, but if the set of atoms permitted in generalizations is finite, then there exists a least general generalization which is unique modulo variable renaming and alpha-equivalence. We present an algorithm that computes it. The algorithm relies on a subalgorithm that constructively decides equivariance between two terms-in-context. We prove soundness and completeness properties of both algorithms and analyze their complexity. Nominal anti-unification can be applied to problems where generalization of first-order terms is needed (inductive learning, clone detection, etc.), but bindings are involved.