Defining Standard Prolog in Rewriting Logic

Abstract The coincidence between the model-theoretic and the procedural semantics of SLD-resolution does not carry over to a Prolog system that also implements non-logical features like cut and whose depth-first search strategy is incomplete. The purpose of this paper is to present the key concepts of a new, simple operational semantics of Standard Prolog in the form of rewriting rules. We use a novel linear representation of the Prolog tree traversal. A derivation is represented at the level of unification and backtracking. The rewriting system presented here can easily be implemented in a rewriting logic language, giving an executable specification of Prolog.

[1]  Egon Börger,et al.  A Mathematical Definition of Full Prolog , 1995, Sci. Comput. Program..

[2]  Olivier Ridoux,et al.  Continuations in lProlog , 1993, ICLP 1993.

[3]  Mikael Pettersson,et al.  Compiling Natural Semantics , 1999, Lecture Notes in Computer Science.

[4]  Richard A. O'Keefe,et al.  Efficient Implementation of a Defensible Semantics for Dynamic PROLOG Code , 1987, International Conference on Logic Programming.

[5]  James H. Andrews,et al.  Logic programming : operational semantics and proof theory , 1993 .

[6]  Richard A. O'Keefe,et al.  The Craft of Prolog , 1990 .

[7]  Neil D. Jones,et al.  Stepwise Development of Operational and Denotational Semantics for Prolog , 1984, International Conference on Spoken Language Processing.

[8]  Norman Y. Foo,et al.  A denotational semantics for Prolog , 1989, ACM Trans. Program. Lang. Syst..

[9]  David S. Warren Continuations in λProlog , 1993 .

[10]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[11]  Peter D. Mosses,et al.  Denotational semantics , 1995, LICS 1995.

[12]  Thomas Lindgren,et al.  A Continuation-Passing Style for Prolog , 1994, ILPS.

[13]  Claude Kirchner,et al.  Rule-Based Constraint Programming , 1998, Fundam. Informaticae.

[14]  Daniel M. Berry,et al.  Operational and Denotational Semantics of Prolog , 1987, J. Log. Program..

[15]  Erik P. de Vink,et al.  Comparative Semantics for PROLOG with Cut , 1990, Sci. Comput. Program..

[16]  Paul Tarau,et al.  Logic Programming and Logic Grammars with Binarization and First-order Continuations , 1994 .

[17]  MeseguerJosé Conditional rewriting logic as a unified model of concurrency , 1992 .

[18]  Pierre Deransart,et al.  Prolog - the standard: reference manual , 1996 .

[19]  Marianne Baudinet Proving Termination Properties of Prolog Programs: A Semantic Approach , 1988, LICS.

[20]  Saumya K. Debray,et al.  Denotational and Operational Semantics for Prolog , 1988, J. Log. Program..

[21]  Krzysztof R. Apt,et al.  Contributions to the Theory of Logic Programming , 1982, JACM.

[22]  Marija Kulas,et al.  A Rewriting Prolog Semantics , 2000 .

[23]  David A. Schmidt On the need for a popular formal semantics , 1997, SIGP.