Abstract
Prolog is a simple but powerful programming language founded on symbolic logic. The basic computational mechanism is a pattern matching process (“unification”) operating on general record structures (“terms” of logic). We briefly review the language and compare it especially with pure Lisp. The remainder of the paper discusses techniques for implementing Prolog efficiently; in particular we describe how to compile the patterns involved in the matching process. These techniques are as incorporated in our DECsystem-10 Prolog compiler (written in Prolog). The code it generates is comparable in speed with that produced by existing DEC10 Lisp compilers. We argue that pattern matching is a better method for expressing operations on structured data than conventional selectors and constructors - both for the user and for the implementor.
- 1 Battani G and Meloni H {1973} Interpreteur du language de programmation Prolog. Groupe d'Intelligence Artificielle, Marseille-Luminy, 1973Google Scholar
- 2 Boyer R S and Moore J S {1972} The sharing of structure in theorem proving programs. Machine Intelligence 7 (ed. Meltzer & Michie), Edinburgh U. Press, 1972.Google Scholar
- 3 Bruynooghe M {1976} An interpreter for predicate logic programs: Part 1. Report CW 10, Applied Maths & Programming Division, Katholieke Univ Leuven, Belgium, Oct 1976.Google Scholar
- 4 Colmerauer A {1975} Les grammaires de metamorphase. Groupe d'Intelligence Artificielle, Marseille, Marseille-Luminy, Nov 1975.Google Scholar
- 5 DEC {1974} DECsystem10 System Ref Manual (3rd edition) Digital Equipment Corporation, Maynard, Mass. Aug 1974.Google Scholar
- 6 van Emden M H {1975} Programming with resolution logic. Report CS-75-30, Dept. of Computer Science, University of Waterloo, Canada. Nov 1975.Google Scholar
- 7 Hoare C A R {1973} Recursive data structures. Stanford AI Memo 223, Calif. Oct 1973.Google Scholar
- 8 Kowalski R A {1974} Logic for problem solving. DCL Memo 75, Dept of AI, Edinburgh. Mar 1974. Google ScholarDigital Library
- 9 McCarthy J et al. {1962} LISP 1.5 Programmer's Manual. MIT Press, MIT, Cambridge, Mass. Aug 1962. Google ScholarDigital Library
- 10 Pereira L M {1977} User's Guide to DECsystem-10 Prolog. Forthcoming publication, Divisao de Informatica, Lab. Nac. de Engenharia Civil, Lisbon. 1977.Google Scholar
- 11 Robinson J A {1965} A machine-oriented logic based on the resolution principle. JACM vol 12, pp. 23-44. 1965. Google ScholarDigital Library
- 12 Roussel P {1972} Definition et traitement de l'egalite formelle en demonstration automatique. These 3me. cycle, UER de Luminy, Marseille. 1972.Google Scholar
- 13 Roussel P {1975} Prolog: Manual de reference et d'utilisation. Groupe d'Intelligence Artificielle, Marseille-Luminy. Sep 1975.Google Scholar
- 14 Warren D H D {1977} Implementing Prolog - compiling predicate logic programs. Forthcoming report, Dept of AI, Edinburgh. 1977.Google Scholar
- 15 Weissman C {1976} Lisp 1.5 Primer. Dickenson Publishing Co. 1967.Google Scholar
Index Terms
- Prolog - the language and its implementation compared with Lisp
Recommendations
Prolog - the language and its implementation compared with Lisp
Proceedings of the 1977 symposium on Artificial intelligence and programming languagesProlog is a simple but powerful programming language founded on symbolic logic. The basic computational mechanism is a pattern matching process (“unification”) operating on general record structures (“terms” of logic). We briefly review the language and ...
Prolog - the language and its implementation compared with Lisp
Proceedings of the 1977 symposium on Artificial intelligence and programming languagesProlog is a simple but powerful programming language founded on symbolic logic. The basic computational mechanism is a pattern matching process (“unification”) operating on general record structures (“terms” of logic). We briefly review the language and ...
Prolog compared with LISP?
In the recent ACM Symposium on LISP and Functional Programming, there was a paper with the title "Prolog Compared With LISP" [2] . In it, Gutierrez presents a program in LISP, and a related program in Prolog, and uses the inferior performance of the ...
Comments