Magically constraining the inverse method using dynamic polarity assignment

  • Authors:
  • Kaustuv Chaudhuri

  • Affiliations:
  • INRIA Saclay, France

  • Venue:
  • LPAR'10 Proceedings of the 17th international conference on Logic for programming, artificial intelligence, and reasoning
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Given a logic program that is terminating and mode-correct in an idealised Prolog interpreter (i.e., in a top-down logic programming engine), a bottom-up logic programming engine can be used to compute exactly the same set of answers as the top-down engine for a given mode-correct query by rewriting the program and the query using the Magic Sets Transformation (MST). In previous work, we have shown that focusing can logically characterise the standard notion of bottom-up logic programming if atomic formulas are statically given a certain polarity assignment. In an analogous manner, dynamically assigning polarities can characterise the effect of MST without needing to transform the program or the query. This gives us a new proof of the completeness of MST in purely logical terms, by using the general completeness theorem for focusing. As the dynamic assignment is done in a general logic, the essence of MST can potentially be generalised to larger fragments of logic.