• DocumentCode
    1122685
  • Title

    Rule ordering in bottom-up fixpoint evaluation of logic programs

  • Author

    Ramakrishnan, Raghu ; Srivastava, Divesh ; Sudarshan, S.

  • Author_Institution
    Dept. of Comput. Sci., Wisconsin Univ., Madison, WI, USA
  • Volume
    6
  • Issue
    4
  • fYear
    1994
  • fDate
    8/1/1994 12:00:00 AM
  • Firstpage
    501
  • Lastpage
    517
  • Abstract
    Logic programs can be evaluated bottom-up by repeatedly applying all rules, in “iterations”, until the fixpoint is reached. However, it is often desirable-and, in some cases, e.g. programs with stratified negation, it is even necessary to guarantee the semantics-to apply the rules in some order. We present two algorithms that apply rules in a specified order without repeating inferences. One of them (GSN) is capable of dealing with a wide range of rule orderings, but with a little more overhead than the well-known seminaive algorithm (which we call BSN). The other (PSN) handles a smaller class of rule orderings, but with no overheads beyond those in BSN. We also demonstrate that by choosing a good ordering, we can reduce the number of rule applications (and thus the number of joins). We present a theoretical analysis of rule orderings and identify orderings that minimize the number of rule applications (for all possible instances of the base relations) with respect to a class of orderings called fair orderings. We also show that though nonfair orderings may do a little better on some data sets, they can do much worse on others. The analysis is supplemented by performance results
  • Keywords
    deductive databases; logic programming; program compilers; query processing; BSN; GSN; PSN; base relations; bottom-up fixpoint evaluation; control expression; cyclic ordering; deductive database; fair orderings; logic programs; performance results; query evaluation; rule ordering; semantics; Australia; Deductive databases; Inference algorithms; Iterative algorithms; Logic; Performance analysis; Query processing;
  • fLanguage
    English
  • Journal_Title
    Knowledge and Data Engineering, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    1041-4347
  • Type

    jour

  • DOI
    10.1109/69.298169
  • Filename
    298169