Stepping through an Answer-Set Program

We introduce a framework for interactive stepping through an answerset program as a means for debugging. In procedural languages, stepping is a widespread and effective debugging strategy. The idea is to gain insight into the behaviour of a program by executing statement by statement, following the program's control flow. Stepping has not been considered for answer-set programs so far, presumably because of their lack of a control flow. The framework we provide allows for stepwise constructing interpretations following the user's intuition on which rule instances to become active. That is, we do not impose any ordering on the rules but give the programmer the freedom to guide the stepping process. Due to simple syntactic restrictions, each step results in a state that guarantees stability of the intermediate interpretation. We present how stepping can be started from breakpoints as in conventional programming and discuss how the approach can be used for debugging using a running example.

[1]  Wolfgang Faber,et al.  Logic Programming and Nonmonotonic Reasoning , 2011, Lecture Notes in Computer Science.

[2]  Nicola Leone,et al.  A Visual Tracer for DLV , 2009 .

[3]  Robert E. Mercer,et al.  Monotonic Answer Set Programming , 2009, J. Log. Comput..

[4]  Wolfgang Faber,et al.  Recursive Aggregates in Disjunctive Logic Programs: Semantics and Complexity , 2004, JELIA.

[5]  T. Syrjänen Debugging Inconsistent Answer Set Programs , 2006 .

[6]  H. Tompits,et al.  Catching the Ouroboros: On debugging non-ground answer-set programs , 2010, Theory and Practice of Logic Programming.

[7]  Hans Tompits,et al.  A Meta-Programming Technique for Debugging Answer-Set Programs , 2008, AAAI.

[8]  Ken Satoh,et al.  Computing abduction by using TMS with top-down expectation , 2000, J. Log. Program..

[9]  Frank Wolter,et al.  Semi-qualitative Reasoning about Distances: A Preliminary Report , 2000, JELIA.

[10]  Enrico Pontelli,et al.  Justifications for Logic Programs Under Answer Set Semantics , 2006, ICLP.

[11]  Michael Gelfond,et al.  Classical negation in logic programs and disjunctive databases , 1991, New Generation Computing.

[12]  Michael Gelfond,et al.  Logic programming and knowledge representation - The A-Prolog perspective , 2002, Artif. Intell..

[13]  Miroslaw Truszczynski,et al.  The Second Answer Set Programming Competition , 2009, LPNMR.

[14]  Stefan Woltran,et al.  Debugging ASP Programs by Means of ASP , 2007, LPNMR.

[15]  Ehud Shapiro,et al.  Algorithmic Program Debugging , 1983 .

[16]  Torsten Schaub,et al.  Profiling Answer Set Programming: The Visualization Component of the noMoRe System , 2004, JELIA.