# 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

A type-theoretic foundation for programming with higher-order abstract syntax and first-class substitutions

- Computer SciencePOPL '08
- 2008

This paper presents a novel type-theoretic foundation based on contextual modal types which allows us to recursively analyze open terms via higher-order pattern matching and demonstrates that the framework provides a name-safe foundation to operations typically found in nominal systems.

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.

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

First-Order Logic with Dependent Types

- Computer ScienceIJCAR
- 2006

DFOL, an extension of classical first-order logic with dependent types, i.e., as in Martin-Lof type theory, signatures may contain type-valued function symbols, is presented and it is shown that free models over Horn theories exist, which facilitates its use as an algebraic specification language.

An Implementation of the Language Lambda Prolog Organized around Higher-Order Pattern Unification

- Computer ScienceArXiv
- 2009

A new virtual machine and compilation based scheme for the language λProlog is developed by embedding a higher-order pattern unification algorithm due to Nadathur and Linnell within the well-known Warren Abstract Machine model for Prolog.

Efficient Data Structures for Automated Theorem Proving in Expressive Higher-Order Logics

- Computer Science
- 2014

A higher-order term representation based upon the polymorphically typed λ-calculus is presented, which employs spine notation, explicit substitutions and perfect term sharing for efficient term traversal, fast β-normalization and reuse of already constructed terms, respectively.

## References

SHOWING 1-10 OF 17 REFERENCES

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.

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.

Ordered Linear Logic Programming

- Computer Science
- 1998

A logic programming interpretation for INCLL is developed and a system of ordered uniform derivations is given which is sound and complete with respect to INCLL, and a model of resource consumption is presented which removes non-determinism from ordered resource allocation during search for uniform derivation.

Foundational proof-carrying code

- Computer ScienceProceedings 16th Annual IEEE Symposium on Logic in Computer Science
- 2001

This paper describes many of the mathematical and engineering problems to be solved in the construction of a foundational proof-carrying code system, using the simplest possible verifier and the smallest possible runtime system.

System Description: Twelf - A Meta-Logical Framework for Deductive Systems

- Computer ScienceCADE
- 1999

Twelf is a meta-logical framework for the specification, implementation, and meta-theory of deductive systems from the theory of programming languages and logics and is a significant extension and complete reimplementation of the Elf system.