# A System for Explainable Answer Set Programming

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

## Key facts

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

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

- [exp(ASPc) : Explaining ASP Programs with Choice Atoms and Constraint Rules](https://mlsanity.com/paper/2109.08292/) (2021)
- [An ASP Framework for the Refinement of Authorization and Obligation Policies](https://mlsanity.com/paper/2305.13190/) (2023)
- [Explanations as Programs in Probabilistic Logic Programming](https://mlsanity.com/paper/2210.03021/) (2022)
- [Explanations for Answer Set Programming](https://mlsanity.com/paper/2308.15879/) (2023)
- [Explainable Answer-set Programming](https://mlsanity.com/paper/2308.15901/) (2023)
- [Explaining Explanations in Probabilistic Logic Programming](https://mlsanity.com/paper/2401.17045/) (2024)
- [Explainable Machine Larning for liver transplantation](https://mlsanity.com/paper/2109.13893/) (2021)
- [Embracing Background Knowledge in the Analysis of Actual Causality: An Answer Set Programming Approach](https://mlsanity.com/paper/2306.03874/) (2023)
- [A Proof-of-Concept for Explainable Disease Diagnosis Using Large Language Models and Answer Set Programming](https://mlsanity.com/paper/2512.23932/) (2025)
- [HyDI: A hybrid Deep Learning-Inductive Logic Programming ensemble for multi-label classification](https://mlsanity.com/paper/2609.37740/) (2026)

## Abstract (arXiv)

We present xclingo, a tool for generating explanations from ASP programs annotated with text and labels. These annotations allow tracing the application of rules or the atoms derived by them. The input of xclingo is a markup language written as ASP comment lines, so the programs annotated in this way can still be accepted by a standard ASP solver. xclingo translates the annotations into additional predicates and rules and uses the ASP solver clingo to obtain the extension of those auxiliary predicates. This information is used afterwards to construct derivation trees containing textual explanations. The language allows selecting which atoms to explain and, in its turn, which atoms or rules to include in those explanations. We illustrate the basic features through a diagnosis problem from the literature.
