How to invent a Prolog machine

  • Peter Kursawe
Session 2a: Implementations And Architectures
Part of the Lecture Notes in Computer Science book series (LNCS, volume 225)


In this paper we study the compilation of Prolog by making visible hidden operations (especially unification), and then optimizing them using well-known partial evaluation techniques. Inspection of straight forward partially evaluated unification algorithms gives an idea how to design special abstract machine instructions which later form the target language of our compilation. We handle typical compiler problems like representation of terms explicitely. This work gives a logical reconstruction of abstract Prolog machine code, and represents an approach of constructing a correct compiler from Prolog to such a code. As an example, we are explaining the unification principles of Warren's New Prolog Engine within our framework.


Partial Evaluation Unification Algorithm Source Language Machine Instruction Prolog Program 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Bowe83]
    D.L.Bowen, L.M.Byrd, A Portable Prolog Compiler, Proc. of the Logic Programming Workshop (1983) Portugal 74–83.Google Scholar
  2. [ClMe84]
    W.F.Clocksin, C.S.Mellish, Programming in Prolog, 2nd Ed. Springer (1984).Google Scholar
  3. [Cloc85]
    W.F. Clocksin, Design and Simulation of a Sequential Prolog Machine, New Generation Computing 3 (1985) 101–120.Google Scholar
  4. [Ersh77]
    A.P. Ershov, On the Partial Evaluation Principle, Information Processing Letters Vol.6 No.2 (1977) 38–41.Google Scholar
  5. [Ersh82]
    A.P. Ershov, Mixed Computation: Potential Applications and Problems for Study, Theor. Comp. Sci. 18 (1982) 41–67.Google Scholar
  6. [Futa71]
    Y. Futamura, Partial Evaluation of Computation Process — an Approach to a Compiler-Compiler, Systems, Computers, Controls Vol.2, 5 (1971) 45–50.Google Scholar
  7. [HeAv84]
    N.Heck, J.Avenhaus, Automatic Implementation of Abstract Data Types Specified by the Logic Programming Language, Proc. of the International Conference on Fifth Generation Computer Systems 1984, ed. ICOT (1984) 210–219.Google Scholar
  8. [HsSr85]
    J. Hsiang, M.K. Srivas, A Prolog Environment for Developing and Reasoning about Data Types, in: Formal Methods and Software Development (Vol.2) (ed. by H.Ehrig et al.) LNCS 186 (1985) 276–293.Google Scholar
  9. [Jone85]
    N.D. Jones, P. Sestoft, H. Søndergaard, An Experiment in Partial Evaluation: The Generation of a Compiler Generator, 1st Int.Conf. on Rewriting Techniques and Applications, Dijon LNCS 202 (1985) 124–140.Google Scholar
  10. [KaCa84]
    K.M.Kahn, M.Carlsson, The Compilation of Prolog Programs without the Use of a Prolog Compiler, Proc. of the International Conference on Fifth Generation Computer Systems 1984, ed. ICOT (1984) 348–355.Google Scholar
  11. [Mell85]
    C.S. Mellish, Some Global Optimizations for a Prolog Compiler, Journal of Logic Programming 1 (1985) 43–66.Google Scholar
  12. [Neid86]
    B.Neidecker, KAP-Maschine: Maschinenmodell Version 0.5, forthcoming internal report, University of Karlsruhe 1986 (in German).Google Scholar
  13. [TiWa84]
    E. Tick, D.H.D. Warren, Towards a Pipelined Prolog Processor, New Generation Computing 2 (1984) 323–345.Google Scholar
  14. [Venk84]
    R. Venken, A Prolog Meta-Interpreter for Partial Evaluation and its Application to Source to Source Transformation and Query-Optimisation, ECAI 84, Elsevier Sc. Publ., North-Holland (1984) 91–104.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1986

Authors and Affiliations

  • Peter Kursawe
    • 1
  1. 1.Gesellschaft für Mathematik und Datenverarbeitung mbHForschungsstelle an der Universität KarlsruheKarlsruhe 1Germany (West)

Personalised recommendations