[Paper Review] Grounding Recursive Aggregates: Preliminary Report
This paper presents a novel grounding framework for Answer Set Programming that efficiently handles recursive aggregates using semi-naive database evaluation techniques. By extending grounding with aggregate propagation and safe body ordering, the approach enables efficient, incremental computation of stable models for programs with recursive aggregates—demonstrated on the Company Controls Problem, where only four relevant ground rules are generated instead of 64.
Problem solving in Answer Set Programming consists of two steps, a first grounding phase, systematically replacing all variables by terms, and a second solving phase computing the stable models of the obtained ground program. An intricate part of both phases is the treatment of aggregates, which are popular language constructs that allow for expressing properties over sets. In this paper, we elaborate upon the treatment of aggregates during grounding in Gringo series 4. Consequently, our approach is applicable to grounding based on semi-naive database evaluation techniques. In particular, we provide a series of algorithms detailing the treatment of recursive aggregates and illustrate this by a running example.
Motivation & Objective
- To address the challenge of efficiently grounding logic programs containing recursive aggregates in Answer Set Programming.
- To extend semi-naive database evaluation techniques to support recursive aggregates while avoiding redundant rule generation.
- To enable scalable grounding of programs with recursive aggregates without requiring domain predicates or language restrictions.
- To integrate aggregate handling into existing grounding pipelines, such as in gringo series 4, with minimal modifications.
- To ensure correctness and efficiency under Ferraris' semantics for aggregates.
Proposed method
- The approach uses a semi-naive evaluation strategy to incrementally build the Herbrand base, focusing only on newly generated atoms at each iteration.
- A new propagation step is introduced to compute aggregate atoms based on accumulated values from previous iterations, enabling recursive dependencies.
- Safe body ordering is applied to prioritize recursive atoms (e.g., with subscript 'n') to minimize backtracking during rule instantiation.
- The method rewrites aggregate-containing programs into equivalent forms that allow standard grounding to proceed, followed by post-processing to reconstruct ground aggregates.
- The framework supports various aggregate functions (e.g., sum, sum+, count, min, max) by extending the Propagate function.
- The approach is formally grounded in Ferraris' semantics and integrates with existing ASP grounding systems like gringo.
Experimental results
Research questions
- RQ1How can recursive aggregates be efficiently grounded in Answer Set Programming without redundant rule generation?
- RQ2What modifications to semi-naive evaluation are required to support recursive aggregates while preserving correctness?
- RQ3How can safe body ordering reduce backtracking during rule instantiation in the presence of recursive aggregates?
- RQ4Can the grounding of recursive aggregates be integrated into existing ASP grounders like gringo without requiring language restrictions or domain predicates?
- RQ5What is the impact of aggregate monotonicity and stratification on grounding efficiency and correctness?
Key findings
- The proposed method reduces the grounding of the Company Controls problem from 64 potential ground rules to just four relevant rules, demonstrating significant efficiency gains.
- By using safe body ordering and aggregate propagation, the framework avoids backtracking during rule instantiation, improving performance.
- The approach correctly handles recursive aggregates under Ferraris’ semantics, ensuring semantic correctness in the presence of recursion.
- The method is general and extensible, supporting multiple aggregate functions such as sum, sum+, count, min, and max in gringo series 4.
- The framework reuses standard semi-naive grounding techniques and extends them with a dedicated aggregate propagation phase, enabling integration into existing ASP pipelines.
- The implementation in gringo series 4 shows that recursive aggregates can be grounded efficiently without requiring ω- or λ-restriction, unlike earlier systems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.