Answer Set Programming (ASP) is one of the major declarative programming paradigms in the area of logic programming and non-monotonic reasoning. Despite that ASP features a simple syntax and an intuitive semantics, errors are common during the development of ASP programs. In this paper we propose a novel debugging approach allowing for interactive localization of bugs in non-ground programs. The new approach points the user directly to a set of non-ground rules involved in the bug, which might be refined (up to the point in which the bug is easily identified) by asking the programmer a sequence of questions on an expected answer set. The approach has been implemented on top of the ASP solver WASP. The resulting debugger has been complemented by a user-friendly graphical interface, and integrated in ASPIDE, a rich IDE for answer set programs. In addition, an empirical analysis shows that the new debugger is not affected by the grounding blowup limiting the application of previous approaches based on meta-programming. Under consideration in Theory and Practice of Logic Programming (TPLP).
There are other approaches enabling faults localization in ASP, but not directly comparable with , including Consistency-Restoring Prolog @cite_24 , translation of ASP programs to natural language @cite_12 , visualization of justifications for an answer set @cite_22 as well as stepping through an ASP program @cite_37 . In @cite_2 , the authors present a debugging technique for normal ASP programs that is based on inductive logic programming (ILP) and test cases. The idea is to allow the programmer to specify test cases modeling features that are expected to appear in some solution and those that should not. These are used to to revise the original program semi-automatically so that it satisfies the stated properties. This approach offers the possibility to learn rules (and modifications of rules), whereas focus only on identifying the buggy rules of a given program. Combining these approaches with ideas implemented in is part of our future work.
@cite_37 @cite_22 @cite_24 @cite_2 @cite_12
1555658928 20730496 1234244774 66877937
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. We present an extension of language A-Prolog by consistency-restoring rules with preferences, give the semantics of the new language, CR-Prolog, and show how the language can be used to formalize various types of commonsense knowledge and reasoning. Declarative programming allows the expression of properties of the desired solution(s), while the computational task is delegated to a general-purpose algorithm. The freedom from explicit control is counter-balanced by the difficulty in working out what properties are missing or are incorrectly expressed, when the solutions do not meet expectations. This can be particularly problematic in the case of answer set semantics, because the absence of a key constraint rule could make the difference between none or thousands of answer sets, rather than the intended one (or handful). The debugging task then comprises adding or deleting conditions on the right hand sides of existing rules or, more far-reaching, adding or deleting whole rules. The contribution of this paper is to show how inductive logic programming (ILP) along with examples of (un)desirable properties of answer sets can be used to revise the original program semi-automatically so that it satisfies the stated properties, in effect providing debugging-by-example for programs under answer set semantics. A feed nozzle for a liquid fuel or fluid coker feed nozzle for a reactor comprises an outer nozzle shroud with a removable, refractory ceramic fiber wrapped feed nozzle coaxially affixed within the shroud by the coacting of flanges on the outer ends of said shroud and said feed nozzle. A novel method of assembling the same is also disclosed.