Contributing to Functional Programming in Logic

Bradley Richards · Sound Ideas (University of Puget Sound) · 1990

In logic programming, computations are described as relations between inputs and outputs. This is a powerful paradigm, and well-suited to expressing many computations, but there are classes of problems that can be specified more naturally in the functional programming style. Adding functional programming facilities to Prolog results in a more powerful language, as they allow higher-order functional expressions to be evaluated conveniently within the logic programming environment. And, as will be shown in this thesis, the efficiency of functional programming in logic is competitive with other functional evaluation techniques. This thesis presents two methods for evaluating higher-order functional expressions in logic. The first uses equational function definitions as inputs to a logicbased term-rewriting system. The second compiles the same equations into equivalent clauses that can be directly executed by Prolog. Programs are developed for translating between λ-expressions and equations, for performing rewriting, and for compiling equations into Prolog clauses. In addition, benchmarks are run to compare the evaluation speed of these methods to a pair of Lisp implementations.

Read the paper · More papers on PaperTik