Recursive Aggregates as Intensional Functions in Answer Set Programming: Semantics and Strong Equivalence

Jorge Fandinno,Zachary Hansen
2024-12-15
Abstract:This paper shows that the semantics of programs with aggregates implemented by the solvers clingo and dlv can be characterized as extended First-Order formulas with intensional functions in the logic of Here-and-There. Furthermore, this characterization can be used to study the strong equivalence of programs with aggregates under either semantics. We also present a transformation that reduces the task of checking strong equivalence to reasoning in classical First-Order logic, which serves as a foundation for automating this procedure.
Artificial Intelligence,Logic in Computer Science
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is the semantics of programs with recursive aggregate functions and their strong equivalence in Answer Set Programming (ASP). Specifically, the goals of the paper are: 1. **Describe the semantics of programs with aggregate functions**: The paper shows how to represent the semantics of programs with aggregate functions as extended first - order formulas, which contain intensional functions in Here - and - There logic. This representation method can be used to study the strong equivalence of programs with aggregate functions under different semantics. 2. **Study strong equivalence**: The paper explores how to use classical First - Order logic to verify the strong equivalence between programs with recursive aggregate functions. Strong equivalence means that two programs have the same behavior in any context. 3. **Provide the basis for automated methods**: By transforming the strong equivalence problem into a classical first - order logic reasoning problem, the paper provides a theoretical basis for automatically verifying strong equivalence. ### Specific contributions of the paper - **Translation method**: The paper introduces a translation method that can convert logical programs with recursive aggregate functions into extended first - order formulas. This method is applicable not only to the clingo solver but also to the dlv solver. - **Semantic consistency**: It is proved that this translation method is consistent with the Abstract Gringo semantics (for clingo) and the Faber - Pfeifer - Leone semantics (for dlv). - **Determination of strong equivalence**: By transforming the strong equivalence problem into a reasoning problem in classical first - order logic, the paper provides an effective method to determine whether two programs are strongly equivalent. ### Application examples The paper shows the importance of recursive aggregate functions through a specific example - the Company Control problem. In this problem, it is necessary to determine which companies control others by directly or indirectly holding a majority of shares in other companies. This problem can be encoded by a logical program with recursive aggregate functions. ### Formula presentation The formulas involved in the paper include: - **Aggregate atoms**: \[ \text{#sum}\{P, C2 : \text{ctrStk}(C1, C2, C3, P)\} > 50 \] This expression indicates that company \(C1\) indirectly holds more than 50% of the shares of company \(C3\) by controlling company \(C2\). - **Rule translation**: \[ \text{company}(C1) \land \text{company}(C3) \land \text{sum}(s_{\text{cli}}^{\text{ctr}}(C1, C3)) > 50 \rightarrow \text{controls}(C1, C3) \] This translation converts the original rule into an extended first - order formula, which is convenient for semantic analysis and equivalence verification. Through these methods, the paper provides new tools and theoretical bases for the semantic analysis and strong equivalence study of ASP programs with recursive aggregate functions.