Evaluation of Declarative n-Queens Recursion: A Deductive Database Approach

Can we evaluate a logic program declaratively? That is, can a logic program be evaluated correctly and efficiently, independent of query modes and rule/predicate ordering, finding a complete set of answers, and terminating properly? the answer could be “yes”, at least for a good subclass of logic programs, based on our investigation and experimentation using a deductive database approach. In this paper, an n-queens problem, a classical logic program, is used as a running example to demonstrate the methodology. Our analysis shows that binding analysis and constraint exploration are two essential issues in the realization of declarative logic programming. The limitations of our methodology are also discussed in the paper.

[1]  Divesh Srivastava,et al.  CORAL - Control, Relations and Logic , 1992, VLDB.

[2]  Jiawei Han,et al.  Constraint-Based Query Evaluation in Deductive Databases , 1994, IEEE Trans. Knowl. Data Eng..

[3]  Lawrence J. Henschen,et al.  On compiling queries in recursive first-order databases , 1984, JACM.

[4]  Leon Sterling,et al.  The Art of Prolog , 1987, IEEE Expert.

[5]  R. Dechter to Constraint Satisfaction , 1991 .

[6]  Michael J. Maher,et al.  Expanding Query Power in Constraint Logic Programming Languages , 1989, NACLP.

[7]  Richard E. Korf,et al.  Pruning Duplicate Nodes in Depth-First Search , 1993, AAAI.

[8]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[9]  Abraham Silberschatz,et al.  Database System Concepts , 1980 .

[10]  Catriel Beeri,et al.  On the power of magic , 1987, J. Log. Program..

[11]  Pascal Van Hentenryck Constraint satisfaction in logic programming , 1989, Logic programming.

[12]  Peter J. Stuckey,et al.  An Introduction to Aditi Deductive Database System , 1991, Aust. Comput. J..

[13]  Raghu Ramakrishnan,et al.  Review - Magic Sets and Other Strange Ways to Implement Logic Programs , 1999, ACM SIGMOD Digit. Rev..

[14]  Richard E. Korf Linear-Space Best-First Search: Summary of Results , 1992, AAAI.

[15]  Jiawei Han,et al.  Automatic generation of compiled forms for linear recursions , 1992, Inf. Syst..

[16]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

[17]  Richard E. Korf,et al.  Depth-First vs. Best-First Search: New Results , 1993, AAAI.

[18]  Janice M. Stone,et al.  Efficient Search Techniques - An Empirical Study of the N-Queens Problem , 1987, IBM J. Res. Dev..

[19]  Jiawei Han,et al.  Compilation-Based List Processing in Deductive Databases , 1992, EDBT.

[20]  Carlo Zaniolo,et al.  The LDL System Prototype , 1990, IEEE Trans. Knowl. Data Eng..

[21]  David A. McAllester,et al.  Nondeterministic Lisp as a Substrate for Constraint Logic Programming , 1993, AAAI.

[22]  J. Gaschnig Performance measurement and analysis of certain search algorithms. , 1979 .

[23]  Jeffrey D. Ullman,et al.  A Survey of Research in Deductive Database Systems , 1995 .

[24]  Carlo Zaniolo Proceedings of the 1986 ACM SIGMOD International Conference on Management of Data, Washington, DC, USA, May 28-30, 1986 , 1986 .

[25]  Stuart C. Shapiro,et al.  Encyclopedia of artificial intelligence, vols. 1 and 2 (2nd ed.) , 1992 .

[26]  Ling Liu,et al.  LogicBase: A System Prototype for Deductive Query Evaluation , 1993, Workshop on Programming with Logic Databases , ILPS.

[27]  Bin Jiang,et al.  A suitable algorithm for computing partial transitive closures in databases , 1990, [1990] Proceedings. Sixth International Conference on Data Engineering.