Pruning in Logic Programming

The logic programming community has a love{hate relationship with operators for pruning the search space of logic programs such as cut, commit, once, conditionals and variations on these. Pruning operators typically are not declarative, result in incom-pleteness and/or unsoundness, decrease readability and exibility of code and make program analysis and transformation more diicult. Despite this, nearly all non-trivial Prolog programs contain cuts, nearly all more recent logic programming languages have similar pruning operators and many languages insist on pruning operators in every clause. In practice, logic programming is less logical than functional programming. Why it this so? Do we really need pruning operators? Can we have suuciently powerful pruning operators which do not destroy the declarative semantics of programs? How are pruning operators related to logic, modes, functions and lazy evaluation? This paper attempts to answer some of these questions.

[1]  Robert A. Kowalski,et al.  Predicate Logic as Programming Language , 1974, IFIP Congress.

[2]  Paul J. Voda The Logical Reconstruction of Cuts as One Solution Operators , 1989, International Workshop on Meta-Programming in Logic.

[3]  Lee Naish Proving Properties of Committed Choice Logic Programs , 1989, J. Log. Program..

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

[5]  Seif Haridi,et al.  Programming Paradigms of the Andorra Kernel Language , 1991, ISLP.

[6]  Lee Naish,et al.  Coroutining and the construction of terminating logic programs , 1992 .

[7]  Steven Gregory Design, application and implementation of a parallel logic programming language , 1985 .

[8]  Michael Hanus,et al.  The Integration of Functions into Logic Programming: From Theory to Practice , 1994, J. Log. Program..

[9]  Torkel Franzén Logical aspects of the Andorra Kernal Language , 1991 .

[10]  Gert Smolka Making control and data flow in logic programs explicit , 1984, LFP '84.

[11]  Lee Naish,et al.  Negation and Quantifiers in NU-Prolog , 1986, ICLP.

[12]  Zoltan Somogyi,et al.  The Execution Algorithm of Mercury, an Efficient Purely Declarative Logic Programming Language , 1996, J. Log. Program..

[13]  John W. Lloyd,et al.  Properties of a Pruning Operator , 1990, Journal of Logic and Computation.

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

[15]  Richard A. O'Keefe,et al.  On the Treatment of Cuts in Prolog Source-Level Tools , 1985, SLP.