Design and implementation of aggregate functions in the dlv system*

  • Authors:
  • Wolfgang Faber;Gerald Pfeifer;Nicola Leone;Tina Dell'armi;Giuseppe Ielpa

  • Affiliations:
  • Department of mathematics, university of calabria87036 rende (cs), italy (e-mail: faber@mat.unical.it, gerald@mat.unical.it, leone@mat.unical.it, dellarmi@mat.unical.it, ielpa@mat.unical.it);Department of mathematics, university of calabria87036 rende (cs), italy (e-mail: faber@mat.unical.it, gerald@mat.unical.it, leone@mat.unical.it, dellarmi@mat.unical.it, ielpa@mat.unical.it);Department of mathematics, university of calabria87036 rende (cs), italy (e-mail: faber@mat.unical.it, gerald@mat.unical.it, leone@mat.unical.it, dellarmi@mat.unical.it, ielpa@mat.unical.it);Department of mathematics, university of calabria87036 rende (cs), italy (e-mail: faber@mat.unical.it, gerald@mat.unical.it, leone@mat.unical.it, dellarmi@mat.unical.it, ielpa@mat.unical.it);Department of mathematics, university of calabria87036 rende (cs), italy (e-mail: faber@mat.unical.it, gerald@mat.unical.it, leone@mat.unical.it, dellarmi@mat.unical.it, ielpa@mat.unical.it)

  • Venue:
  • Theory and Practice of Logic Programming
  • Year:
  • 2008

Quantified Score

Hi-index 0.02

Visualization

Abstract

Disjunctive logic programming (DLP) is a very expressive formalism. It allows for expressing every property of finite structures that is decidable in the complexity class ΣP2(=NPNP). Despite this high expressiveness, there are some simple properties, often arising in real-world applications, which cannot be encoded in a simple and natural manner. Especially properties that require the use of arithmetic operators (like sum, times, or count) on a set or multiset of elements, which satisfy some conditions, cannot be naturally expressed in classic DLP. To overcome this deficiency, we extend DLP by aggregate functions in a conservative way. In particular, we avoid the introduction of constructs with disputed semantics, by requiring aggregates to be stratified. We formally define the semantics of the extended language (called ), and illustrate how it can be profitably used for representing knowledge. Furthermore, we analyze the computational complexity of , showing that the addition of aggregates does not bring a higher cost in that respect. Finally, we provide an implementation of in DLVa state-of-the-art DLP systemand report on experiments which confirm the usefulness of the proposed extension also for the efficiency of computation.