Decomposition of magic rewriting

  • Authors:
  • Ke Wang;Weining Zhang;Siu-Cheung Chau

  • Affiliations:
  • National University of Singapore, Lower Kent Ridge Road, Singapore;University of Lethbridge, Lethbridge, Alberta, Canada;University of Lethbridge, Lethbridge, Alberta, Canada

  • Venue:
  • Journal of the ACM (JACM)
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

The magic rewriting focuses on relevant data but suffers from additional rules, predicates, and tuples that are generated in search for the relevant data. Reducing the arity of predicates can cut down the number of such rules, predicates, and tuples by an exponential factor. In this paper, we consider a subclass of linear single-IDB programs and show that the magic rewriting can be decomposed in such a way that it is applied to only programs having smaller arities and fewer recursive rules, without losing the binding capacity. The decomposed rewriting is shown to be much more efficient than the standard one and amenable to distributed and parallel environments. The considered subclass significantly generalizes recursions previously proposed for efficient implementation. The decomposed rewriting and the standard generalized magic rewriting are extended to multi-binding queries in such a way that data relevant to one binding is not necessarily considered as relevant to other bindings. The work in this paper shows the use of tuple ID as an important technique in optimizing logic programs.