Abstract
This paper deals with the implementation of logic queries where array structures are manipulated. Both top-down and bottom-up implementations of the presented logic language, called DatalogA, are considered. Indeed, SLD-resolution is generalized to realize DatalogA top-down query answering. Further, a fixpoint based evaluation of DatalogA queries is introduced, which forms the basis for efficient bottom-up implementation of queries obtained by generalizing rewriting techniques such as magic set method to the case of DatalogA programs.
Similar content being viewed by others
References
S. Abiteboul and C. Beeri. On the power of languages for the manipulation of complex objects. INRIA Technical Report 846, May 1988.
S. Abiteboul and P. Kanellakis. Object identity as a query language primitive.ACM SIGMOD Conf. 1989, 159–173.
A.V. Aho, J.E. Hopcropt, and J.D. Ullman.The Design and analysis of Computer Algorithms. Addison-Wesley, 1974.
A.V. Aho and J.D. Ullman. Universality of Data Retrieval Languages. InProceedings of the Sixth ACM Symposium on Principles of Programming Languages, 1979.
C. Apt. Introduction to Logic Programming. InThe Handbook of Theoretical Computer Science. (van Leuween ed.), 1990.
F. Bancilhon, D. Mayer, Y. Sagiv, and J.F. Ullman. Magic sets and other strange ways to implement logic programs. InProceedings of the Fifth ACM Symposium on Principles of Database Systems, 1986, pages 1–15.
F. Bancilhon and R. Ramakrisnhan. Performance evaluation of data intensive logic programs. In J. Minker, editor,Foundations of Deductive Databases and Logic Programming, Morgan-Kaufman, Los altos, CA, 1988, pages 439–518.
C. Beeri and R. Ramakrisnhan. On the power of magic.Journal of Logic Programming, Vol 10, No 3 & 4, 1991, pages 255–299.
P. Bonatti and T. Eiter. Querying disjunctive databases through non-monotonic logics. InProceedings of the Fifth International Conference on Database Theory (ICDT-95), pages 68–81, 1995.
M. Cadoli, T. Eiter and G. Gottlob. Default Logic as a Query Language. InProceedings of the Fourth International Conference on Principles of Knowledge Representation and Reasoning, Bonn, Germany, pages 99–108, 1994. Full version to appear in IEEE Trans. on Knowledge and Data Engineering.
W. F. Clocksin and C. S. Mellish.Prolog-Programming in Logic. Spinger-Verlag, 1987.
R. A. Di Paola. The Recursive Unsolvability of the Decision Problem for a Class of Definite Formulas.Journal of ACM, Vol. 16, No. 2, 1969, pages 324–327.
M. Gelfond and V. Lifschitz. The stable model semantics of logic programming. InProc. of the Fifth Intern. Conf. on Logic Programming, pages 1070–1080, 1988.
J. I. Glasgow, M. A. Jenkins, E. Blevis, and M. P. Féret. Logic Programming with Arrays.IEEE Transaction on Knowledge and Data Engineering, 3(3), September 1991, pages 307–319.
S. Greco and C. Zaniolo, Optimization of linear logic programs using counting methods. InProceedings of the Extending Database Technology, 1992, pages 187–220.
S. Greco, L. Palopoli and E. Spadafora, Extending Datalog with Arrays. DEIS Technical Report, 1995.
S. Greco, D. Saccà, C. Zaniolo. The Pushdown Method for the Optimization of Chain Logic Programs, Proc. Int. Colloquium on Automata, Languages and Programming, 1995.
R. Haddad and J. Naughton, A counting algorithm for a cyclic binary query.Journal of Computer and System Science, Vol. 43, No. 1, 1991, 145–169.
R. Krishnamurthy, R. Ramakrishnan, and O. Shmueli. A Framework for Testing Safety and effective Computability of Extended Datalog.Proc. of the 1987 ACM SIGMOD Int. Conf. on Management of Data, 1987, pages 154–163.
J. W. Lloyd.Foundations of Logic Programming. Spinger-Verlag, 1987.
D. Maier, and B. Vance. A call for order.Proc. of the Twelfth ACM Symposium on Principles of Database Systems, 1993, pages 1–16.
A. Marchetti-Spaccamela, A. Pelaggi and D. Saccà. Comparison of methods for logic query implementation.Journal of Logic Programming, 10 (3 & 4), 1991, pages 333–361.
T. More. Axioms and theorems for a theory of array.IBM Journal of Research and Development,17(2), March 1973.
S. Naqvi and S. Tsur.A Logic Language for Data and Knowledge Bases. Computer Science Press, New York, 1989.
J. Naughton, R. Ramakrisnhan, Y. Sagiv, and J.F. Ullman. Argument reduction by factoring. InProc. of the 15th Conf. on Very Large data Bases, 1989, pages 173–182.
J. Naughton, R. Ramakrisnhan, Y. Sagiv, and J.F. Ullman. Efficient evaluation of right-, left-, and multi-linear rules. InProceedings of the 1988 ACM SIGMOD Int. Conf. on Management of Data, 1989, pages 235–242.
W. Nejdl. Recursive Strategies for Answering Recursive Queries—The RQA/FQI Strategy. InProc. of the 13th Conf. on Very Large data Bases, 1987, pages 43–50.
M.S. Paterson, and M.N. Wegman Linear Unification. InJournal of Computer and System Sciences, No. 16, 1978, pages 158–167.
T. Przymusinski, Perfect model semantics. InProceedings of the 1988 Int. Conf. on Logic Programming, 1988, pages 1081–1096.
R. Ramakrishnan, D. Srivastava, and S. Sudarshan. CORAL: Control, Relations and Logic.Proc. of the 18th Int. Conf. of Very Large Data Bases, 1992, pages 238–250.
R. Ramakrishnan, P. Seshadri, D. Srivastava, and S. Sudarshan. The CORAL user manual: A tutotial introduction to CORAL. Manuscript, 1993.
D. Saccà and C. Zaniolo, The generalized counting method of recursive logic queries for databases.Theoretical Computer Science, No. 62, 1988, pages 187–220.
O. Shmueli. Decidability and Expressiveness aspects of logic queries.Proc. of the Sixth ACM Symposium on Principles of Database Systems, 1987, pages 237–249.
J.D. Ullman.Principles of Data and Knowledge Bases. Vol. 1 & 2. Academic Press, 1988.
S.L. Vandenberg, and D.J. De-Witt. Algebraic support for complex objects with arrays, identity and inheritance.Proc. of the 1991 ACM SIGMOD Int. Conf. on Management of Data, pages 158–167, 1991.
A. Van Gelder, K. A. Ross, and J. S. Schlipf. The well-founded semantics for general logic programs.Journal of ACM,38(3):620–650, 1991.
L. Vielle. Database-complete proof procedures based on SLD-resolution, InProceedings of the 1987 Int. Conf. on Logic Programming, 1987, pages 74–103.
L. Vielle. Recursive Query processing: The Power of Logic.Theoretical Computer Science. No. 69, 1989, pages 1–53.
Author information
Authors and Affiliations
Additional information
Work partially supported by a European Union grant under the EC-US project “DEUS EX MACHINA: nondeterminism for deductive databases” and by a MURST grant (40% share) under the project “Sistemi formali e strumenti per basi di dati evolute”.
Rights and permissions
About this article
Cite this article
Greco, S., Palopoli, L. & Spadafora, E. Querying datalog with arrays: Design and implementation issues. Journal of Systems Integration 6, 299–327 (1996). https://doi.org/10.1007/BF02265082
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF02265082