Skip to main content

The vienna abstract machine

  • Implementation Of Logic Programming
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 456))

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.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Appleby, K. et al., ‘Garbage Collection for Prolog Based on WAM', CACM, 31(6), 719–741, (JUNE 1988).

    Google Scholar 

  2. Beer, J., ‘The Occur-Check Problem Revisited', JLP 5(3), (1988).

    Google Scholar 

  3. Beer, J., ‘Concepts, Design, and Performance Analysis of a Parallel Prolog Machine', LNCS, 404, Springer-Verlag, (OCT. 1989).

    Google Scholar 

  4. Bell, J.R., ‘Threaded Code', CACM, 16(6), (1973).

    Google Scholar 

  5. Bowen, D.L. & Byrd, L.M. & Clocksin, W.F., ‘A portable Prolog compiler', Proc. Logic Programm. Workshop, Albufeira, Portugal, (1983).

    Google Scholar 

  6. Bruynooghe, M., ‘Garbage Collection in Prolog Interpreters', Implementations of Prolog, Campbell (ed.), Ellis Horwood, 259–267, (1984).

    Google Scholar 

  7. 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).

    Google Scholar 

  8. Demoen, B. & Mariën, A., ‘Inline expansion versus threaded code', 1654@kulcs.kulcs.uucp, comp.lang.prolog, USENET news, (28 APRIL 1989).

    Google Scholar 

  9. Gelbmann, M., Prolog Interpreter, Diplomarbeit (M.Thesis), Institut für Praktische Informatik, TU Wien,(1984).

    Google Scholar 

  10. Hermengildo, M., “High-Performance Prolog Implementation:” — The WAM and Beyond, Tutorial at ICLP89 Lissabon, (1989)

    Google Scholar 

  11. Krall, A., ‘Comparing Implementation Techniques for Prolog', VIP TR 1802/86/7, TU Wien, (1986).

    Google Scholar 

  12. Krall, A., ‘Implementation of a High-Speed Prolog Interpreter', ACM SIGPLAN, Conf. Interpr. and Interpretive Techn., 7(7), (1987).

    Google Scholar 

  13. Krall, A., Analyse und Implementierung von Prologsystemen, Dissertation TU Wien, (1988).

    Google Scholar 

  14. Kühn, e. & Ludwig, Th., ‘VIP-MDBS: A Logic Multidatabase System', IEEE Int. Symp. on Databases in Parallel and Distributed Systems, (1988).

    Google Scholar 

  15. Kursawe, P., ‘How to Invent a Prolog Machine', New Gen. Comp., 5 (1987) 97–114.

    Google Scholar 

  16. Mellish, C.S., ‘An Alternative to Structure Sharing in the Implementation of a Prolog Interpreter', Logic Programming, Academic Press, (1982).

    Google Scholar 

  17. 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).

    Google Scholar 

  18. Neumerkel, U., ‘Extensible Unification by Metastructures', Proc. Meta90, Leuven, Belgium, (1990).

    Google Scholar 

  19. Oppitz, M., et al., ‘VIP — A Prolog Programming Environment', TR 1802/85/1, TU-Wien, (1985).

    Google Scholar 

  20. Pichler, Ch., Prolog Übersetzer, Diplomarbeit (M.Thesis), Inst. f. Prakt. Informatik, TU-Wien, (1984).

    Google Scholar 

  21. Pittomvills, E., Bruynooghe, M. & Willems, Y.D. ‘Towards a Real Time Garbage Collector for Prolog', IEEE 1985 Symp. on Logic Programm., 185–198, (1985).

    Google Scholar 

  22. Tick, E., Memory Performance of Prolog Architectures, Kluwer Acad. Publ., (1988).

    Google Scholar 

  23. Caneghem, M. van, L'Anatomie de Prolog, InterÉditions, Paris, (1986).

    Google Scholar 

  24. Warren, D.H.D., ‘Implementing Prolog — compiling predicate logic programs, Vol. 1 & 2’, D.A.I. Res. Rep. No. 39 & No. 40, (MAY 1977).

    Google Scholar 

  25. Warren, D.H.D., ‘An Abstract Prolog Instruction Set', TR 309, SRI Int-l, (1983).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre Deransart Jan Maluszyński

Rights and permissions

Reprints 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

Publish with us

Policies and ethics