Abstract
In ‘expert systems’ and other applications of logic programming, the issue arises of whether to use rules for forward or backward inference, i.e. whether deduction should be driven by the facts available to the program or the questions that are put to it. Often some mixture of the two is cheaper than using either mode exclusively.
We show that, under two restrictive assumptions, optimal choices of directions for the rules can be made in time polynomial in the number of rules in the system. If we abandon one of these restrictions, the optimal choice is NP-complete. Search methods are presented which allow graceful degradation from polynomial time to exponential time.
The cost estimates on which the optimisation is based are also discussed. The methods used to estimate costs fail when recursion is present in the rules, thus limiting the set of logic programs to which this optimisation can be applied.
Similar content being viewed by others
References
Boyer, Robert S., Locking: A Restriction of Resolution, PhD thesis, University of Texas at Austin (1971).
Chang, C. L. and Lee, R. C. T., Symbolic Logic and Mechanical Theorem Proving, Academic Press (1973).
Garey, M. R., and Johnson, D. S., Computers and Intractability. W. H. Freeman, 1979.
Henschen, L. J., and Naqvi, S. A., ‘Compiling queries in recursive first order databases’. Journal of the ACM, 31(1), 47–85 (1984).
Martelli, A., and Montanari, U., ‘An efficient unification algorithm’. ACM Transactions on Programming Languages and Systems, 4(2); 258–282 (1982).
McKay, D. P., and Shapiro, S., ‘Using active connection graphs for reasoning with recursive rules’. In Proceedings of the Seventh International Joint Conference on Artificial Intelligence, pages 368–374, Vancouver (1981).
Naqvi, S. A., and Henschen, L. J., ‘Performing inferences over recursive data bases’. In Proceedings of the First National Conference on Artificial Intelligence, pages 263–265, American Association for Artificial Intelligence (1980).
Nilsson, N. J., Principles of Artificial Intelligence. Tioga, Palo Alto, 1980.
Papadimitriou, Christos, Personal communication (1985).
Pearl, Judea, ‘Knowledge versus search: a quantitative analysis using A*’. Artificial Intelligence, 20(1), 1–14 (1983).
Robinson, J. A., ‘A machine-oriented logic based on the resolution principle’. Journal of the ACM, 12(1), 23–41 (1965).
Roussopoulos, Nicholas, ‘Indexing views in a relational database’. ACM Transactions on Database Systems, 7(2), 258–290 (1982).
Smith, David E., and Genesereth, Michael R., ‘Ordering conjunctive queries’. Artificial Intelligence, 26(2), 171–215 (1985).
Sleator, D., An O(nm log n) Algorithm for Maximal Network Flow. PhD thesis, Stanford University (1980).
Smith, David E., Controlling Inference. PhD thesis, Stanford University (1985).
Treitel, R. J., Sequentialization of Logic Programs. PhD thesis, Stanford University (1986).
Ullman, Jeffrey D., Implementation of Logical Query Languages for Databases. Technical Report STAN-CS-84-1000, Stanford University (1984).
Warren, D. H. D., Implementing Prolog — Compiling Predicate Logic Programs. D.A.I. Research Report 39 and 40, University of Edinburgh (1977).
Author information
Authors and Affiliations
Additional information
This work was supported by the Office of Naval Research, the National Institute of Health, and Martin-Marietta under contracts N00014-81-K-0004, NIH 5P41 RR 00785, and GH3-116803
Rights and permissions
About this article
Cite this article
Treitel, R., Genesereth, M.R. Choosing directions for rules. J Autom Reasoning 3, 395–431 (1987). https://doi.org/10.1007/BF00247437
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00247437