CS218 and CS318: Higher-Order Logic Programming
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:

The first example has already been discussed in class. The second and third examples are taken from the handbook paper on Higher-Order Logic Programming by Gopalan Nadathur and Dale Miller. The last example is based on ideas developed by Amy Felty in her thesis.
Last modified: Sunday, May 5, 1996 by gopalan@cs.uchicago.edu