On compiling queries in recursive first-order databases
Journal of the ACM (JACM)
An amateur's introduction to recursive query processing strategies
SIGMOD '86 Proceedings of the 1986 ACM SIGMOD international conference on Management of data
Bottom-up beats top-down for datalog
PODS '89 Proceedings of the eighth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
Logic programming and databases
Logic programming and databases
Query evaluation in recursive databases: bottom-up and top-down reconciled
Data & Knowledge Engineering
Journal of Logic Programming
Logical query optimization by proof-tree transformation
PODS '89 Selected papers of the eighth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
SIGMOD '94 Proceedings of the 1994 ACM SIGMOD international conference on Management of data
Tabled evaluation with delaying for general logic programs
Journal of the ACM (JACM)
Foundations of Databases: The Logical Level
Foundations of Databases: The Logical Level
What You Always Wanted to Know About Datalog (And Never Dared to Ask)
IEEE Transactions on Knowledge and Data Engineering
OLD Resolution with Tabulation
Proceedings of the Third International Conference on Logic Programming
DATALOG with Constraints: A Foundation for Trust Management Languages
PADL '03 Proceedings of the 5th International Symposium on Practical Aspects of Declarative Languages
Translation and Optimization of Logic Queries: The Algebraic Approach
VLDB '86 Proceedings of the 12th International Conference on Very Large Data Bases
Optimization of Systems of Algebraic Equations for Evaluating Datalog Queries
VLDB '87 Proceedings of the 13th International Conference on Very Large Data Bases
A New Meta-complexity Theorem for Bottom-Up Logic Programs
IJCAR '01 Proceedings of the First International Joint Conference on Automated Reasoning
Heuristic and randomized optimization for the join ordering problem
The VLDB Journal — The International Journal on Very Large Data Bases
Binder, a Logic-Based Security Language
SP '02 Proceedings of the 2002 IEEE Symposium on Security and Privacy
Declarative information extraction using datalog with embedded extraction predicates
VLDB '07 Proceedings of the 33rd international conference on Very large data bases
Type inference for datalog and its application to query optimisation
Proceedings of the twenty-seventh ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems
OpenRuleBench: an analysis of the performance of rule engines
Proceedings of the 18th international conference on World wide web
From datalog rules to efficient programs with time and space guarantees
ACM Transactions on Programming Languages and Systems (TOPLAS)
Deriving predicate statistics in datalog
Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programming
Using datalog with binary decision diagrams for program analysis
APLAS'05 Proceedings of the Third Asian conference on Programming Languages and Systems
CodeQuest: scalable source code queries with datalog
ECOOP'06 Proceedings of the 20th European conference on Object-Oriented Programming
Deriving predicate statistics in datalog
Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programming
More efficient datalog queries: subsumptive tabling beats magic sets
Proceedings of the 2011 ACM SIGMOD International Conference on Management of data
Hi-index | 0.00 |
Given a set of Datalog rules, facts, and a query, answers to the query can be inferred bottom-up starting with the facts or top-down starting with the query. For efficiently answering the query, top-down evaluation is extended with tabling that stores the results of the subqueries encountered, and bottom-up evaluation is done on rules transformed based on demand from the query. This paper describes precise time and space complexity analysis for efficiently answering Datalog queries, and precise relationships between top-down evaluation with tabling and bottom-up evaluation driven by demand. We first present a systematic method for precisely calculating the worst-case time and space complexities of top-down evaluation with tabling. We then describe a method for transforming the rules for efficiently answering queries using bottom-up evaluation of the transformed rules; the method is akin to the magic set transformation, but is simpler and produces simpler rules that yield exponentially smaller space in the number of arguments of predicates. Next, we establish precise relationships between top-down evaluation with tabling and bottom-up evaluation of rules transformed based on demand. Finally, we support our analyses and comparisons through experiments on benchmarks from OpenRuleBench.