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_36: The Smodels system is one of the state-of-the-art implementations of stable model computation for normal logic programs. In order to enable more realistic applications, the basic modeling language of normal programs has been extended with new constructs including cardinality and weight constraints and corresponding implementation techniques have been developed. This paper summarizes the extensions that have been included in the system, demonstrates their use, provides basic application methodology, illustrates the current level of performance of the system, and compares it to state-of-the-art satisfiability checkers.
Let us consider the weight constraints employed by Smodels and let us describe a translation method to convert them into our language with aggregates. We will focus on weight constraint that are used in the body of rules (see Sect. for aggregates in the heads of rules). For simplicity, we will also focus on weight constraints with non-negative weights (the generalization can be obtained through algebraic manipulations, as described in @cite_36 ). A weight constraint @math has the form: Note that grounding removes Smodels ' conditional literals. [ L p_1 = w_1, ,p_n = w_n,not :r_1 = v_1, ,not :r_m = v_m U ] where @math are ground atoms, and @math are numeric constants. @math 's and @math 's are called literals of @math . @math denotes the set of literals of @math . The local weight function of a constraint @math , @math , returns the weight of its literals. For example, @math and @math . The weight of a weight constraint @math in a model @math , denoted by @math , is given by [ W(c,S) = p lit(c), : p S w(c)(p) + not :q lit(c), : q S w(c)(not :p). ]