Modular stratification and magic sets for DATALOG programs with negation
Kenneth Andrew Ross · Proceedings of the ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems · 1990
We propose a class of programs, called modularly stratified programs that have several attractive properties. Modular stratification generalizes stratification and local stratification, while allowing programs that are not expressible by stratified programs. For modularly stratified programs the well-founded semantics coincides with the stable model semantics, and makes every ground literal true or false. Modularly stratified programs are all weakly stratified, but the converse is false. Unlike some weakly stratified programs, modularly stratified programs can be evaluated in a subgoal-at-a-time fashion. We demonstrate a technique for rewriting a modularly stratified program for bottom-up evaluation and extend this rewriting to include magic-set techniques. The rewritten program, when evaluated bottom-up, gives the same answers as the well-founded semantics. We discuss extending modular stratification to other operators such as set-grouping and aggregation that have traditionally been stratified to prevent semantic difficulties.
Cited by 78 works. doi:10.1145/298514.298558 Open-access PDF
Authors
References
- Principles of database and knowledge-base systems
- The stable model semantics for logic programming
- The well-founded semantics for general logic programs
- An amateur's introduction to recursive query processing strategies
- An amateur's introduction to recursive query processing strategies
- On the Declarative Semantics of Deductive Databases and Logic Programs
- Unfounded sets and well-founded semantics for general logic programs
- On the power of magic
- Magic templates: a spellbinding approach to logic programs
- Proceedings of the international conference on fifth-generation computer systems