Towards a Type Discipline for Answer Set Programming

  • Authors:
  • Camillo Fiorentini;Alberto Momigliano;Mario Ornaghi

  • Affiliations:
  • Dipartimento di Scienze dell'Informazione, Università degli Studi di Milano, Italy;Dipartimento di Scienze dell'Informazione, Università degli Studi di Milano, Italy;Dipartimento di Scienze dell'Informazione, Università degli Studi di Milano, Italy

  • Venue:
  • Types for Proofs and Programs
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

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.