Design Patterns for Tabled Logic Programming

  • Terrance Swift
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6547)


The use of design patterns is common in many areas of software engineering and programming. While they are informal, patterns provide a repository of solutions to common problems, as well as a survey of the features of a given language or software system. This paper uses design patterns to survey features and applications of Tabled Logic Programming (TLP). Patterns for commonly available features are presented, such as those of various recursion types that arise when tabling is used with definite programs, of automatic tabling and of tabling with DCGs. In addition, various patterns capture well-developed uses of tabled negation for non-monotonic reasoning. A final set of patterns describes the approaches of answer subsumption and tabled constraints, features that have fewer applications to date due to the fact that robust implementations of them have only recently become available.


Design Pattern Logic Programming Stable Model Semantic Inheritance System Defeasible Rule 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Diagnostic and Statistical Manual of Mental Disorders. American Psychiatric Association, Washington, DC, 4th edition, Prepared by the Task Force on DSM-IV and Other Committees and Work Groups of the American Psychiatric Association (1994)Google Scholar
  2. 2.
    Codognet, P., Filé, G.: Computations, abstractions and constraints in logic programs. In: ICCL, pp. 155–164 (1992)Google Scholar
  3. 3.
    Coplien, J., Schmidt, D.: Pattern Languages of Program Design. Addison-Wesley, Reading (1995)Google Scholar
  4. 4.
    Santos Costa, V., Sagonas, K., Lopes, R.: Demand-driven indexing of prolog clauses. In: Dahl, V., Niemelä, I. (eds.) ICLP 2007. LNCS, vol. 4670, pp. 395–409. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  5. 5.
    Cui, B., Swift, T.: Preference logic grammars: Fixed-point semantics and application to data standardization. Artificial Intelligence 138, 117–147 (2002)CrossRefzbMATHGoogle Scholar
  6. 6.
    Desel, J., Reisig, W.: Place/transition Petri nets. In: Reisig, W., Rozenberg, G. (eds.) APN 1998. LNCS, vol. 1491, pp. 122–174. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  7. 7.
    Earley, J.: An efficient context-free parsing algorithm. CACM 13(2), 94–102 (1970)CrossRefzbMATHGoogle Scholar
  8. 8.
    Jayaraman, B., Govindarajan, K., Mantha, S.: Preference logic grammars. Computer Languages 24, 179–196 (1998)CrossRefzbMATHGoogle Scholar
  9. 9.
    Liang, S., Fodor, P., Wan, H., Kifer, M.: OpenRuleBench: An analysis of the performance of rule engines. In: WWW: Semantic Data Track, pp. 601–608 (2009)Google Scholar
  10. 10.
    Motik, B.: Reasoning in Description Logics using Resolution and Deductive Databases. PhD thesis (2006)Google Scholar
  11. 11.
    Pereira, L.M., Han, A.: Elder care via intention recognition and evolution prospection. In: INAP (2010)Google Scholar
  12. 12.
    Pereira, L.M., Lopes, G.: Prospective storytelling agents. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 294–296. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  13. 13.
    Pereira, L.M., Pinto, A.M.: Layered models top-down querying of normal logic programs. In: Gill, A., Swift, T. (eds.) PADL 2009. LNCS, vol. 5418, pp. 254–268. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  14. 14.
    Pereira, L.M., Ramli, C.: Modelling probabilistic causation in decision making. In: KES-IDT (2009)Google Scholar
  15. 15.
    Ramakrishna, Y.S., Ramakrishnan, C.R., Ramakrishnan, I.V., Smolka, S., Swift, T., Warren, D.S.: Efficient model checking using tabled resolution. In: Grumberg, O. (ed.) CAV 1997. LNCS, vol. 1254, pp. 143–154. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  16. 16.
    Ramakrishnan, C.R., Ramakrishnan, I.V., Warren, D.S.: XcelLog: A deductive spreadsheet system. Knowledge Engineering Review 22(3), 269–279 (2007)CrossRefGoogle Scholar
  17. 17.
    Riguzzi, F., Swift, T.: Tabling and answer subsumption for reasoning on logic programs with annotated disjunctions (2010),
  18. 18.
    Russell, N., ter Hofstede1, A., van der Aalst1, W.M.P., Mulyar, N.: Workflow control-flow patterns: A revised view. Technical report, BPM Center Report BPM-06-22, (2006)Google Scholar
  19. 19.
    Sarna-Starosta, B.: Constraint-based Analysis of Security Protocols. PhD thesis, SUNY Stony Brook (2005)Google Scholar
  20. 20.
    De Schreye, D., Decorte, S.: Termination of logic programs: The never-ending story. JLP 19, 199–260 (1994)CrossRefzbMATHGoogle Scholar
  21. 21.
    Shieber, S.: Constraint-based Grammar Formailsms. MIT Press, Cambridge (1992)Google Scholar
  22. 22.
    Stenning, K., van Lambalgen, M.: Human Reasoning and Cognitive Science. MIT Press, Cambridge (2008)Google Scholar
  23. 23.
    Swift, T.: Tabling for non-monotonic programming. AMAI 25(3-4), 201–240 (1999)zbMATHGoogle Scholar
  24. 24.
    Swift, T., Warren, D.S.: XSB: Extending the power of Prolog using tabling (2010),
  25. 25.
    Thomason, R. (ed.): Formal Philosophy. Selected Papers by Richard Montague. Yale, New Haven (1974)Google Scholar
  26. 26.
    Wan, H., Grosof, B., Kifer, M., Fodor, P., Liang, S.: Logic programming with defaults and argumentation theories. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 432–448. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  27. 27.
    Warren, D.S.: Programming the PTQ grammar in XSB. In: Ramakrishnan, R. (ed.) Applications of Logic Databases, pp. 217–234 (1995)Google Scholar
  28. 28.
    Wasserman, S., Faust, K.: Social Network Analysis. Cambridge University Press, Cambridge (1994)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Terrance Swift
    • 1
  1. 1.Centro de Inteligência ArtificialUniversidade Nova de LisboaPortugal

Personalised recommendations