Stepping through an answer-set program

  • Authors:
  • Johannes Oetsch;Jörg Pührer;Hans Tompits

  • Affiliations:
  • Technische Universität Wien, Institut für Informationssysteme, Vienna, Austria;Technische Universität Wien, Institut für Informationssysteme, Vienna, Austria;Technische Universität Wien, Institut für Informationssysteme, Vienna, Austria

  • Venue:
  • LPNMR'11 Proceedings of the 11th international conference on Logic programming and nonmonotonic reasoning
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.