Stepwise Debugging of Answer-Set Programs

05/18/2017
by   Johannes Oetsch, et al.
0

We introduce a stepping methodology for answer-set programming (ASP) that allows for debugging answer-set programs and is based on the stepwise application of rules. Similar to debugging in imperative languages, where the behaviour of a program is observed during a step-by-step execution, stepping for ASP allows for observing the effects that rule applications have in the computation of an answer set. While the approach is inspired from debugging in imperative programming, it is conceptually different to stepping in other paradigms due to non-determinism and declarativity that are inherent to ASP. In particular, unlike statements in an imperative program that are executed following a strict control flow, there is no predetermined order in which to consider rules in ASP during a computation. In our approach, the user is free to decide which rule to consider active in the next step following his or her intuition. This way, one can focus on interesting parts of the debugging search space. Bugs are detected during stepping by revealing differences between the actual semantics of the program and the expectations of the user. As a solid formal basis for stepping, we develop a framework of computations for answer-set programs. For fully supporting different solver languages, we build our framework on an abstract ASP language that is sufficiently general to capture different solver languages. To this end, we make use of abstract constraints as an established abstraction for popular language constructs such as aggregates. Stepping has been implemented in SeaLion, an integrated development environment for ASP. We illustrate stepping using an example scenario and discuss the stepping plugin of SeaLion. Moreover, we elaborate on methodological aspects and the embedding of stepping in the ASP development process.

READ FULL TEXT
research
08/01/2018

Debugging Non-Ground ASP Programs: Technique and Graphical Tools

Answer Set Programming (ASP) is one of the major declarative programming...
research
10/08/2012

Annotating Answer-Set Programs in LANA?

While past research in answer-set programming (ASP) mainly focused on th...
research
04/03/2020

Omission-based Abstraction for Answer Set Programs

Abstraction is a well-known approach to simplify a complex problem by ov...
research
03/26/2015

ASPeRiX, a First Order Forward Chaining Approach for Answer Set Computing

The natural way to use Answer Set Programming (ASP) to represent knowled...
research
09/19/2011

Kara: A System for Visualising and Visual Editing of Interpretations for Answer-Set Programs

In answer-set programming (ASP), the solutions of a problem are encoded ...
research
12/14/2021

Rushing and Strolling among Answer Sets – Navigation Made Easy

Answer set programming (ASP) is a popular declarative programming paradi...
research
02/19/2022

ValAsp: a tool for data validation in Answer Set Programming

The development of complex software requires tools promoting fail-fast a...

Please sign up or login with your details

Forgot password? Click here to reset