Spring 1996

Illustrations of Metalanguage Applications of lambdaProlog

The real strength of lambdaProlog lies in the use that it makes of lambda terms as data structures and of higher-order unification as a means for probing these data structures. These particular features make the language very useful in a situation where the expressions in some other language have to be analysed and manipulated. There are several situations where one might want to do this kind of a thing. For example, when one tries to implement a theorem prover, one is manipulating formulas, which are expressions in the language of some chosen logic. Similarly when one thinks of synthesizing programs, one has to manipulate programs that are expressions in a chosen programming language. In the mentioned situations (and in many more), the kinds of expressions one is dealing with typically involve bound variables and the abstraction present in lambda terms becomes a valuable tool in representing this notion. This is why lambdaProlog is so useful in this context.

In this, the last, part of the handout some examples demonstrating the usefulness of lambdaProlog in the metalanguage realm are presented. Four examples are included:

- Type inference in a simple functional programming language
- Manipulation of expressions in a logic
- Manipulation of expressions in a functional programming language
- Implemention of an interactive theorem prover in lambdaProlog

Last modified: Sunday, May 5, 1996 by gopalan@cs.uchicago.edu