Skip to main content
Log in

On implementing Prolog in functional programming

  • Special Issue
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

This report surveys techniques for implementing the programming language Prolog. It focuses on explaining the procedural semantics of the language in terms of functional programming constructs. The techniquessuccess continuations andproof streams are introduced, and it is shown how Horn clause interpreters can be built upon them. Continuations are well known from denotational semantics theory, in this paper it is shown that they are viable constructs in actual programs.

Other issues include implementation of logical variables, structure sharing vs. structure copying, determinacy, builtin predicates, andcut.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

References

  1. Abelson, H. and Sussman, G. J.: “Structure and interpretation of computer programs,” Draft (Department of EE and CS, MIT) (July, 1983) Sections 4.3 and 4.4.

  2. Boyer, R. S. and Moore, J. S.: “The sharing of structure in theorem proving programs,” Machine Intelligence, 7 (ed. Meltzer and Mitchie) (Edinburgh UP) (1972).

  3. Carlsson, M.: “LM-Prolog—The Language and Its Implementation,” UPMAIL Technical Report (Computing Science Department, Uppsala University) (forthcoming 1984).

  4. Carlsson, M. and Kahn, K. M.: “LM-Prolog User Manual,” UPMAIL Technical Report,No. 24 (Computing Science Department, Uppsala University) (1983).

  5. van Emden, R. H.: “An Interpreting Algorithm for Logic Programs,” Proc. 1st International Logic Programming Conference (Marseille) (1982).

  6. Greenblatt, R.: “The Lisp Machine,” MIT AI Lab Working Paper,79 (Cambridge MA) (November, 1974).

  7. Kahn, K. M. and Carlsson, M.: “How to Implement Prolog on a Lisp Machine,” in Implementations of Prolog, J. Campbell (ed.) (Ellis Horwood Ltd., Chichester) (1984).

    Google Scholar 

  8. Kohlbecker, E.: “eu-Prolog,” Technical Report,No. 155 (Indiana University, Computer Science Department, Broomington IN) (April, 1984).

    Google Scholar 

  9. Komorowski, H. J.: “QLOG—The Software for Prolog and Logic Programming,” in Logic Programming, K. Clark and S.-Å. Tärnlund (eds.) (Academic Press, London) (1982).

    Google Scholar 

  10. Komorowski, H.J.: “A Specification of an Abstract Prolog Machine and Its Application to Partial Evaluation,” Ph. D. Thesis (Linköping University, Linköping) (1981).

    Google Scholar 

  11. Kornfeld, W. A.: “Equality for Prolog,” Proc. 8th IJCAI (Karlsruhe) (1983).

  12. McCabe, F.: “Abstract PROLOG machine—a specification” Department of Computing, Imperial College, London) (1983).

    Google Scholar 

  13. Mellish, C. S.: “An Alternative to Structure Sharing in the Implementation of a Prolog Interpreter,” in Logic Programming, K. Clark and S.-Å. Tärnlund (eds.) (Academic Press, London) (1982).

    Google Scholar 

  14. Mellish, C. S. and Hardy, S.: “Integrating Prolog in the POPLOG environment,” in Implementations of Prolog, J. Campbell (ed.) (Ellis Horwood Ltd., Chichester) (1984).

    Google Scholar 

  15. Nakashima, H.: “Prolog/KR Language Features,” Proc. First Logic Programming Conference (Marseille) (September, 1982).

  16. Nilsson, M.: “Foolog—A Small and Efficient Prolog Interpreter,” Technical Report,No. 20 (UPMAIL, Uppsala University) (June, 1983).

  17. Robinson, J. A. and Sibert, E. E.: “Logic Programming in LISP” (School of Computer and Information Science, Syracuse University) (1980).

  18. Strachey, C. and Wadsworth, C. P.: “Continuations—A Mathematical Semantics for Handling Full Jumps” (Programming Research Group, Oxford University) (1974).

  19. Warren, D. H. D.: “Implementing Prolog—compiling predicate logic programs” (Department of Artificial Intelligence, University of Edinburgh) (1977).

  20. Warren, D. H. D.: “An Abstract Prolog Instruction Set” Technical Note,309 (Artificial Intelligence Center, SRI International) (October, 1983).

Download references

Author information

Authors and Affiliations

Authors

Additional information

Adapted from the paper “On Implementing Prolog In Functional Programming” by MATS CARLSSON appearing in 1984 INTERNATIONAL SYMPOSIUM ON LOGIC PROGRAMMING, February 6–9, 1984, Atlantic City, NJ, pp. 154–159. Copyright © 1984 IEEE.

About this article

Cite this article

Carlsson, M. On implementing Prolog in functional programming. New Gener Comput 2, 347–359 (1984). https://doi.org/10.1007/BF03037326

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037326

Keywords

Navigation