TL;DR
This paper introduces techniques to make Bound Founded Answer Set Programming (BFASP), a powerful extension of Answer Set Programming (ASP) for handling numeric variables, more practical. They achieve this by developing methods to "flatten" complex BFASP expressions into simpler forms and by extending established ASP optimization techniques (bottom-up grounding and magic sets) to BFASP, significantly improving performance.
What Problem Does This Paper Address?
Answer Set Programming (ASP) is a declarative programming paradigm well-suited for knowledge representation and reasoning, particularly for problems involving non-monotonic reasoning and stable model semantics. However, standard ASP struggles with numeric variables and inductive definitions. Bound Founded Answer Set Programming (BFASP) was developed to address this by extending ASP's stable model semantics to handle integer and real-valued "founded" variables.
While BFASP theory is defined for "ground" (fully instantiated) programs, real-world BFASP programs are often written in a "non-ground" form, using variables and complex expressions for conciseness. This necessitates a process to convert these non-ground programs into ground ones that can be processed by solvers. The challenge lies in doing this efficiently while preserving the crucial stable model semantics, especially given the added complexity of numeric founded variables and their interactions. Existing techniques for ASP grounding and optimization are not directly applicable to BFASP due to these differences.
Methods
The paper proposes three main contributions:
- Flattening: They introduce a technique to transform complex expressions within BFASP rules (which can be thought of as expression trees) into a set of simpler, primitive expressions. This is crucial because constraint solvers typically require these primitive forms. A key aspect of their flattening is the use of introduced founded variables to represent subexpressions, which is essential for preserving stable model semantics, unlike standard CP flattening that might introduce spurious solutions.
- Bottom-Up Grounding Extension: They generalize the bottom-up grounding technique, commonly used in ASP, to BFASP. This method iteratively builds up ground rules and variables, focusing on those that are provably useful.
- Magic Set Transformation Extension: They extend the magic set transformation, another optimization technique for ASP, to BFASP. Magic sets simulate top-down query-driven computation within a bottom-up framework, allowing the system to focus only on relevant parts of the program. This is particularly challenging for BFASP due to its more complex rule forms and the presence of both standard and founded numeric variables.
Datasets
The paper evaluates their techniques on three benchmarks:
- Road Construction (RoadCon): A problem involving deciding which roads to build to minimize cost while ensuring shortest paths meet certain criteria.
- UtilPol: A problem related to utilitarian policies where a government enacts policies to minimize cost, considering citizen happiness influenced by policies and other citizens' happiness.
- CompanyCon: A problem modeling stock market control, where a source company aims to control a destination company by buying stocks, with control defined by ownership thresholds.
The paper does not introduce new datasets but uses these existing benchmarks to demonstrate the performance improvements of their methods.
Key Insights and Ideas
- Preserving Semantics with Introduced Founded Variables: The core insight for flattening is that simply replacing subexpressions with standard variables can break stable model semantics. Instead, introducing new founded variables to represent these subexpressions is critical for maintaining correctness.
- Generalizing ASP Optimizations is Non-Trivial: Extending techniques like bottom-up grounding and magic sets from Boolean ASP to BFASP is not a direct translation. The presence of numeric founded variables and more complex rule structures requires careful adaptation of the algorithms.
- Magic Sets Significantly Reduce Search Space: The experiments highlight that the magic set transformation, by focusing computation on relevant parts of the program, can drastically reduce the number of rules and variables processed, leading to substantial performance gains, especially when the "relevant part" of the instance is small.
- Unfounded Sets and Circular Reasoning: The paper implicitly touches upon the importance of handling unfounded sets and disallowing circular reasoning, which is a core tenet of ASP and BFASP, especially in the context of numeric variables.
Key Results
The paper demonstrates significant performance improvements through their proposed techniques:
- Reduced Ground Program Size: Their methods, particularly bottom-up grounding and magic sets, substantially reduce the size of the ground program compared to exhaustive grounding.
- Improved Solving Time: The experiments show that these techniques lead to considerably faster solving times. For instance, in the Road Construction benchmark, magic set transformation achieved solving times orders of magnitude faster than exhaustive grounding (e.g., 0.04 seconds vs. 4.25 seconds for a 100-node instance).
- Scalability: The improvements are evident across various problem instances and sizes for the tested benchmarks. The paper shows that magic sets outperform regular bottom-up grounding, especially when the relevant part of the instance is small.
Limitations and Future Work
- Unstratified Programs: The paper notes that their grounding algorithm is not sound for unstratified BFASP programs. They suggest that for such cases, parts of the program that are unreachable from the query but inconsistent might be missed. They refer to external work for handling such issues.
- Complexity of Flattening: While effective, the flattening process itself can add overhead, particularly when the resulting set of rules is simple.
- Future Work: The paper implicitly suggests that further exploration of handling unstratified programs and optimizing the interaction between flattening and grounding/magic sets could be beneficial. The theoretical framework for BFASP is extended, and the practical implementation of these optimizations is a key step towards making BFASP a more widely usable tool.
Summary updated