# Justifications for Goal-Directed Constraint Answer Set Programming

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

## Key facts

- Cited by 14 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 22 Sep 2020.

## Built on by (most cited first, 14 of 14)

- [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)
- [EXPLORER: Exploration-guided Reasoning for Textual Reinforcement Learning](https://mlsanity.com/paper/2403.10692/) (2024)
- [Explanations as Programs in Probabilistic Logic Programming](https://mlsanity.com/paper/2210.03021/) (2022)
- [Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Programming](https://mlsanity.com/paper/2110.12053/) (2021)
- [Explanations for Answer Set Programming](https://mlsanity.com/paper/2308.15879/) (2023)
- [Automated legal reasoning with discretion to act using s(LAW)](https://mlsanity.com/paper/2401.14511/) (2024)
- [Automating UAV Flight Readiness Approval using Goal-Directed Answer Set Programming](https://mlsanity.com/paper/2208.12199/) (2022)
- [Reliable Collaborative Conversational Agent System Based on LLMs and Answer Set Programming](https://mlsanity.com/paper/2505.06438/) (2025)
- [Modeling Deontic Modal Logic in ASP](https://mlsanity.com/paper/2507.05519/) (2025)

## Abstract (arXiv)

Ethical and legal concerns make it necessary for programs that may directly influence the life of people (via, e.g., legal or health counseling) to justify in human-understandable terms the advice given. Answer Set Programming has a rich semantics that makes it possible to very concisely express complex knowledge. However, justifying why an answer is a consequence from an ASP program may be non-trivial -- even more so when the user is an expert in a given domain, but not necessarily knowledgeable in ASP. Most ASP systems generate answers using SAT-solving procedures on ground rules that do not match how humans perceive reasoning. We propose using s(CASP), a query-driven, top-down execution model for predicate ASP with constraints to generate justification trees of (constrained) answer sets. The operational semantics of s(CASP) relies on backward chaining, which is intuitive to follow and lends itself to generating explanations that are easier to translate into natural language. We show how s(CASP) provides minimal justifications for, among others, relevant examples proposed in the literature, both as search trees but, more importantly, as explanations in natural language. We validate our design with real ASP applications and evaluate the cost of generating s(CASP) justification trees.
