Stepping through an Answer-Set Program
We introduce a framework for interactive stepping through an answer-set 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.
Keywordsanswer-set programming program analysis debugging
Unable to display preview. Download preview PDF.
- 3.Syrjänen, T.: Debugging inconsistent answer set programs. In: Proc. NMR 2006, pp. 77–83 (2006)Google Scholar
- 4.Gebser, M., Pührer, J., Schaub, T., Tompits, H.: A meta-programming technique for debugging answer-set programs. In: Proc. AAAI 2008, pp. 448–453. AAAI Press, Menlo Park (2008)Google Scholar
- 8.Shapiro, E.Y.: Algorithmic Program Debugging. PhD thesis, Yale University, New Haven, CT, USA (May 1982)Google Scholar
- 12.Calimeri, F., Leone, N., Ricca, F., Veltri, P.: A visual tracer for DLV. In: Proc. SEA 2009 (2009)Google Scholar