The paper presents two equivalent definitions of answer sets for logic programs with aggregates. These definitions build on the notion of unfolding of aggregates, and they are aimed at creating methodologies to translate logic programs with aggregates to normal logic programs or positive programs, whose answer set semantics can be used to defined the semantics of the original programs. The first definition provides an alternative view of the semantics for logic programming with aggregates described by The second definition is similar to the traditional answer set definition for normal logic programs, in that, given a logic program with aggregates and an interpretation, the unfolding process produces a positive program. The paper shows how this definition can be extended to consider aggregates in the head of the rules. The proposed views of logic programming with aggregates are simple and coincide with the ultimate stable model semantics, and with other semantic characterizations for large classes of program (e.g., programs with monotone aggregates and programs that are aggregate-stratified). Moreover, it can be directly employed to support an implementation using available answer set solvers. The paper describes a system, called ASP^A, that is capable of computing answer sets of programs with arbitrary (e.g., recursively defined) aggregates.
@cite_31: In this work we propose a semantically well-founded extension of Answer Set Programming (ASP) with aggregates, which relies on the integration between answer set solvers and constraint logic programming systems. The resulting system is efficient, flexible, and supports form of aggregation more general than those previously proposed in the literature. The system is developed as an instance of a general framework for the embedding of arbitrary constraint theories within ASP.
@cite_15: 
@cite_37: In this paper, we review some recent work on declarative logic programming languages based on stable models answer sets semantics of logic programs. These languages, gathered together under the name of A-Prolog, can be used to represent various types of knowledge about the world. By way of example we demonstrate how the corresponding representations together with inference mechanisms associated with A-Prolog can be used to solve various programming tasks.
@cite_2: Disjunctive Logic Programming (DLP) is a very expressive formalism: it allows to express every property of finite structures that is decidable in the complexity class ΣP2 (NPNP). Despite the high expressiveness of DLP, there are some simple properties, often arising in real-world applications, which cannot be encoded in a simple and natural manner. Among these, properties requiring to apply some arithmetic operators (like sum, times, count) on a set of elements satisfying some conditions, cannot be naturally expressed in DLP. To overcome this deficiency, in this paper we extend DLP by aggregate functions. We formally define the semantics of the new language, named DLPA. We show the usefulness of the new constructs on relevant knowledge-based problems. We analyze the computational complexity of DLPA, showing that the addition of aggregates does not bring a higher cost in that respect. We provide an implementation of the DLPA language in DLV- the state-of-the-art DLP system - and report on experiments which confirm the usefulness of the proposed extension also for the efficiency of the computation.
Another semantic characterization of aggregates that has been adopted by several researchers @cite_2 @cite_31 @cite_37 @cite_15 can be simply described as follows. Given a program @math and an interpretation @math , let @math be the program obtained by: [] removing all the rules with an aggregate atom or a negation-as-failure literal which is false in @math ; and [] removing all the remaining aggregate atoms and negation-as-failure literals. @math is a stable set of @math if @math is the least model of @math . We can prove the following result. Proof: Let @math and let us denote with @math . Let us show that @math .