# Multi-shot ASP solving with clingo

arXiv: https://arxiv.org/abs/1705.09811 · HTML: https://mlsanity.com/paper/1705.09811/

## Key facts

- Cited by 115 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 27 May 2017.

## Built on by (most cited first, 30 of 115)

- [Learning First-Order Representations for Planning from Black-Box States: New Results](https://mlsanity.com/paper/2105.10830/) (2021)
- [NeSyC: A Neuro-symbolic Continual Learner For Complex Embodied Tasks In Open Domains](https://mlsanity.com/paper/2503.00870/) (2025)
- [Learning Higher-Order Programs without Meta-Interpretive Learning](https://mlsanity.com/paper/2112.14603/) (2021)
- [Answer Set Planning: A Survey](https://mlsanity.com/paper/2202.05793/) (2022)
- [Learning Sketches for Decomposing Planning Problems into Subproblems of Bounded Width: Extended Version](https://mlsanity.com/paper/2203.14852/) (2022)
- [Learning Interpretable Temporal Properties from Positive Examples Only](https://mlsanity.com/paper/2209.02650/) (2022)
- [Learning Differentiable Logic Programs for Abstract Visual Reasoning](https://mlsanity.com/paper/2307.00928/) (2023)
- [Predicate Invention by Learning From Failures](https://mlsanity.com/paper/2104.14426/) (2021)
- [Treewidth-aware Reductions of Normal ASP to SAT -- Is Normal ASP Harder than SAT after All?](https://mlsanity.com/paper/2210.03553/) (2022)
- [Logic programming for deliberative robotic task planning](https://mlsanity.com/paper/2301.07550/) (2023)
- [Flexible FOND Planning with Explicit Fairness Assumptions](https://mlsanity.com/paper/2103.08391/) (2021)
- [Aggregate Semantics for Propositional Answer Set Programs](https://mlsanity.com/paper/2109.08662/) (2021)
- [Generalisation Through Negation and Predicate Invention](https://mlsanity.com/paper/2301.07629/) (2023)
- [Entailment-Preserving First-order Logic Representations in Natural Language Entailment](https://mlsanity.com/paper/2502.16757/) (2025)
- [A Comparative Study of Neurosymbolic AI Approaches to Interpretable Logical Reasoning](https://mlsanity.com/paper/2508.03366/) (2025)
- [Question Answering with LLMs and Learning from Answer Sets](https://mlsanity.com/paper/2509.16590/) (2025)
- [A Solver-in-the-Loop Framework for Improving LLMs on Answer Set Programming for Logic Puzzle Solving](https://mlsanity.com/paper/2512.17093/) (2025)
- [Decomposition Strategies and Multi-shot ASP Solving for Job-shop Scheduling](https://mlsanity.com/paper/2205.07537/) (2022)
- [Answer-Set Programming for Lexicographical Makespan Optimisation in Parallel Machine Scheduling](https://mlsanity.com/paper/2212.09077/) (2022)
- [Solving Quantum-Inspired Perfect Matching Problems via Tutte's Theorem-Based Hybrid Boolean Constraints](https://mlsanity.com/paper/2301.09833/) (2023)
- [dPASP: A Comprehensive Differentiable Probabilistic Answer Set Programming Environment For Neurosymbolic Learning and Reasoning](https://mlsanity.com/paper/2308.02944/) (2023)
- [Bridging Logic and Learning: A Neural-Symbolic Approach for Enhanced Reasoning in Neural Models (ASPER)](https://mlsanity.com/paper/2312.11651/) (2023)
- [Argumentative Causal Discovery](https://mlsanity.com/paper/2405.11250/) (2024)
- [CLMASP: Coupling Large Language Models with Answer Set Programming for Robotic Task Planning](https://mlsanity.com/paper/2406.03367/) (2024)
- [An Empirical Study of Conformal Prediction in LLM with ASP Scaffolds for Robust Reasoning](https://mlsanity.com/paper/2503.05439/) (2025)
- [Solving a Multi-resource Partial-ordering Flexible Variant of the Job-shop Scheduling Problem with Hybrid ASP](https://mlsanity.com/paper/2101.10162/) (2021)
- [I-DLV-sr: A Stream Reasoning System based on I-DLV](https://mlsanity.com/paper/2108.02797/) (2021)
- [Process discovery on deviant traces and other stranger things](https://mlsanity.com/paper/2109.14883/) (2021)
- [Interactive configurator with FO(.) and IDP-Z3](https://mlsanity.com/paper/2202.00343/) (2022)
- [Learning First-Order Symbolic Planning Representations That Are Grounded](https://mlsanity.com/paper/2204.11902/) (2022)

## Abstract (arXiv)

We introduce a new flexible paradigm of grounding and solving in Answer Set Programming (ASP), which we refer to as multi-shot ASP solving, and present its implementation in the ASP system clingo. Multi-shot ASP solving features grounding and solving processes that deal with continuously changing logic programs. In doing so, they remain operative and accommodate changes in a seamless way. For instance, such processes allow for advanced forms of search, as in optimization or theory solving, or interaction with an environment, as in robotics or query-answering. Common to them is that the problem specification evolves during the reasoning process, either because data or constraints are added, deleted, or replaced. This evolutionary aspect adds another dimension to ASP since it brings about state changing operations. We address this issue by providing an operational semantics that characterizes grounding and solving processes in multi-shot ASP solving. This characterization provides a semantic account of grounder and solver states along with the operations manipulating them. The operative nature of multi-shot solving avoids redundancies in relaunching grounder and solver programs and benefits from the solver's learning capacities. clingo accomplishes this by complementing ASP's declarative input language with control capacities. On the declarative side, a new directive allows for structuring logic programs into named and parameterizable subprograms. The grounding and integration of these subprograms into the solving process is completely modular and fully controllable from the procedural side. To this end, clingo offers a new application programming interface that is conveniently accessible via scripting languages.
