Abstract
Answer Set Programming (ASP) is a powerful paradigm for solving knowledge-intensive problems, but its integration with external data sources—known as HEX-programs—often introduces significant computational overhead. This paper proposes the use of support sets to optimize the evaluation of external atoms. By identifying minimal conditions that determine an atom's output, solvers can prune search spaces and bypass redundant external calls. Experimental results demonstrate that this approach can achieve performance gains of up to two orders of magnitude, effectively handling instances where traditional methods time out.
Introduction
Modern applications of Answer Set Programming (ASP) frequently require interaction with external environments, such as Description Logic (DL) ontologies or web-based scripts. These interactions are formalized as HEX-programs. However, the standard evaluation method treats external atoms as "black boxes," leading to a bottleneck: the solver must repeatedly query external sources for every guess it makes about the world state. This "guess-and-check" cycle becomes prohibitively expensive as the search space grows or the external source's response time increases.
Methodology: The Support Set Framework
The authors introduce support sets as a mechanism to "open" the black box of external atoms without sacrificing logical correctness.
Core Concepts
A support set is a partial set of facts that is sufficient to determine the output of an external atom. If the solver's current partial assignment contains a support set, the atom's value is fixed regardless of future assignments. This provides a "shortcut" for the solver to determine the truth value of external atoms.
Optimization Techniques
- Search Pruning via Nogoods: Support sets are translated into logical constraints (nogoods). These allow the solver to identify inconsistent paths early in the search process, preventing the exploration of branches that cannot lead to valid answer sets.
- Compatibility Checking: When the solver encounters a state matching a known support set, it can immediately determine the external atom's value. This eliminates the need for a live call to the external source.
- Nonground Support Sets: To ensure scalability, the framework uses "guards"—functions that allow support sets to be defined with variables. This generalization allows a single rule to cover a vast range of specific instances.
Automatic Generation
For specific domains like DL-Lite, the authors demonstrate that support sets can be automatically derived from the ontology's structure in polynomial time, making the optimization highly accessible for Semantic Web applications.
Experimental Evaluation
The proposed approach was tested against traditional evaluation methods across several benchmarks:
- Graph Coloring: Checking non-3-colorability using external atoms.
- Taxi Assignment: Querying a DL ontology for driver-customer matching.
- House Configuration: Industrial task placement under constraints.
- LUBM Diamond: Default reasoning over large-scale ontology data.
Key Results and Discussion
The inclusion of support sets leads to dramatic performance improvements. As shown in the Graph Coloring benchmark (Figure 1), the traditional approach (-Sup.) quickly reaches the 300-second timeout as the number of nodes increases. In contrast, the support set method (+Sup.) maintains sub-second performance for up to 40 nodes and handles 100 nodes in roughly 7 seconds, whereas the baseline fails completely.
Similar trends are observed in other benchmarks. Figure 2 illustrates the scalability of the support set approach in a configuration-style task. While the baseline method (-Sup.) times out for $p \ge 25$, the optimized solver (+Sup.) finds answer sets in less than half a second. This confirms the claim that support sets can reduce search times by over 100x in complex scenarios.
Insights
- Efficiency vs. Overhead: While computing support sets introduces an initial cost, the reduction in search space and external calls provides a net gain that often exceeds 100x speedup.
- Completeness: A "complete" family of support sets can theoretically eliminate all external calls during the solving phase, turning the external atom into a purely internal logical constraint.
Conclusion
Exploiting support sets represents a significant advancement for HEX-programs. By compiling domain knowledge into logical shortcuts, the framework bridges the gap between high-level ASP reasoning and external data processing. Future work will focus on automating support set generation for more diverse external sources and exploring partial support sets for even broader applicability.
Summary updated