# Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Programming

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

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 9 of its 31 references that are in the map.
- First posted on arXiv 22 Oct 2021.

## Builds on (most cited first, 9 of 9)

- [Constraint Answer Set Programming without Grounding](https://mlsanity.com/paper/1804.11162/) (2018)
- [Justifications for Goal-Directed Constraint Answer Set Programming](https://mlsanity.com/paper/2009.10238/) (2020)
- [A Physician Advisory System for Chronic Heart Failure Management Based on Knowledge Patterns](https://mlsanity.com/paper/1610.08115/) (2016)
- [Knowledge-driven Natural Language Understanding of English Text and its Applications](https://mlsanity.com/paper/2101.11707/) (2021)
- [Computing Stable Models of Normal Logic Programs Without Grounding](https://mlsanity.com/paper/1709.00501/) (2017)
- [Induction of Non-Monotonic Logic Programs to Explain Boosted Tree Models Using LIME](https://mlsanity.com/paper/1808.00629/) (2018)
- [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)
- [Knowledge-Assisted Reasoning of Model-Augmented System Requirements with Event Calculus and Goal-Directed Answer Set Programming](https://mlsanity.com/paper/2109.04634/) (2021)

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

- [Locksynth: Deriving Synchronization Code for Concurrent Data Structures with ASP](https://mlsanity.com/paper/2305.18225/) (2023)

## Abstract (arXiv)

Goal-directed evaluation of Answer Set Programs is gaining traction thanks to its amenability to create AI systems that can, due to the evaluation mechanism used, generate explanations and justifications. s(CASP) is one of these systems and has been already used to write reasoning systems in several fields. It provides enhanced expressiveness w.r.t. other ASP systems due to its ability to use constraints, data structures, and unbound variables natively. However, the performance of existing s(CASP) implementations is not on par with other ASP systems: model consistency is checked once models have been generated, in keeping with the generate-and-test paradigm. In this work, we present a variation of the top-down evaluation strategy, termed Dynamic Consistency Checking, which interleaves model generation and consistency checking. This makes it possible to determine when a literal is not compatible with the denials associated to the global constraints in the program, prune the current execution branch, and choose a different alternative. This strategy is specially (but not exclusively) relevant in problems with a high combinatorial component. We have experimentally observed speedups of up to 90x w.r.t. the standard versions of s(CASP).
