Abstract
The Vienna Abstract Machine (VAM) is a Prolog machine developed at the TU Wien. In contrast to the standard implementation technique (Warren Abstract Machine — WAM), an inference in VAM is performed by unifying the goal and head immediately, instead of bypassing arguments through a register interface. We present two implementations for VAM: VAM2P and VAM1P . VAM2P is well suited for an intermediate code emulator (e.g. direct threaded code) which uses two instruction pointers for both goal code and head code. During an inference VAM2P fetches one instruction from the goal code, and one instruction from the head code and executes the combined instruction. More optimization is therefore possible, since information about the calling goal and the head of the clause is available at the same time. VAM performs cheap shallow back-tracking, needs less dereferencing and trailing and implements a faster cut. In a Prolog with the occur-check, VAM omits many unnecessary operations. VAM1P is designed for native code compilation. It combines instructions at compile time and supports several optimizations, such as fast last-call optimization. In this paper we present the VAM in detail and compare it with existing machines.
Preview
Unable to display preview. Download preview PDF.
References
Appleby, K. et al., ‘Garbage Collection for Prolog Based on WAM', CACM, 31(6), 719–741, (JUNE 1988).
Beer, J., ‘The Occur-Check Problem Revisited', JLP 5(3), (1988).
Beer, J., ‘Concepts, Design, and Performance Analysis of a Parallel Prolog Machine', LNCS, 404, Springer-Verlag, (OCT. 1989).
Bell, J.R., ‘Threaded Code', CACM, 16(6), (1973).
Bowen, D.L. & Byrd, L.M. & Clocksin, W.F., ‘A portable Prolog compiler', Proc. Logic Programm. Workshop, Albufeira, Portugal, (1983).
Bruynooghe, M., ‘Garbage Collection in Prolog Interpreters', Implementations of Prolog, Campbell (ed.), Ellis Horwood, 259–267, (1984).
Carlsson, M., ‘Freeze, Indexing and Other Implementation Issues in the WAM', Proc. 4th Int. Conf. Logic Programm., Melbourne, Lassez, J.-L. (ed.), MIT Press, (1987).
Demoen, B. & Mariën, A., ‘Inline expansion versus threaded code', 1654@kulcs.kulcs.uucp, comp.lang.prolog, USENET news, (28 APRIL 1989).
Gelbmann, M., Prolog Interpreter, Diplomarbeit (M.Thesis), Institut für Praktische Informatik, TU Wien,(1984).
Hermengildo, M., “High-Performance Prolog Implementation:” — The WAM and Beyond, Tutorial at ICLP89 Lissabon, (1989)
Krall, A., ‘Comparing Implementation Techniques for Prolog', VIP TR 1802/86/7, TU Wien, (1986).
Krall, A., ‘Implementation of a High-Speed Prolog Interpreter', ACM SIGPLAN, Conf. Interpr. and Interpretive Techn., 7(7), (1987).
Krall, A., Analyse und Implementierung von Prologsystemen, Dissertation TU Wien, (1988).
Kühn, e. & Ludwig, Th., ‘VIP-MDBS: A Logic Multidatabase System', IEEE Int. Symp. on Databases in Parallel and Distributed Systems, (1988).
Kursawe, P., ‘How to Invent a Prolog Machine', New Gen. Comp., 5 (1987) 97–114.
Mellish, C.S., ‘An Alternative to Structure Sharing in the Implementation of a Prolog Interpreter', Logic Programming, Academic Press, (1982).
Neumerkel, U., ‘Metastrukturen in Prolog', Abschlußbericht des Jubiläumsfondsprojektes Nr.2791 der Oesterr. Nationalbank, (1988); also VIP TR 1802/88/4, TU Wien, (1988).
Neumerkel, U., ‘Extensible Unification by Metastructures', Proc. Meta90, Leuven, Belgium, (1990).
Oppitz, M., et al., ‘VIP — A Prolog Programming Environment', TR 1802/85/1, TU-Wien, (1985).
Pichler, Ch., Prolog Übersetzer, Diplomarbeit (M.Thesis), Inst. f. Prakt. Informatik, TU-Wien, (1984).
Pittomvills, E., Bruynooghe, M. & Willems, Y.D. ‘Towards a Real Time Garbage Collector for Prolog', IEEE 1985 Symp. on Logic Programm., 185–198, (1985).
Tick, E., Memory Performance of Prolog Architectures, Kluwer Acad. Publ., (1988).
Caneghem, M. van, L'Anatomie de Prolog, InterÉditions, Paris, (1986).
Warren, D.H.D., ‘Implementing Prolog — compiling predicate logic programs, Vol. 1 & 2’, D.A.I. Res. Rep. No. 39 & No. 40, (MAY 1977).
Warren, D.H.D., ‘An Abstract Prolog Instruction Set', TR 309, SRI Int-l, (1983).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1990 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Krall, A., Neumerkel, U. (1990). The vienna abstract machine. In: Deransart, P., Maluszyński, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1990. Lecture Notes in Computer Science, vol 456. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0024180
Download citation
DOI: https://doi.org/10.1007/BFb0024180
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53010-7
Online ISBN: 978-3-540-46298-9
eBook Packages: Springer Book Archive