🤖 AI Summary
Traditional Answer Set Programming (ASP) solvers (e.g., DLV2) suffer from repeated full grounding, lack of working memory, and inability to support multi-round incremental reasoning under dynamic streaming data scenarios.
Method: This paper proposes the first fully transparent incremental grounding framework for DLV2. By extending the DLV2 kernel with incremental program analysis, dynamic dependency tracking, and on-demand subroutine extraction, it enables efficient reuse of prior grounding results and continuous pruning/maintenance of the base program.
Contribution/Results: The approach breaks the static, single-shot limitation of the classical Ground-and-Solve paradigm, enabling multi-shot incremental response. Experiments on representative streaming tasks—including real-time monitoring and dynamic planning—demonstrate 60–85% reduction in inference latency, stable memory consumption, and support for millisecond-scale data updates and responses.
📝 Abstract
DLV2 is an AI tool for Knowledge Representation and Reasoning which supports Answer Set Programming (ASP) – a logic-based declarative formalism, successfully used in both academic and industrial applications. Given a logic program modelling a computational problem, an execution of DLV2 produces the so-called answer sets that correspond one-to-one to the solutions. The computational process relies on the typical Ground&Solve approach where the grounding step transforms the input program into a new, equivalent ground program, and the subsequent solving step applies propositional algorithms to search for the answer sets. Recently, emerging applications in contexts such as stream reasoning and event processing demand for multi-shot reasoning: here, the system is expected to be reactive while repeatedly executed over rapidly changing data. In this work, we present a new incremental reasoner obtained from the evolution of DLV2 towards multi-shot reasoning. Rather than restarting the computation from scratch, the system remains alive and incrementally handles the internal grounding process: in a completely transparent fashion for the user, at each shot, it reuses previous computations for building and maintaining a large, more general ground program, from which a smaller yet equivalent portion is determined and used for computing answer sets. We describe the system, its usage, its applicability and performance in some practically relevant domains.