SLDMagic - The Real Magic (With Applications to Web Queries)

  • Authors:
  • Stefan Brass

  • Affiliations:
  • -

  • Venue:
  • CL '00 Proceedings of the First International Conference on Computational Logic
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

The magic set technique is a standard technique for query evaluation in deductive databases, and its variants are also used in modern commercial database systems like DB2. Numerous improvements of the basic technique have been proposed. However, each of these optimizations makes the transformation more complicated, and combining them in a single system is at least difficult. In this paper, a new transformation is introduced, which is based on partial evaluation of a bottom-up meta-interpreter for SLD-resolution. In spite of its simplicity, this technique gives us a whole bunch of optimizations for free: For instance, it contains a tail recursion optimization, it transforms non-recursive into non-recursive programs, it can pass arbitary conditions on the parameters to called predicates, and it saves the join necessary to get subquery results back into the calling context. In this way, it helps to integrate many of the previous efforts. The usefulness of these optimizations is illustrated with example programs querying the World Wide Web.