Skip to main content
Log in

Chart parsers as inference systems for fixed-mode logic programs

  • Regular Papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

Logic programs resemble context-free grammars. Moreover, Prolog’s proof procedure can be viewed as a generalization of a simple top-down parser with backtracking. This simple parser has disadvantages that motivated the design of more sophisticated parsing methods. As similar disadvantages occur in Prolog’s proof procedure, it may be desirable to develop other proof procedures for logic programs than the one used by Prolog. The resemblance between definite clauses and productions suggests looking at parsing to develop such procedures. We obtain proof procedures for fixed-mode logic programs, based on “chart” parsers.

Our approach concentrates on transforming (fixed-mode) logic programs rather than the parser. We first add unification to a chart parser obtaining a proof procedure for programs severely restricted in their syntax, in which the body of the clauses denotes the composition of binary relations: “chain” programs. We then show how to transform fixed-mode programs into chain form. We arrive at proof procedures that avoid some nonterminating loops as well as the recomputation of some partial results.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Alvarez-Manilla, M., “Programas Orientados a Estados: Su Relación con Programas Lógicos y Lenguajes Formales,”B. Sc. thesis, Universidad Nacional Autónoma de México, 1995.

  2. Bancilhon, F., Maier, D., Sagiv, Y., and Ullman, J. D., “Magic Sets and Other Strange Ways to Implement Logic Programs,” inProceedings of the Fifth ACM Symposium on Principles of Database Systems, pp. 1–15, 1986.

  3. Bancilhon, F. and Ramakrishnan, R., “An Amateur’s Introduction to Recursive Query Processing Strategies,”Technical Report, 772, Computer Sciences Department, University of Wisconsin, Madison, June 1988.

    Google Scholar 

  4. Beeri, C. and Ramakrishnan, R., “On the Power of Magic,” inProceedings of the Sixth ACM Symposium on Principles of Database Systems, pp. 269–283, 1987.

  5. Chang, C. L., “On the Evaluation of Queries Containing Derived Relations in Relational Databases,” inAdvances in Database Theory, Vol. I (H. Gallaire, J. Minker, and J.-M. Nicolas, eds.), Plenum Press, pp. 235–260, 1981.

  6. Clark, K. L. and van Emden, M. H., “Consequence Verification of Flowcharts,”IEEE Transactions on Software Engineering, SE-7, 1, pp. 52–60, January 1981.

    Article  Google Scholar 

  7. Dietrich, S. W., “Extension Tables: Memo Relations in Logic Programming,” inProceedings of the IEEE 1987 Symposium on Logic Programming, San Francisco, CA, pp. 264–272, 1987.

  8. Earley, J., “An Efficient Context-Free Parsing Algorithm,”Communications of the ACM, 13, 2, pp. 94–102, 1970.

    Article  MATH  Google Scholar 

  9. Fan, C. and Dietrich, S. W., “Extension Table Built-ins for Prolog,”Software—Practice and Experience, 22, 7, pp. 573–597, 1992.

    Article  Google Scholar 

  10. Garey, M. R. and Johnson, D. S.,Computers, and Intractability. A Guide to the Theory of NP-Completeness, W. H. Freeman and Company, 1979.

  11. Gazdar, G. and Mellish, C.,Natural Language Processing in Prolog. An Introduction to Computational Linguistics, Addison-Wesley, 1989.

  12. Haruno, M., Den, Y., Matsumoto, Y., and Nagao, M., “Bidirectional Chart Generation of Natural Language Texts,” inProceedings of the 11th National Conference on Artificial Intelligence, pp. 350–356, 1993.

  13. Kay, M., “Algorithm Schemata and Data Structures in Syntactic Processing,”Technical Report, CSL-80-12, Xerox Palo Alto Research Center, October, 1980.

  14. Kowalski, R., “Algorithm=Logic+Control,”Communications of the ACM, 22, pp. 424–436, 1979.

    Article  MATH  Google Scholar 

  15. Kowalski, R., “Logic Programming Principles,” inEncyclopedia of Computer Science (A. Ralston and E. D. Reilly, eds.), 3rd edition, Van Nostrand Reinhold, pp. 778–783, 1993.

  16. Lloyd, J. W.,Foundations of Logic Programming, 2nd edition, Springer-Verlag, 1987.

  17. McKay, D. P. and Shapiro, S. C., “Using Active Connection Graphs for Reasoning with Recursive Rules,” inProceedings of the Seventh International Joint Conference on Artificial Intelligence, pp. 368–374, 1981.

  18. Pereira, F. C. N. and Warren, D. H. D., “Parsing as Deduction,” in21st Annual Meeting of the Association for Computational Linguistics, Cambridge, Massachusetts, Association for Computational Linguistics, pp. 137–144, 1983.

  19. Rohmer, J., Lescoeur, R. and Kerisit, J. M., “The Alexander Method—A Technique for the Processing of Recursive Axioms in Deductive Databases,”New Generation Computing, 4, pp. 273–285, 1986.

    Article  MATH  Google Scholar 

  20. Rosenblueth, D. A., “Fixed-Mode Programs, as State-Oriented Programs,”Technical Report, Preimpreso No. 2, IIMAS, UNAM, 1991.

  21. Rosenblueth, D. A and Peralta, J. C., “LR Inference: Inference Systems for Fixed-Mode Logic Programs, Based on LR Parsing,” inProceedings of the International Logic Programming Symposium (M. Bruynooghe, ed.), Ithaca, N.Y., U.S.A., pp. 439–453, 1994.

  22. Rosenblueth, D. A., Peralta, J. C., and Carlos Silva, S. “A Grammatical Reconstruction of the Magic-Sets Method and an Alternative Method Based on a Parser,”Technical Report, Preimpreso No. 12, IIMAS, UNAM, 1993.

  23. Saccà, D. and Zaniolo, C., “Implementation of Recursive Queries for a Data Language Based on Pure Horn Logic,” inProceedings of the Fourth International Logic Programming Conference (J.-L. Lassez, ed.), Melbourne, Australia, MIT Press, pp. 104–135, 1987.

    Google Scholar 

  24. Shoenfield, J. R.,Mathematical Logic, Addison-Wesley, 1967.

  25. Tamaki, H. and Sato, T., “OLD Resolution with Tabulation,” inProceedings of the Third International Logic Programming Conference, Lecture Notes in Computer Science, 225, Springer-Verlag pp. 84–98., 1986.

  26. Vasey, P., “Qualified Answers and Their Application to Transformation,” inProceedings of the Third International Logic Programming Conference, Lecture Notes in Computer Science, 225, Springer-Verlag pp 425–432, 1986.

Download references

Author information

Authors and Affiliations

Authors

Additional information

David A. Rosenblueth, Dr.: He obtained his Ph. D. degree in Computer Science at the University of Victoria, Canada, in 1989. His research interests are mainly in the field of logic programming and its connection with nondeterministic, state-oriented programming. He is also interested in applications of logic programming: he developed a chemical-process scheduling system written in Prolog, and is currently working on a Prolog formalization of rules for an insurance company.

About this article

Cite this article

Rosenblueth, D.A. Chart parsers as inference systems for fixed-mode logic programs. NGCO 14, 429–458 (1996). https://doi.org/10.1007/BF03037212

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037212

Keywords

Navigation