# Optimizing Higher-Order Pattern Unification

@inproceedings{Pientka2003OptimizingHP, title={Optimizing Higher-Order Pattern Unification}, author={Brigitte Pientka and Frank Pfenning}, booktitle={CADE}, year={2003} }

We present an abstract view of existential variables in a dependently typed lambda-calculus based on modal type theory. This allows us to justify optimizations to pattern unification such as linearization, which eliminates many unnecessary occurs-checks. The presented modal framework explains a number of features of the current implementation of higher-order unification in Twelf and provides insight into several optimizations. Experimental results demonstrate significant performance improvement…

## 45 Citations

### Extending Higher-Order Unification to Support Proof Irrelevance

- Computer ScienceTPHOLs
- 2003

This work describes this extended algorithm, whose presentation is simplified by making use of recent developments in explaining unification metavariables as modal variables, which obviates the need for full explicit substitutions.

### Practical Higher-Order Pattern Unification with On-the-Fly Raising

- Computer ScienceICLP
- 2005

A unification algorithm is described that proceeds by recursively descending through the structures of terms, performing raising and other transformations on-the-fly and only as needed.

### Programming with Proofs and Explicit Contexts (Extended Abstract)

- Computer Science
- 2008

A decidable bidirectional type system that distinguishes between dependently-typed data and computations and an operational semantics for this language based on higherorder pattern matching for dependently typed objects is presented.

### Eliminating Redundancy in Higher-Order Unification: A Lightweight Approach

- Computer ScienceIJCAR
- 2006

It is shown that some implicit type information is uniquely determined, and can therefore be safely skipped during higher-order unification, and its impact in practice during type reconstruction and during proof search within the logical framework Twelf.

### Functional Programming With Higher-order Abstract Syntax and Explicit Substitutions

- Computer ScienceElectron. Notes Theor. Comput. Sci.
- 2007

### Tabling for Higher-Order Logic Programming

- Computer ScienceCADE
- 2005

We describe the design and implementation of a higher-order tabled logic programming interpreter where some redundant and infinite computation is eliminated by memoizing sub-computation and re-using…

### Multi-level Contextual Type Theory

- Computer ScienceLFMTP
- 2011

A decidable bi-directional type system which characterizes beta-eta-normal forms together with a generalized substitution operation is given which gives a uniform account by collapsing all these different kinds of variables into a single notion of variabe indexed by some level k.

### Normalization for the Simply-Typed Lambda-Calculus in Twelf

- MathematicsElectron. Notes Theor. Comput. Sci.
- 2008

### Nominal Henkin Semantics: simply-typed lambda-calculus models in nominal sets

- Computer ScienceLFMTP
- 2011

A class of nominal algebraic Henkin-style models for the simply typed lambda-calculus in which variables map to names in the denotation and lambda-abstraction maps to a (non-functional) name-abStraction operation are investigated, yielding a theory of incomplete functions.

### Programs Using Syntax with First-Class Binders

- Computer ScienceESOP
- 2017

A general methodology for adding support for higher-order abstract syntax definitions and first-class contexts to an existing ML-like language is presented, which avoids errors in manipulating low-level operations, eases the task of prototyping program transformations and can have a major impact on the effort and cost of implementing such systems.

## References

SHOWING 1-10 OF 17 REFERENCES

### Unification and anti-unification in the calculus of constructions

- Computer Science[1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science
- 1991

The unification algorithm is used for logic program execution and type and term reconstruction in the current implementation of Elf and has shown itself to be practical.

### A treatment of higher-order features in logic programming

- Computer ScienceTheory and Practice of Logic Programming
- 2005

An extended compilation model is presented that treats higher-order unification and also handles dynamically emergent goals, and a satisfactory representation for lambda terms is developed by exploiting the nameless notation of de Bruijn as well as explicit encodings of substitutions.

### Unification of Simply Typed Lamda-Terms as Logic Programming

- Computer ScienceICLP
- 1991

This paper shows that the unification of simply typed ‚-terms modulo the rules of fl- and ·-conversions can be coded as a query of the logic programming language L‚ in a natural and clear fashion.

### AN OVERVIEW OF PROLOG

- Computer Science
- 1988

The correspondence between each extension to Prolog and the new features in the stronger logical theory is discussed and various aspects of an experimental implementation of λProlog are discussed.

### Naïve Reverse Can be Linear

- Computer ScienceICLP
- 1991

It appears that theiency of the program thus obtained relies critically upon the implementation of higher-order operations (uniication and reduction) and a good choice for data-structures and reduction strategy yields a linear reverse.

### Implementation Considerations for Higher-Order Features in Logic Programming

- Computer Science
- 1993

The implementation of unification is tuned to yield an efficient solution to first-order like problems, in fact through the use of compiled code as in the WAM, and a compilation method is discussed for goals whose structure changes during execution.

### System Description: Teyjus - A Compiler and Abstract Machine Based Implementation of lambda-Prolog

- Computer ScienceCADE
- 1999

This work has culminated in the description of an abstract machine and compiler based implementation scheme of λProlog based on the intuitionistic theory of higher-order hereditary Harrop formulas, a logic that significantly extends the theory of Horn clauses.

### A framework for defining logics

- Computer ScienceJACM
- 1993

The Edinburgh Logical Framework provides a means to define (or present) logics through a general treatment of syntax, rules, and proofs by means of a typed λ-calculus with dependent types, whereby each judgment is identified with the type of its proofs.