An Approach to the Abstract Interpretation of Goal-Directed Answer Set Programming

📅 2026-07-22
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the lack of effective static analysis techniques for goal-directed Answer Set Programming (ASP), which hinders compile-time verification and optimization. It introduces abstract interpretation to this paradigm for the first time, proposing a top-down analysis algorithm based on PLAI fixpoints and designing a novel Shared-Constraints abstract domain to precisely capture variable relationships induced by constraints. Implemented as a preprocessor in Ciao Prolog and integrated into the s(CASP) system, the approach enables efficient detection of spurious odd loops, optimized forall evaluation, and global constraint simplification. These capabilities substantially enhance both the compile-time analyzability and runtime performance of goal-directed ASP programs.
📝 Abstract
Abstract Interpretation infers and verifies program properties by over-approximating program semantics. It has been highly successful for (Constraint) Logic Programming, enabling the analysis of determinism, types, aliasing, and resource usage, as well as application in verification and program optimization. However, Abstract Interpretation has not yet been studied in the context of Goal Directed Answer Set Programming (ASP). In this work, we take a first step in this direction. We present a top-down algorithm based on the PLAI fixpoint, implemented in the abstract interpreter of the Ciao Prolog Preprocessor, to perform abstract interpretation of goal-directed ASP. We also introduce the Shared-Constraints abstract domain, designed to capture potential relations among variables induced by constraints. Finally, we study the practicality of the approach in s(CASP) through three applications: detection of false odd loops over negation, efficient forall evaluation enabled by the Shared-Constraints domain, and abstract specialization (including the simplification of required global constraints). Our results show that compile-time static analysis can improve the evaluation of goal-directed ASP programs.
Problem

Research questions and friction points this paper is trying to address.

Abstract Interpretation
Goal-Directed Answer Set Programming
Static Analysis
Program Verification
Constraint Logic Programming
Innovation

Methods, ideas, or system contributions that make the work stand out.

Abstract Interpretation
Goal-Directed Answer Set Programming
Shared-Constraints abstract domain
Static Analysis
s(CASP)
🔎 Similar Papers
No similar papers found.
D
Daniel Jurjo-Rivas
Universidad Politécnica de Madrid (UPM) & IMDEA Software Institute, Madrid, Spain
J
Joaquín Arias
CETINIA, Universidad Rey Juan Carlos, Madrid, Spain
Gopal Gupta
Gopal Gupta
Professor of Computer Science, The University of Texas at Dallas
Programming languagesLogic ProgrammingArtificial Intelligence
Jose F. Morales
Jose F. Morales
Assistant Professor at UPM / IMDEA Software Institute
Logic ProgrammingVirtual MachinesCompilersAbstract InterpretationStatic Analysis
P
Pedro López-García
Spanish Council for Scientific Research (CSIC) & IMDEA Software Institute, Madrid, Spain
M
Manuel V. Hermenegildo
Universidad Politécnica de Madrid (UPM) & IMDEA Software Institute, Madrid, Spain