Towards a Type Discipline for Answer Set Programming
- Cite this paper as:
- 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
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.
KeywordsAnswer set programming type checking grounding many sorted interpretation
Unable to display preview. Download preview PDF.