# Anti-unification Algorithms and Their Applications in Program Analysis

@inproceedings{Bulychev2009AntiunificationAA, title={Anti-unification Algorithms and Their Applications in Program Analysis}, author={Peter E. Bulychev and Egor V. Kostylev and Vladimir A. Zakharov}, booktitle={Ershov Memorial Conference}, year={2009} }

A term t is called a template of terms t1 and t2 iff t1=tη1 and t2=tη2, for some substitutions η1 and η2. A template t of t1 and t2 is called the most specific iff for any template t′ of t1 and t2 there exists a substitution ξ such that t=t′ξ. The anti-unification problem is that of computing the most specific template of two given terms. This problem is dual to the well-known unification problem, which is the computing of the most general instance of terms. Unification is used extensively in…

## 27 Citations

### ACUOS: A System for Order-Sorted Modular ACU Generalization

- Computer Science
- 2013

Modelling the modular combination of associative, commutative and unity (ACU) equational attributes for arbitrary function symbols adds enough expressive power to ordinary generalization to reason about typed data structures such as lists, sets and multisets.

### Anti-Unification of Unordered Goals

- Computer ScienceCSL
- 2022

This work provides an in-depth study of the problem of anti-unification in logic programming by defining two different generalization relations, and forms a characterization of what constitutes a most specific generalization in both settings.

### Technical Report: Anti-unification of Unordered Goals

- Computer ScienceArXiv
- 2021

This work provides an in-depth study of the problem of anti-unification in logic programming by defining two different generalization relations, and formulate a characterization of what constitutes a most specific generalization in both settings.

### Nominal Anti-Unification with Atom-Variables

- Computer ScienceFSCD
- 2022

A more general approach to nominal anti-unification that uses atom-variables instead of explicit atoms, and two variants of freshness constraints: NL A -constraints (with atom- Variables), and Eqr -conStraints based on Eq rivalence r elations on atom-Variables.

### Constrained Anti-Unification for Program Transformation

- Computer Science
- 2013

An algorithm is given for a new kind of anti-unification problems, where the substitutions antiunifying two terms are constrained to be in a sub-language of that used to express the terms themselves, modulo some equational theory.

### Monads for the formalization of a pattern matching procedure

- Computer ScienceProgramming and Computer Software
- 2014

A mathematical language is presented that is based on the concepts of category theory and allows one to formally describe various types of pattern matching from a unified point of view.

### A Quest for Exactness: Program Transformation for Reliable Real Numbers. (Transformation de Programmes pour des Nombres Réels Fiables)

- Computer Science
- 2013

An algorithm that eliminates square root and division operations in some straight-line programs used in embedded systems while preserving the semantics, and is highlighted by a major example: the elimination of square roots and divisions in a conflict detection algorithm used in aeronautics.

### RISC-Linz Research Institute for Symbolic Computation

- Computer Science
- 2011

A complete and minimal algorithm to compute least general generalizations for unranked terms and hedges that may contain term and hedge variables is designed and improved by restricting possible alternatives permitted in the generalizations.

### Is it possible to unify sequential programs?

- Computer Science, EconomicsUNIF@RTA/TLCA
- 2013

A polynomial time unication algorithm for sequential programs w.r.t. strong equivalence of programs is introduced and its decidable approximation is chosen, which is well-known in theory of program schemata.

## References

SHOWING 1-10 OF 45 REFERENCES

### Efficient parallel term matching and anti-unification

- Computer ScienceJournal of Automated Reasoning
- 2004

These algorithms are the first polylogarithmic-time EREW algorithms with a processor x time product of the same order as that of their sequential counterparts, thereby permitting optimal speed-ups using any number of processors up to N/log2N.

### A Machine-Oriented Logic Based on the Resolution Principle

- MathematicsJACM
- 1965

The paper concludes with a discussion of several principles which are applicable to the design of efficient proof-procedures employing resolution as the basle logical process.

### Parallel Algorithms for Term Matching

- Computer ScienceSIAM J. Comput.
- 1986

It is shown that unification is logspace-complete in PTIME even if both input terms are linear, i.e., no variable appears more than once in each term.

### An evaluation of duplicate code detection using anti-unification

- Computer Science
- 2009

An algorithm for finding software clones, which works at the level of abstract syntax trees and is thus conceptually independent of the source language of the analyzed programs, and is formally based on the notion of anti-unification.

### A Temporal Logic of Nested Calls and Returns

- Computer ScienceTACAS
- 2004

This work introduces a temporal logic of calls and returns (CaRet) for specification and algorithmic verification of correctness requirements of structured programs and presents a tableau construction that reduces the model checking problem to the emptiness problem for a Buchi pushdown system.

### An Efficient Unification Algorithm

- Computer ScienceTOPL
- 1982

A new unification algorithm, characterized by having the acyclicity test efficiently embedded into it, is derived from the nondeterministic one, and a PASCAL implementation is given.

### Duplicate code detection using anti-unification

- Computer Science
- 2008

A new algorithm for finding software clones, conceptually independent of the source language of the analyzed programs, working at the level of abstract syntax trees, that considers that two sequences of statements form a clone if one of them can be obtained from the other by replacing some subtrees.

### A Survey on Software Clone Detection Research

- Computer Science
- 2007

The state of the art in clone detection research is surveyed, the clone terms commonly used in the literature are described along with their corresponding mappings to the commonly used clone types and several open problems related to clone detectionResearch are pointed out.

### Algebraic Properties of Idempotent Substitutions

- Computer ScienceICALP
- 1990

This paper presents an algebra of idempotent substitutions whose operations have many properties and can be regarded as a basis for a theory of concurrent logic programming.

### An Algorithm of Generalization in Positive Supercompilation

- Computer ScienceILPS
- 1995

The technique can be viewed as an instance of Martens' and Gallagher's recent framework for global termination of partial deduction, but it is more general in some important respects, e.g. it uses well-quasi orderings rather than well-founded orderings.