The Compilation of λProlog and its Execution with MALI
We present a compiled implementation of λProlog that uses the abstract memory MALI for representing the execution state. λProlog is a logic programming language allowing a more general clause form than Standard Prolog's (namely hereditary Harrop formulas instead of Horn formulas) and using simply typed λ-terms as a term domain instead of first order terms. The augmented clause form causes the program (a set of clauses) and the signature (a set of constants) to be changeable in a very disciplined way. The new term domain has a semi-decidable and infinitary unification theory, and it introduces the need for a fi-reduction operation at run-time. MALI is an abstract memory that is suitable for storing the search-state of depth-first search processes. Its main feature is its efficient memory management. We have used an original λProlog-to-C translation along which predicates are transformed into functions operating on continuations for handling failure and success in unifications, and change...