Abstract
This paper establishes the mathematical foundations for integrating aggregates—such as counts, sums, and averages—into Answer Set Programming (ASP). By extending the core concepts of unfounded sets and well-founded semantics to logic programs containing aggregates, the authors provide a framework that enables efficient search space pruning and characterizes the computational complexity of reasoning. The work demonstrates that while monotone and antimonotone aggregates maintain the complexity of standard logic programs, nonmonotone aggregates shift reasoning to a higher level of the polynomial hierarchy. This research provides the necessary "mathematical glue" to handle complex data summaries within logic-based AI systems.
Introduction
Answer Set Programming (ASP) is a declarative modeling paradigm where a problem is described using logic rules, and a solver identifies "Answer Sets" (stable models) that represent solutions. A significant hurdle in the evolution of ASP has been the integration of aggregates: atoms that represent functions over sets of other atoms (e.g., "the sum of weights of selected items must be less than 100"). While aggregates are essential for real-world applications, they historically disrupted the mathematical tools used to analyze logic programs, particularly when used recursively.
This paper addresses the lack of robust definitions for two vital concepts in the context of aggregates:
- Unfounded Sets: A mechanism to identify atoms that can never be proven true, allowing solvers to safely assume they are false.
- Well-Founded Semantics: A method to quickly find a "partial" model—identifying what is definitely true or definitely false—without performing an exhaustive search.
Theoretical Framework and Methods
The authors focus on a specific class of programs, denoted as $LP^A_{m,a}$, which utilize monotone (e.g., count > 5) and antimonotone (e.g., count < 2) aggregates. Their methodology involves three primary components:
Redefining Unfounded Sets
The authors propose a novel definition of unfounded sets that distinguishes between the behaviors of monotone and antimonotone literals. In this framework, monotone aggregates behave similarly to positive atoms (where additional information makes them "truer"), while antimonotone aggregates behave like negated atoms. This distinction ensures that if a set of atoms is deemed "unfounded," no rule can ever justify making them true, providing a sound generalization of classical logic programming.
The Well-Founded Operator ($W_P$)
Building on the new unfounded set definition, the paper introduces a new operator ($W_P$) that iteratively constructs a partial model. By utilizing the "Greatest Unfounded Set," the operator prunes atoms that have no possibility of being satisfied, significantly reducing the search space for the solver.
Complexity Mapping
The authors utilize the polynomial hierarchy to categorize the computational difficulty of reasoning with these programs. This mapping allows for a clear comparison between standard logic programs and those enhanced with various types of aggregates.
Key Insights and Results
The Monotonicity Split
A central insight of the paper is that aggregates should not be treated as a monolithic category. By treating monotone and antimonotone aggregates differently within the unfounded set definition, the authors created a unified way to view both standard programs and those with aggregates. They prove a significant declarative result: the Answer Sets of a program are exactly those models that contain no unfounded atoms.
Computational Efficiency
For engineers and practitioners, the most critical finding is that the well-founded model ($W_P$) remains polynomial-time computable. This allows ASP solvers to use it as a high-speed pre-processing step to reduce the search space before engaging in more computationally expensive exponential-time searches.
Complexity Parity and Gaps
- Complexity Parity: For programs limited to monotone and antimonotone aggregates, the complexity of cautious reasoning remains co-NP-complete, matching that of standard aggregate-free programs.
- The Nonmonotone Gap: The authors demonstrate that nonmonotone aggregates (e.g., "the average weight is exactly 10") increase the complexity of reasoning to the second level of the polynomial hierarchy ($\Pi^P_2$).
- Generalization: The proposed $W_P$ operator is shown to be a perfect generalization; when applied to a program without aggregates, it produces the same result as the classic Van Gelder well-founded model.
Conclusion and Future Work
This work provides the theoretical framework necessary for the full integration of aggregates into high-performance ASP systems like DLV. While the paper successfully handles recursion and provides a consensus-aligned semantic for aggregates, it also identifies areas for further research. Specifically, while the complexity of nonmonotone aggregates is identified, the current unfounded set tools are optimized for the monotone/antimonotone fragment. Future work may involve extending these tools to handle arbitrary nonmonotone aggregates more elegantly, further expanding the expressive power of Answer Set Programming.
Summary updated