# Constraint Answer Set Programming without Grounding

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

## Key facts

- Cited by 38 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 30 Apr 2018.

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

- [AUTO-DISCERN: Autonomous Driving Using Common Sense Reasoning](https://mlsanity.com/paper/2110.13606/) (2021)
- [Knowledge-driven Natural Language Understanding of English Text and its Applications](https://mlsanity.com/paper/2101.11707/) (2021)
- [Reliable Natural Language Understanding with Large Language Models and Answer Set Programming](https://mlsanity.com/paper/2302.03780/) (2023)
- [Automated Interactive Domain-Specific Conversational Agents that Understand Human Dialogs](https://mlsanity.com/paper/2303.08941/) (2023)
- [FOLD-R++: A Scalable Toolset for Automated Inductive Learning of Default Theories from Mixed Data](https://mlsanity.com/paper/2110.07843/) (2021)
- [FOLD-RM: A Scalable, Efficient, and Explainable Inductive Learning Algorithm for Multi-Category Classification of Mixed Data](https://mlsanity.com/paper/2202.06913/) (2022)
- [CASPR: A Commonsense Reasoning-based Conversational Socialbot](https://mlsanity.com/paper/2110.05387/) (2021)
- [Modeling and Reasoning in Event Calculus using Goal-Directed Constraint Answer Set Programming](https://mlsanity.com/paper/2106.14566/) (2021)
- [Using Logic Programming and Kernel-Grouping for Improving Interpretability of Convolutional Neural Networks](https://mlsanity.com/paper/2310.13073/) (2023)
- [An ASP-based Approach to Answering Natural Language Questions for Texts](https://mlsanity.com/paper/2112.11241/) (2021)
- [EXPLORER: Exploration-guided Reasoning for Textual Reinforcement Learning](https://mlsanity.com/paper/2403.10692/) (2024)
- [Symbolic Rule Extraction from Attention-Guided Sparse Representations in Vision Transformers](https://mlsanity.com/paper/2505.06745/) (2025)
- [Specifying and Exploiting Non-Monotonic Domain-Specific Declarative Heuristics in Answer Set Programming](https://mlsanity.com/paper/2209.09066/) (2022)
- [NeSyFOLD: Neurosymbolic Framework for Interpretable Image Classification](https://mlsanity.com/paper/2301.12667/) (2023)
- [Full Automation of Goal-driven LLM Dialog Threads with And-Or Recursors and Refiner Oracles](https://mlsanity.com/paper/2306.14077/) (2023)
- [MC3G: Model Agnostic Causally Constrained Counterfactual Generation](https://mlsanity.com/paper/2508.17221/) (2025)
- [grASP: A Graph Based ASP-Solver and Justification System](https://mlsanity.com/paper/2104.01190/) (2021)
- [MILP, pseudo-boolean, and OMT solvers for optimal fault-tolerant placements of relay nodes in mission critical wireless networks](https://mlsanity.com/paper/2106.10685/) (2021)
- [Knowledge-Assisted Reasoning of Model-Augmented System Requirements with Event Calculus and Goal-Directed Answer Set Programming](https://mlsanity.com/paper/2109.04634/) (2021)
- [Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Programming](https://mlsanity.com/paper/2110.12053/) (2021)
- [Automated legal reasoning with discretion to act using s(LAW)](https://mlsanity.com/paper/2401.14511/) (2024)
- [CoGS: Causality Constrained Counterfactual Explanations using goal-directed ASP](https://mlsanity.com/paper/2407.08179/) (2024)
- [An NLG pipeline for a legal expert system: a work in progress](https://mlsanity.com/paper/2107.02421/) (2021)
- [Automating UAV Flight Readiness Approval using Goal-Directed Answer Set Programming](https://mlsanity.com/paper/2208.12199/) (2022)
- [Locksynth: Deriving Synchronization Code for Concurrent Data Structures with ASP](https://mlsanity.com/paper/2305.18225/) (2023)
- [Counterfactual Explanation Generation with s(CASP)](https://mlsanity.com/paper/2310.14497/) (2023)
- [Counterfactual Generation with Answer Set Programming](https://mlsanity.com/paper/2402.04382/) (2024)
- [CFGs: Causality Constrained Counterfactual Explanations using goal-directed ASP](https://mlsanity.com/paper/2405.15956/) (2024)
- [Through the Looking Glass, and what Horn Clause Programs Found There](https://mlsanity.com/paper/2407.20413/) (2024)
- [Fast Inference for Probabilistic Answer Set Programs via the Residual Program](https://mlsanity.com/paper/2408.07524/) (2024)

## Abstract (arXiv)

Extending ASP with constraints (CASP) enhances its expressiveness and performance. This extension is not straightforward as the grounding phase, present in most ASP systems, removes variables and the links among them, and also causes a combinatorial explosion in the size of the program. Several methods to overcome this issue have been devised: restricting the constraint domains (e.g., discrete instead of dense), or the type (or number) of models that can be returned. In this paper we propose to incorporate constraints into s(ASP), a goal-directed, top-down execution model which implements ASP while retaining logical variables both during execution and in the answer sets. The resulting model, s(CASP), can constrain variables that, as in CLP, are kept during the execution and in the answer sets. s(CASP) inherits and generalizes the execution model of s(ASP) and is parametric w.r.t. the constraint solver. We describe this novel execution model and show through several examples the enhanced expressiveness of s(CASP) w.r.t. ASP, CLP, and other CASP systems. We also report improved performance w.r.t. other very mature, highly optimized ASP systems in some benchmarks. This paper is under consideration for publication in Theory and Practice of Logic Programming (TPLP).
