Fast Prolog with VAM1p based Prolog Compiler

The VAM (Vienna Abstract Machine) is a Prolog machine developed at the TU Wien. In contrast to the standard implementation technique (Warren Abstract Machine) an inference in the VAM is performed by unifying the goal and head arguments in a single undivided step. The interpreter based VAM2p implements unification by combining head and goal instructions during run time whereas the compiler based VAM1p combines the instructions during compile time. This enables compilers based on the VAM1p to make extensive optimizations like variable elimination, instruction elimination, extended clause indexing and fast last-call optimizations. This results in fast execution and small stack sizes. Our prototype compiler is implemented in Prolog and emits intermediate VAM1p code. This intermediate code is translated to native code instructions for the MIPS R3000 processor. The native code instructions are reordered using a Prolog based instruction scheduler and assembled using the MIPS assembler. The resulting programs achieve 3.1 MLips on a DecStation 5000/200.

[1]  James R. Bell,et al.  Threaded code , 1973, CACM.

[2]  Gerda Janssens,et al.  The Impact of Abstract Interpretation: An Experiment in Code Generation , 1989, International Conference on Logic Programming.

[3]  Andrew Taylor Removal of Dereferencing and Trailing in Prolog Compilation , 1989, ICLP.

[4]  Christo Dichev,et al.  Distributed Logic Programming , 1991, ALPUK.

[5]  Andreas Krall An Extended Prolog Instruction Set for RISC Processors , 1991 .

[6]  Henry S. Warren,et al.  Instruction Scheduling for the IBM RISC System/6000 Processor , 1990, IBM J. Res. Dev..

[7]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[8]  eva Kühn,et al.  VIP-MDBS: A Logic Multidatabase System , 1988, Proceedings [1988] International Symposium on Databases in Parallel and Distributed Systems.

[9]  Andreas Krall,et al.  Instruction Scheduling for Complex Pipelines , 1992, CC.

[10]  Maurice Bruynooghe,et al.  The memory management of PROLOG implementations , 1980 .

[11]  A. Krall Implementation of a high-speed Prolog interpreter , 1987, PLDI 1987.

[12]  Peter Van Roy,et al.  High-performance logic programming with the Aquarius Prolog compiler , 1992, Computer.

[13]  Chris Mellish,et al.  Some Global Optimizations for a Prolog Compiler , 1985, J. Log. Program..

[14]  Ulrich Neumerkel,et al.  The Vienna Abstract Machine , 1990, PLILP.

[15]  Saumya K. Debray,et al.  On the Practicality of Global Flow Analysis of Logic Programs , 1988, ICLP/SLP.

[16]  Joachim Beer Concepts, Design, and Performance Analysis of a Parallel Prolog Machine , 1989, Lecture Notes in Computer Science.