Computable Functions in ASP: Theory and Implementation

  • Authors:
  • Francesco Calimeri;Susanna Cozza;Giovambattista Ianni;Nicola Leone

  • Affiliations:
  • Department of Mathematics, University of Calabria, Rende (CS), Italy I-87036;Department of Mathematics, University of Calabria, Rende (CS), Italy I-87036;Department of Mathematics, University of Calabria, Rende (CS), Italy I-87036;Department of Mathematics, University of Calabria, Rende (CS), Italy I-87036

  • Venue:
  • ICLP '08 Proceedings of the 24th International Conference on Logic Programming
  • Year:
  • 2008

Quantified Score

Hi-index 0.02

Visualization

Abstract

Disjunctive Logic Programming (DLP) under the answer set semantics, often referred to as Answer Set Programming (ASP), is a powerful formalism for knowledge representation and reasoning (KRR). The latest years witness an increasing effort for embedding functions in the context of ASP. Nevertheless, at present no ASP system allows for a reasonably unrestricted use of function terms. Functions are either required not to be recursive or subject to severe syntactic limitations, if allowed at all in ASP systems. In this work we formally define the new class of finitely-ground programs, allowing for a powerful (possibly recursive) use of function terms in the full ASP language with disjunction and negation. We demonstrate that finitely-ground programs have nice computational properties: (i) both brave and cautious reasoning are decidable, and (ii) answer sets of finitely-ground programs are computable. Moreover, the language is highly expressive, as any computable function can be encoded by a finitely-ground program. Due to the high expressiveness, membership in the class of finitely-ground program is clearly not decidable (we prove that it is semi-decidable). We single out also a subset of finitely-ground programs, called finite-domain programs, which are effectively recognizable, while keeping computability of both reasoning and answer set computation. We implement all results in DLP, further extending the language in order to support list and set terms, along with a rich library of built-in functions for their manipulation. The resulting ASP system is very powerful: any computable function can be encoded in a rich and fully declarative KRR language, ensuring termination on every finitely-ground program. In addition, termination is "a priori" guaranteed if the user asks for the finite-domain check.