Dynamic Magic Sets for Disjunctive Datalog Programs

Author Mario Alviano

Thumbnail PDF


  • Filesize: 182 kB
  • 10 pages

Document Identifiers

Author Details

Mario Alviano

Cite AsGet BibTex

Mario Alviano. Dynamic Magic Sets for Disjunctive Datalog Programs. In Technical Communications of the 26th International Conference on Logic Programming. Leibniz International Proceedings in Informatics (LIPIcs), Volume 7, pp. 226-235, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2010)


Answer set programming (ASP) is a powerful formalism for knowledge representation and common sense reasoning that allows disjunction in rule heads and nonmonotonic negation in bodies. Magic Sets are a technique for optimizing query answering over logic programs and have been originally defined for standard Datalog, that is, ASP without disjunction and negation. Essentially, the input program is rewritten in order to identify a subset of the program instantiation which is sufficient for answering the query. Dynamic Magic Sets (DMS) are an extension of this technique to ASP. The optimization provided by DMS can be exploited also during the nondeterministic phase of ASP systems. In particular, after some assumptions have been made during the computation, parts of the program may become irrelevant to a query (because of these assumptions). This allows for dynamic pruning of the search space, which may result in exponential performance gains. DMS has been implemented in the dlv system and experimental results confirm the effectiveness of the technique.
  • Answer set programming
  • decidability
  • magic sets
  • disjunctive logic programs


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads