Abstract
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.
Preview
Unable to display preview. Download preview PDF.
References
J. Beer, Concepts, Design, and Performance Analysis of a Parallel Prolog Machine, Springer, 1989
J.R. Bell, Threaded Code, CACM 16(6), 1973.
T. Berger, Implementierung eines Prologcompilers basierend auf der Vienna Abstract Machine, M. Thesis, TU Wien, 1991.
M. Bruynooghe,’ The Memory Management of PROLOG Implementations', Logic Programming, Clark & Tårnlund (ed.), Academic Press, 1982.
M. Carlsson and J. Widén, SICStus Prolog User's Manual, SICS research report R88007C, 1990.
P. Cousot and R. Cousot,’ Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints', Forth Symp, Priciples of Programming Languages, ACM, 1977
A.M. Ertl and A. Krall,’ Instruction Scheduling for Complex Pipelines', Int. Workshop on Compiler Construction, LNCS, 1992
M. Gelbmann, Prolog Interpreter, M. Thesis, TU Wien, 1984
P.B. Gibbons and S.S. Muchnick,’ Efficient Instruction Scheduling for a pipelined architecture', in Proceedings of the SIGPLAN '86 Symposium on Compiler Construction, 1986
G. Kane, MIPS RISC Architecture, Prentice Hall, 1989.
A. Krall, Comparing Implementation Techniques for Prolog, VIP TR 1802/86/7, TU Wien, 1986.
A. Krall,’ Implementation of a High-Speed Prolog Interpreter', ACM SIGPLAN 22(7), Conf. on Interpreters and Interpretative Techniques, 1987.
A. Krall, Analyse und Implementierung von Prologsystemen, Ph.D. Thesis, TU Wien, 1988.
A. Krall,’ An Extended Prolog Instruction Set for RISC Processors', Int. Workshop on VLSI for AI and Neural Networks, Oxford, Plenum, 1991.
A. Krall, E. Kühn and U. Neumerkel,’ Distributed Logic Programming', EUUG Spring '89 Conference, Brussels, 1989.
A. Krall and U. Neumerkel,’ The Vienna Abstract Machine', PULP '90, LNCS, Springer, 1990.
E. Kühn and T. Ludwig,’ VIP-MDBS: A Logic Multidatabase System', Int. Symposium on Databases in Parallel and Distributed Systems, Austin Texas, 1988.
E. Kühn and F. Puntigam, The VPL Vienna Parallel Logic Language, TR 185/91/1, TU Wien, 1991.
A. Marien et al.,’ The impact of abstract interpretation: an experiment in code generation', Sixth Int. Conf. on Logic Programming, Lisbon, 1989.
C.S. Mellish,’ An Alternative to Structure Sharing in the Implementation of a Prolog Interpreter', Logic Programming, Clark & Tårnlund (ed.), Academic Press, 1982.
C.S. Mellish, 'some Global Optimizations for a Prolog Compiler', Journal of Logic Programming 2(1), 1985.
U. Neumerkel,’ Extensible Unification by Metastructures', Meta90, Leuven, 1990.
M. Oppitz et al., VIP — A Prolog Programming Environment, VIP TR 1802/85/1, TU Wien, 1985.
C. Pichler, Prolog übersetzer, M. Thesis, TU Wien, 1984.
H. Pohlai, Implementierung eines Prolog-Zwischcncodeinterpreters basierend auf der Vienna Abstract Machine, M. Thesis, TU Wien, 1991.
P.V. Roy and A.M. Despain,’ High-performance Logic Programming with the Aquarius Prolog Compiler', IEEE Computer, 1992
A. Taylor,’ Removal of Dereferencing and Trailing in Prolog Compilation', Sixth Int. Conf. on Logic Programming, Lisbon, 1989.
A. Taylor,’ LIPS on a MIPS', Seventh Int. Conf. on Logic Programming, Jerusalem, 1990.
D.H.D. Warren, An Abstract Prolog Instruction Set, SRI International, Technical Note 309, 1983.
H.S. Warren,’ Instruction scheduling for the IBM RISC System/6000 processor', IBM Journal of Research and Development, 1(34), 1990
R. Warren, M. Hermenegildo and S. Debray,’ On the Practicality of Global Flow Analysis of Logic Programs', Fifth Int. Conf. and Symposium on Logic Programming, Seattle, 1988.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Krall, A., Berger, T. (1992). Fast prolog with a VAM1p based Prolog compiler. In: Bruynooghe, M., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1992. Lecture Notes in Computer Science, vol 631. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55844-6_140
Download citation
DOI: https://doi.org/10.1007/3-540-55844-6_140
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55844-6
Online ISBN: 978-3-540-47297-1
eBook Packages: Springer Book Archive