Skip to main content

Towards a Type Discipline for Answer Set Programming

  • Conference paper
Book cover Types for Proofs and Programs (TYPES 2008)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5497))

Included in the following conference series:

Abstract

We argue that it is high time that types had a beneficial impact in the field of Answer Set Programming and in particular Disjunctive Datalog as exemplified by the DLV system. Things become immediately more challenging, as we wish to present a type system for DLV-Complex, an extension of DLV with uninterpreted function symbols, external implemented predicates and types. Our type system owes to the seminal polymorphic type system for Prolog introduced by Mycroft and O’Keefe, in the formulation by Lakshman and Reddy. The most innovative part of the paper is developing a declarative grounding procedure which is at the same time appropriate for the operational semantics of ASP and able to handle the new features provided by DLV-Complex. We discuss the soundness of the procedure and evaluate informally its success in reducing, as expected, the set of ground terms. This yields an automatic reduction in size and numbers of (non isomorphic) models. Similar results could have only been achieved in the current untyped version by careful use of generator predicates in lieu of types.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Baral, C.: Knowledge Representation, Reasoning and Declarative Problem Solving. CUP (2003)

    Google Scholar 

  2. Baselice, S., Bonatti, P.A., Gelfond, M.: Towards an integration of answer set and constraint solving. In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668, pp. 52–66. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  3. Bertoni, A., Mauri, G., Miglioli, P.: A characterization of abstract data as model-theoretic invariants. In: Maurer, H.A. (ed.) ICALP 1979. LNCS, vol. 71, pp. 26–37. Springer, Heidelberg (1979)

    Chapter  Google Scholar 

  4. Buneman, P., Ohori, A.: Polymorphism and type inference in database programming. ACM Trans. Database Syst. 21(1), 30–76 (1996)

    Article  Google Scholar 

  5. Calimeri, F., Cozza, S., Ianni, G.: External sources of knowledge and value invention in logic programming. Ann. Math. Artif. Intell. 50(3-4), 333–361 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  6. Calimeri, F., Cozza, S., Ianni, G., Leone, N.: Computable functions in ASP: Theory and implementation. In: de la Banda, M.G., Pontelli, E. (eds.) ICLP 2008. LNCS, vol. 5366, pp. 407–424. Springer, Heidelberg (2008)

    Google Scholar 

  7. Van den Bussche, J., Waller, E.: Polymorphic type inference for the relational algebra. J. Comput. Syst. Sci. 64(3), 694–718 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  8. Ricca, F., Gallucci, L., Schindlauer, R., Dell’Armi, T., Grasso, G., Leone, N.: OntoDLV: an ASP-based system for enterprise ontologies. Journal of Logic and Computation (to appear, 2009)

    Google Scholar 

  9. Gelfond, M.: Answer sets. In: van Harmelen, F., Lifschitz, V., Porter, B. (eds.) Handbook of knowledge representation, vol. 7. Elsevier, Amsterdam (2007)

    Google Scholar 

  10. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: ICLP/SLP, pp. 1070–1080 (1988)

    Google Scholar 

  11. Hanus, M.: Horn clause programs with polymorphic types: Semantics and resolution. Theor. Comput. Sci. 89(1), 63–106 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  12. Hermenegildo, M.V., Puebla, G., Bueno, F., López-García, P.: Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor). Sci. Comput. Programming 58(1-2), 115–140 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  13. Hill, P.M., Topor, R.W.: A semantics for typed logic programs. In: Types in Logic Programming, pp. 1–62. MIT Press, Cambridge (1992)

    Google Scholar 

  14. Jefferey, D.: Expressive Type Systems for Logic Programming Languages. PhD thesis, The University of Melbourne (2002)

    Google Scholar 

  15. Lakshman, T.L., Reddy, U.S.: Typed PROLOG: A semantic reconstruction of the Mycroft-O’Keefe type system. In: ISLP, pp. 202–217 (1991)

    Google Scholar 

  16. Leone, N., et al.: The DLV system for knowledge representation and reasoning. ACM TOCL 7(3), 499–562 (2006)

    Article  MathSciNet  Google Scholar 

  17. Lloyd, J.W.: Foundations of logic programming (2nd extended ed.). Springer, Heidelberg (1987)

    Book  Google Scholar 

  18. Mycroft, A., O’Keefe, R.A.: A polymorphic type system for PROLOG. Artif. Intell. 23(3), 295–307 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  19. Nadathur, G., Qi, X.: Optimizing the runtime processing of types in polymorphic logic programming languages. In: Sutcliffe, G., Voronkov, A. (eds.) LPAR 2005. LNCS, vol. 3835, pp. 110–124. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  20. Overton, D., Somogyi, Z., Stuckey, P.J.: Constraint-based mode analysis of Mercury. In: PPDP, pp. 109–120. ACM, New York (2002)

    Google Scholar 

  21. Pfenning, F.: Types in logic programming. MIT Press, Cambridge (1992)

    Google Scholar 

  22. Simons, P., Niemelä, I., Soininen, T.: Extending and implementing the stable model semantics. Artif. Intell. 138(1-2), 181–234 (2002)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Fiorentini, C., Momigliano, A., Ornaghi, M. (2009). Towards a Type Discipline for Answer Set Programming. In: Berardi, S., Damiani, F., de’Liguoro, U. (eds) Types for Proofs and Programs. TYPES 2008. Lecture Notes in Computer Science, vol 5497. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-02444-3_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-02444-3_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-02443-6

  • Online ISBN: 978-3-642-02444-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics