The declarative semantics of the Prolog selection rule

We axiomatize the Prolog selection rule which always selects the leftmost literal in a goal. We introduce a new completion of a logic program which we call the l-completion of the program. The l-completion is formulated as a first-order theory in a language extended by new predicate symbols which express success, failure and left-termination of queries. The main results of the paper are the following. If a query succeeds, fails or is left-terminating under the Prolog selection rule, then the corresponding formula in the extended language is provable from the l-completion. Conversely, if a logic program and a query are correct with respect to some mode assignment and if one can prove in the l-completion that the query succeeds and is left-terminating, then the goal is successful and Prolog, using its depth first search, will compute an answer substitution for the goal. This result can even be extended to so called non-floundering queries.<<ETX>>

[1]  Keith L. Clark,et al.  Negation as Failure , 1987, Logic and Data Bases.

[2]  W. Buchholz Iterated Inductive Definitions and Subsystems of Analysis: Recent Proof-theoretical Studies , 1981 .

[3]  John C. Shepherdson,et al.  Negation as Failure: A Comparison of Clark's Completed Data Base and Reiter's Closed World Assumption , 1984, J. Log. Program..

[4]  Kenneth Kunen,et al.  Negation in Logic Programming , 1987, J. Log. Program..

[5]  Kenneth Kunen,et al.  Signed Data Dependencies in Logic Programs , 1989, J. Log. Program..

[6]  Robert F. Stärk,et al.  A Complete Axiomatization of the Three-Valued Completion of Logic Programs , 1991, J. Log. Comput..

[7]  Melvin Fitting,et al.  Bilattices and the Semantics of Logic Programming , 1991, J. Log. Program..

[8]  Serenella Cerrito,et al.  A Linear Axiomatization of Negation as Failure , 1992, J. Log. Program..

[9]  John C. Shepherdson Mints Type Deductive Calculi for Logic Programming , 1992, Ann. Pure Appl. Log..

[10]  Karl Stroetmann,et al.  A Completeness Result for SLDNF-Resolution , 1993, J. Log. Program..

[11]  John S. Schlipf,et al.  Commonsense Axiomatizations for Logic Programs , 1993, J. Log. Program..

[12]  Krzysztof R. Apt Declarative Programming in Prolog , 1993, ILPS.

[13]  Dino Pedreschi,et al.  Reasoning about Termination of Pure Prolog Programs , 1993, Inf. Comput..

[14]  Peter Schroeder-Heister Definitional Reflection and the Completion , 1993, ELP.

[15]  Kees Doets,et al.  From logic to logic programming , 1994, Foundations of computing series.

[16]  Robert F. Stärk,et al.  Input/Output Dependencies of Normal Logic Programs , 1994, J. Log. Comput..

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

[18]  Gerhard Jäger,et al.  A Deductive Approach to Logic Programming , 1995 .

[19]  Wlodzimierz Drabent,et al.  Completeness of SLDNF-Resolution for Nonfloundering Queries , 1993, J. Log. Program..