Advertisement

Abstract

CHAT offers an alternative to SLG-WAM for implementing the suspension and resumption of consumers that tabling needs: unlike SLG-WAM, it does not use freeze registers nor a complicated trail to preserve their execution environments. CHAT also limits the amount of copying of CAT, which was previously put forward as another alternative to SLG-WAM. Although experimental results show that in practice CHAT is competitive with — if not better than — SLG-WAM, there remains the annoying fact that on contrived programs the original CHAT can be made arbitrarily worse than SLG-WAM, i.e. the original CHAT has an intrinsically higher complexity. In this paper we show how to overcome this problem, in particular, we deal with the two sources of higher complexity of CHAT: the repeated traversal of the choice point stack, and the lack of sufficient sharing of the trail. This is achieved without fundamentally changing the underlying principle of CHAT by a technique that manipulates a Prolog choice point so that it assumes temporarily a different functionality and in a way that is transparent to the underlying WAM. There is more potential use of this technique besides lowering the worst case complexity of CHAT: it leads to considering scheduling strategies that were not feasible before either in CHAT or in SLG-WAM. We also discuss extensively issues related to the implementation of the trail in a tabled logic programming system.

Keywords

Schedule Strategy Execution Environment Choice Point Abstract Machine Schedule Generator 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    E. Börger and D. Rosenzweig. The WAM — Definition and compiler correctness. In C. Beierle and L. Plümer, editors, Logic Programming: Formal Methods and Practical Applications, pages 20–90. Elsevier Science, North-Holland, 1995.Google Scholar
  2. 2.
    S. Dawson, C. R. Ramakrishnan, and D. S. Warren. Practical program analysis using general purpose logic programming systems — A case study. In Proceedings of the ACM SIGPLAN PLDI, pages 117–126, Philadelphia, May 1996. ACM Press.Google Scholar
  3. 3.
    B. Demoen and K. Sagonas. CAT: the Copying Approach to Tabling. In C. Palamidessi, H. Glaser, and K. Meinke, editors, Principles of Declarative Programming (PLILP’98), number 1490 in LNCS, pages 21–35, Sept. 1998. Springer.CrossRefGoogle Scholar
  4. 4.
    B. Demoen and K. Sagonas. Memory Management for Prolog with Tabling. In Proceedings of ISMM’98: ACM SIGPLAN International Symposium on Memory Management, pages 97–106, Vancouver, B.C., Canada, Oct. 1998. ACM Press.Google Scholar
  5. 5.
    B. Demoen and K. Sagonas. CHAT: the Copy-Hybrid Approach to Tabling. In G. Gupta, editor, Practical Aspects of Declarative Languages (PADL), number 1551 in LNCS, pages 106–121, San Antonio, Texas, Jan. 1999. Springer.CrossRefGoogle Scholar
  6. 6.
    J. Preire, T. Swift, and D. S. Warren. Beyond depth-first strategies: Improving tabled logic programs through alternative scheduling. JFLP, 1998(3), Apr. 1998.Google Scholar
  7. 7.
    G. Gupta and B. Jayaraman. Analysis of Or-parallel execution models. ACM Trans. Prog. Lang. Syst., 15(4):659–680, Sept. 1993.CrossRefGoogle Scholar
  8. 8.
    P. Kursawe. How to invent a Prolog machine. New Gen. Comp., 5(1):97–114, 1987.zbMATHCrossRefGoogle Scholar
  9. 9.
    Y. S. Ramakrishna, C. R. Ramakrishnan, I. V. Ramakrishnan, S. Smolka, T. Swift, and D. S. Warren. Efficient model checking using tabled resolution. In Proceedings of the 9th CAV, number 1254 in LNCS, pages 143–154, July 1997. Springer.Google Scholar
  10. 10.
    D. M. Russinoff. A verified Prolog compiler for the Warren Abstract Machine. J. of Logic Program., 13(4):367–412, Aug. 1992.zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    K. Sagonas and T. Swift. An abstract machine for tabled execution of fixed-order stratified logic programs. ACM Trans. Prog. Lang. Syst., 20(3):586–634, May 1998.CrossRefGoogle Scholar
  12. 12.
    K. Sagonas, T. Swift, and D. S. Warren. XSB as an efficient deductive database engine. In Proceedings of the ACM SIGMOD’94, pages 442–453, May 1994. ACM.Google Scholar
  13. 13.
    P. Van Roy. 1983–1993: The wonder years of sequential Prolog implementation. J. of Logic Program., 19/20:385–441, May/July 1994.Google Scholar
  14. 14.
    D. H. D. Warren. An abstr5act Prolog instruction set. Technical Report 309, SRI International, Menlo Park, U.S.A., Oct. 1983.Google Scholar
  15. 15.
    D. S. Warren. Efficient Prolog memory management for flexible control strategies. In Proceedings of the 1984 Symp. Logic Program., pages 198–202, Feb. 1984. IEEE.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Baxt Demoen
    • 1
  • Konstantinos Sagonas
    • 2
  1. 1.Department of Computer ScienceKatholieke Universiteit LeuvenBelgium
  2. 2.Computing Science DepartmentUppsala UniversitetSweden

Personalised recommendations