<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Testing ASP programs in ASPIDE</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Onofrio Febbraro</string-name>
          <email>febbraro@dlvsystem.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kristian Reale</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesco Ricca</string-name>
          <email>riccag@mat.unical.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DLVSystem s.r.l. - P.zza Vermicelli</institution>
          ,
          <addr-line>Polo Tecnologico, 87036 Rende</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Dipartimento di Matematica, Universita` della Calabria</institution>
          ,
          <addr-line>87030 Rende</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Answer Set Programming (ASP) is a declarative logic programming formalism, which nowadays counts several advanced real-world applications, and has stimulated some interest also in industry. Although some environments for ASP-program development have been proposed in the last few years, the crucial task of testing ASP programs received less attention, and is an Achilles' heel of the available programming environments. In this paper we present a new language for specifying and running unit tests on ASP programs. The testing language has been implemented in ASPIDE, a comprehensive IDE for ASP, which supports the entire life-cycle of ASP development with a collection of user-friendly graphical tools for program composition, testing, debugging, profiling, solver execution configuration, and output-handling.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Answer Set Programming (ASP) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is an expressive [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] logic programming paradigm
proposed in the area of non-monotonic reasoning. ASP allows one to declaratively
specify a complex computational problem by a logic program whose answer sets correspond
to solutions and then use a solver to find such a solution [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The high expressive power
of ASP has been profitably exploited for developing advanced applications belonging
to several fields, from Artificial Intelligence [
        <xref ref-type="bibr" rid="ref10 ref4 ref5 ref6 ref7 ref8 ref9">4–10</xref>
        ] to Information Integration [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
and Knowledge Management [
        <xref ref-type="bibr" rid="ref12 ref13 ref14">12–14</xref>
        ]. Interestingly, these applications of ASP recently
have stimulated some interest also in industry [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
      </p>
      <p>
        On the one hand, the effective application of ASP in real-world scenarios was made
possible by the availability of efficient ASP systems [
        <xref ref-type="bibr" rid="ref16 ref17 ref18 ref19 ref20 ref21 ref22 ref23 ref24 ref25 ref26 ref4">4, 16–26</xref>
        ]. On the other hand,
the adoption of ASP can be further boosted by offering effective programming tools
capable of supporting the programmers in managing large and complex projects [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ].
      </p>
      <p>
        In the last few years, a number of tools for developing ASP programs have been
proposed, including editors and debuggers [
        <xref ref-type="bibr" rid="ref28 ref29 ref30 ref31 ref32 ref33 ref34 ref35 ref36 ref37 ref38">28–38</xref>
        ]. Among them, ASPIDE [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ] –which
stands for Answer Set Programming Integrated Development Environment– is one of
the most complete development tools1 and it integrates a cutting-edge editing tool
(featuring dynamic syntax highlighting, on-line syntax correction, autocompletion,
codetemplates, quick-fixes, refactoring, etc.) with a collection of user-friendly graphical
1 For an exaustive feature-wise comparison with existing environments for developing logic
programs we refer the reader to [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ].
tools for program composition, debugging, profiling, DBMS access, solver execution
configuration and output-handling.
      </p>
      <p>
        Although so many tools for developing ASP programs have been proposed up to
now, the crucial task of testing ASP programs received less attention [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ], and is an
Achilles’ heel of the available programming environments. Indeed, the majority of
available graphic programming environments for ASP does not provide the user with
a testing tool (see [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ]), and also the one present in the first versions of ASPIDE is far
from being effective.
      </p>
      <p>
        In this paper we present a pragmatic solution for testing ASP programs. In
particular, we present a new language for specifying and running unit tests on ASP programs.
The testing language presented in this paper is inspired to the JUnit framework [
        <xref ref-type="bibr" rid="ref40">40</xref>
        ]:
the developer can specify the rules composing one or several units, specify one or more
inputs and assert a number of conditions on the expected outputs. The obtained test
case specification can be run by exploiting an ASP solver, and the assertions are
automatically verified by analyzing the output of the chosen ASP solver. Note that test case
specification is applicable independently of the used ASP solver. The testing language
was implemented in ASPIDE, which also provides the user with some graphic tools that
make the development of test cases simpler. The testing tool described in this work
extends significantly the one formerly available in ASPIDE, and enriches its collection of
user-friendly graphical tools for program composition, debugging, profiling, database
management, solver execution configuration, and output-handling.
      </p>
      <p>
        As far as related work is concerned, the task of testing ASP programs was
approached for the first time, to the best of our knowledge, in [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ] where the notion of
structural testing for ground normal ASP programs is defined and a method for
automatically generating tests is introduced. The results presented in [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ] are, somehow,
orthogonal to the contribution of this paper. Indeed, no language/implementation is
proposed in [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ] for specifying/automatically-running the produced test cases; whereas,
the language presented in this paper can be used for encoding the output of a test case
generator based on the methods proposed in [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ]. Finally, it is worth noting that,
testing approaches developed for other logic languages, like prolog [
        <xref ref-type="bibr" rid="ref41 ref42 ref43">41–43</xref>
        ], cannot be
straightforwardly ported to ASP because of the differences between the languages.
      </p>
      <p>The remainder of this paper is organized as follows: in Section 2 we overview
ASPIDE; in section 3 we introduce a language for specifying unit tests for ASP programs;
in Section 4 we describe the user interface components of ASPIDE conceived for
creating and running tests; finally, in Section 5 we draw the conclusion.
2</p>
    </sec>
    <sec id="sec-2">
      <title>ASPIDE: Integrated Development Environment for ASP</title>
      <p>
        ASPIDE is an Integrated Development Environment (IDE) for ASP, which features a
rich editing tool with a collection of user-friendly graphical tools for ASP program
development. In this section we first summarize the main features of the system and then
we overview the main components of the ASPIDE user interface. For a more detailed
description of ASPIDE, as well as for a complete comparison with competing tools,
we refer the reader to [
        <xref ref-type="bibr" rid="ref38">38</xref>
        ] and to the online manual published in the system web site
http://www.mat.unical.it/ricca/aspide.
      </p>
      <p>
        System Features. ASPIDE is inspired to Eclipse, one of the most diffused programming
environments. The main features of ASPIDE are the following:
– Workspace management. The system allows one to organize ASP programs in
projects, which are collected in a special directory (called workspace).
– Advanced text editor. The editing of ASP files is simplified by an advanced text
editor. Currently, the system is able to load and store ASP programs in the syntax
of the ASP system DLV [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], and supports the ASPCore language profile
employed in the ASP System Competition 2011 [
        <xref ref-type="bibr" rid="ref44">44</xref>
        ]. ASPIDE can also manage TYP
files specifying a mapping between program predicates and database tables in the
DLVDB syntax [
        <xref ref-type="bibr" rid="ref45">45</xref>
        ]. Besides the core functionality that basic text editors offer (like
code line numbering, find/replace, undo/redo, copy/paste, etc.), ASPIDE offers
others advanced functionalities, like: Automatic completion, Dynamic code templates,
Quick fix, and Refactoring. Indeed, the system is able to complete (on request)
predicate names, as well as variable names. Predicate names are both learned while
writing, and extracted from the files belonging to the same project; variables are
suggested by taking into account the rule we are currently writing. When several
possible alternatives for completion are available the system shows a pop-up
dialog. Moreover, the writing of repeated programming patterns (like transitive
closure or disjunctive rules for guessing the search space) is assisted by advanced
auto-completion with code templates, which can generate several rules at once
according to a known pattern. Note that code templates can be also user defined by
writing DLT [
        <xref ref-type="bibr" rid="ref46">46</xref>
        ] files. The refactoring tool allows one to modify in a guided way,
among others, predicate names and variables (e.g., variable renaming in a rule is
done by considering bindings of variables, so that variables/predicates/strings
occurring in other expressions remain unchanged). Reported errors or warnings can
be automatically fixed by selecting (on request) one of the system’s suggested quick
fixes, which automatically change the affected part of code.
– Outline navigation. ASPIDE creates an outline view which graphically represents
program elements. Each item in the outline can be used to quickly access the
corresponding line of code (a very useful feature when dealing with long files), and also
provides a graphical support for building rules in the visual editor (see below).
– Dynamic code checking and errors highlighting. Syntax errors and relevant
conditions (like safety) are checked while typing programs: portions of code containing
errors or warnings are immediately highlighted. Note that the checker considers the
entire project, and warns the user by indicating e.g., that atoms with the same
predicate name have different arity in several files. This condition is usually revealed
only when programs divided in multiple files are run together.
– Dependency graph. The system is able to display several variants of the
dependency graph associated to a program (e.g., depending on whether both positive and
negative dependencies are considered).
– Debugger and Profiler. Semantic errors detection as well as code optimization can
be done by exploiting graphic tools. In particular, we developed a graphical user
interface for embedding in ASPIDE the debugging tool spock [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] (we have also
adapted spock for dealing with the syntax of the DLV system). Regarding the
profiler, we have fully embedded the graphical interface presented in [
        <xref ref-type="bibr" rid="ref47">47</xref>
        ].
– Unit Testing. The user can define unit tests and verify the behavior of programs
units. The language for specifying unit tests, as well as the graphical tools of
ASPIDE assisting the development of tests, are described in detail in the following
sections.
– Configuration of the execution. This feature allows one to configure and manage
input programs and execution options (called run configurations).
– Presentation of results. The outputs of the program (either answer sets, or query
results) are visualized in a tabular representation or in a text-based console. The
result of the execution can be also saved in text files for subsequent analysis.
– Visual Editor. The users can draw logic programs by exploiting a full graphical
environment that offers a QBE-like tool for building logic rules [
        <xref ref-type="bibr" rid="ref48">48</xref>
        ]. The user can
switch, every time he needs, from the text editor to the visual one (and vice-versa)
thanks to a reverse-rengineering mechanism from text to graphical format.
– Interaction with databases. Interaction with external databases is useful in several
applications (e.g., [
        <xref ref-type="bibr" rid="ref11 ref15 ref8">11, 15, 8</xref>
        ]). ASPIDE provides a fully graphical import/export
tool that automatically generates mappings by following the DLVDB Typ files
specifications [
        <xref ref-type="bibr" rid="ref45">45</xref>
        ]. Text editing of Typ mappings is also assisted by syntax coloring and
auto-completion. Database oriented applications can be run by setting DLVDB as
solver in a run configuration.
      </p>
      <p>Interface Overview The system interface of ASPIDE is depicted in Figure 1. The most
common operations can be quickly executed through a toolbar present in the upper part
of the ASPIDE interface (zone 1). From left to right there are buttons allowing one to:
save files, undo/redo, copy &amp; paste, find &amp; replace, switch between visual to text editor,
run the solver/profiler/debugger. The main editing area (zone 4) is organized in a
multitabbed panel possibly collecting several open files. On the left there is the explorer
panel (zone 2) which allows one to browse the workspace; and the error console (zone
3). The explorer panel lists projects and files included in the workspace, while the error
console organizes errors and warnings according to the project and files where they are
localized. On the right, there are the outline panel (zone 5) and the sources panel (zone
6). The first shows an outline of the currently edited file, while the latter reports a list
of the database sources connected with the current project. Note that the layout of the
system can be customized by the user, indeed panels can be moved and rearranged as
the user likes.</p>
      <p>ASPIDE is written in Java and runs on the most diffused operating systems
(Microsoft Windows, Linux, and Mac OS) and can connect to any database supporting
Java DataBase Connectivity (JDBC).
3</p>
    </sec>
    <sec id="sec-3">
      <title>A language for testing ASP programs</title>
      <p>
        Software testing [
        <xref ref-type="bibr" rid="ref49">49</xref>
        ] is an activity aimed at evaluating the behavior of a program by
verifying whether it produces the required output for a particular input. The goal of
testing is not to provide a mean for establishing whether the program is totally correct;
conversely testing is a pragmatic and cheap way of finding errors by executing some
test. A test case is the specification of some input I and corresponding expected
outputs O. A test case fails when the outputs produced by running the program do not
correspond to O, it passes otherwise.
      </p>
      <p>
        One of the most diffused white-box2 testing techniques is unit testing. The idea
of unit testing is to asses an entire software by testing its subparts called units (and
corresponding to small testable parts of a program). In a software implemented by using
imperative object-oriented languages, unit testing corresponds to assessing separately
portions of the code like class methods. The same idea can be applied to ASP, once the
notion of unit is given. We intend as unit of an ASP program P any subset of the rules of
P corresponding to a splitting set [
        <xref ref-type="bibr" rid="ref50">50</xref>
        ] (actually the system exploits a generalization of
the splitting theorem by Lifschitz and Turner [
        <xref ref-type="bibr" rid="ref50">50</xref>
        ] to the non-ground case [
        <xref ref-type="bibr" rid="ref51">51</xref>
        ]). In this
way, the behavior of units can be verified (by avoiding unwanted behavioral changes
due to cycles) both when they run isolated from the original program as well as when
they are left immersed in (part of) the original program.
      </p>
      <p>
        In the following, we present a pragmatic solution for testing ASP programs, which
is a new language, inspired to the JUnit framework [
        <xref ref-type="bibr" rid="ref40">40</xref>
        ], for specifying and running
unit tests. The developer, given an ASP program, can select the rules composing an
unit, specify one or more inputs, and assert a number of conditions on the expected
output. The obtained test case specification can be run, and the assertions automatically
2 A test conceived for verifying some functionality of an application without knowing the code
internals is said to be a black-box test. A test conceived for verifying the behavior of a specific
part of a program is called white-box test. White box testing is an activity usually carried out
by developers and is a key component of agile software development [
        <xref ref-type="bibr" rid="ref49">49</xref>
        ].
verified by calling an ASP solver and checking its output. In particular, we allow three
test execution modes:
– Execution of selected rules. The selected rules will be executed separated from the
original program on the specified inputs.
– Execution of split program. The program corresponding to the splitting set
containing the atoms of the selected rules is run and tested. In this way, the ”interface”
between two splitting sets can be tested (e.g. one can assert some expected
properties on the candidates produced by the guessing part of a program by excluding the
effect of some constraints in the checking part).
– Execution in the whole program. The original program is run and specific assertions
regarding predicates contained in the unit are checked. This corresponds to filter test
results on the atoms contained in the selected rules.
      </p>
      <p>Testing Language. A test file can be written according to the following grammar:3
1 : invocation("invocationName" [ ,"solverPath", "options" ]?);
2 : [ [ input("program"); ] | [ inputFile("file"); ] ]*
3 : [
4 : testCaseName([ SELECTED RULES | SPLIT PROGRAM | PROGRAM ]?)
5 : f
6 : [newOptions("options");]?
7 : [ [ input("program"); ] | [ inputFile("file"); ] ]*
8 : [ [ excludeInput("program"); ]
9 : | [ excludeInputFile("file"); ] ]*
10 : [
11 : [ filter | pfilter | nfilter ]
12 : [ [ (predicateName [ ,predicateName ]* ) ]
13 : | [SELECTED RULES] ] ;
14 : ]?
15 : [ selectRule(ruleName); ]*
16 : [ assertName( [ intnumber, ]? "program" ); ]*
17 : g
18 : ]*
19 : [ assertName( [ intnumber, ]? "program" ); ]*</p>
      <p>A test file might contain a single test or a test suite (a set of tests) including several
test cases. Each test case includes one or more assertions on the execution results.</p>
      <p>The invocation statement (line 1) sets the global invocation settings, that are applied
to all tests specified in the same file (name, solver, and execution options). In the
implementation, the invocation name might correspond to an ASPIDE run configuration, and
the solver path and options are not mandatory.</p>
      <p>The user can specify one or more global inputs by writing some input and inputFile
statements (line 2). The first kind of statement allows for writing the input of the test in
the form of ASP rules or simply facts; the second statement indicates a file that contains
some input in ASP format.
3 Non-terminals are in bold face; token specifications are omitted for simplicity.</p>
      <p>A test case declaration (line 4) is composed by a name and an optional parameter
that allows one to choose if the execution will be done on the entire program, on a
subset of rules, or considering program corresponding to the splitting set containing the
selected rules.</p>
      <p>The user can specify specific solver options (line 6), as well as specific inputs (line
7) which are valid in a given test case. Moreover, global inputs of the test suite can be
excluded by exploiting excludeInput and excludeInputFile statements (lines 8 and 9).</p>
      <p>The optional statements filter, pfilter and nfilter (lines 11, 12 and 13) are used to
filter out output predicates from the test results predicates, specified as parameter, on
the execution result when assertions will be executed.4</p>
      <p>The statement selectRule (line 15) allows one for selecting rules among the ones
composing the global input program. A rule r to be selected must be identified by a
name, which is expected to be specified in the input program in a comment appearing
in the row immediately preceding r (see Figure 1). ASPIDE adds automatically the
comments specifying rule names. If a set of selected rules does not belong to the same
splitting set, the system has to print a warning indicating the problem.</p>
      <p>The expected output of a test case is expressed in term of assertions statements
(lines 16/19). The possible assertions are:
– assertTrue(f”atomList.”g)/assertCautiouslyTrue(f”atomList.”g). Asserts that all atoms
of the atom list must be true in any answer sets;
– assertBravelyTrue(f”atomList.”g). Asserts that all atoms of the atom list must be
true in at least one answer set;
– assertTrueIn(number, f”atomList.”g). Asserts that all atoms of the atom list must
be true in exactly number answer sets;
– assertTrueInAtLeast(number, f”atomList.”g). Asserts that all atoms of the atom list
must be true in at least number answer sets;
– assertTrueInAtMost(number, f”atomList.”g). Asserts that all atoms of the atom list
must be true in at most number answer sets;
together with the corresponding negative assertions: assertFalse, assertCautiouslyFalse,
assertBravelyFalse, assertFalseIn, assertFalseInAtLeast, assertFalseInAtMost.
Assertions can be global (line 19) or local to a single test (line 16).</p>
      <p>In the following we report an example of test case file.</p>
      <p>Test case example. The Hamiltonian Path problem is a classical NP-complete problem
in graph theory. Given a finite directed graph G = (V; A) and a node a 2 V of this
graph, does there exist a path in G starting at a and passing through each node in V
exactly once? Suppose that the graph G is specified by using facts over predicates vtx
(unary) and edge (binary), and the starting node a is specified by the predicate start
(unary). The program in Figure 1 solves the problem.</p>
      <p>The disjunctive rule (r2) guesses a subset S of the arcs to be in the path, while the rest
of the program checks whether S constitutes a Hamiltonian Path. Here, an auxiliary
4 pfilter selects only positive literals and excludes the strong negated ones, while nfilter has
opposite behavior.
predicate reached is defined, which specifies the set of nodes which are reached from
the starting node. In the checking part, the two constraints r4 and r5 ensure that the set
of arcs S selected by path meets the following requirements, which any Hamiltonian
Path must satisfy: (i) a vertex must have at most one incoming edge, and (ii) a vertex
must have at most one outgoing edge. The constraints r6 and r7 enforces that all nodes
in the graph are reached from the starting node in the subgraph induced by S and the
start node must be the first node of the path.</p>
      <p>In order to test this encoding we define a test suite file. Suppose that the encoding
is stored in a file named hamiltonianPath.dl. Suppose also that the graph instance of
Figure 2a is stored in a file named graphInstance.dl, and is composed by the following
facts: vtx(1). vtx(2). vtx(3). vtx(4). vtx(5). edge(1, 2). edge(2, 3). edge(3, 4). edge(4, 5).
edge(3, 2). edge(1, 3). edge(2, 4). edge(5, 1)..</p>
      <p>The following is a simple test suite specification for the above-reported ASP
program:
invocation("SEAHamiltonianPath", "/usr/bin/dlv", "");
inputFile("hamiltonianPath.dl");
reachability()
f
inputFile("graphInstance.dl");
input("start(1).");
assertTrue("reached(1).reached(2).reached(3).reached(4).reached(5).");
g
guessSlice(SELECTED RULES)
f
inputFile("graphInstance.dl");
input("reached(1).");
selectRule("r2");
selectRule("r3");
assertBravelyFalse("path(1, 2).");
assertBravelyTrue("path(1, 2).");
g
guessSliceNonReachability(SPLIT PROGRAM)
f
inputFile("graphInstance.dl");
input("start(3).");
excludeInput( "edge(5, 1)." );
selectRule("r2");
selectRule("r3");
assertCautiouslyFalse( "reached(1)." );
g
assertFalse("path(1, 2).");</p>
      <p>Here, we first setup the invocation parameters by indicating DLV as solver, then we
specify the file to be tested hamiltonianPath.dl by exploiting a global input statement;
then, we add the test case reachability, in which we verify that if node 1 is the
starting node than nodes f1,2,3,4,5g are reached (see Figure 2a). To this end we specify
graphInstance.dl as local input file and start(1) as local input and write some assertion
requiring that atoms freached(1), reached(2), reached(3), reached(4), reached(5)g are
(cautiously) true.</p>
      <p>In the second test case, named guessSlice, we select rules r2 and r3 and we require
to test selected rules in isolation. The (local) inputs in this case are: the file
graphInstance.dl and the fact freached(1).g. In this case we are testing only the part of the
program that guesses the paths, and we specify a couple of additional assertions (i.e.,
path(1, 2) has to be true in some answer set and false in some other).</p>
      <p>Test case guessSliceNonReachability is run in SPLIT PROGRAM modality, which
requires to test the subprogram containing all the rules belonging to the splitting set
corresponding to the selection (i.e., fpath, outPath, edge, reachedg). With this test case
the sub-program that we are testing is composed by all the rules of the Hamiltonian
Path example without the constraints. Also in this case we include the graph instance
file graphInstance.dl. Additionally, we remove edge from 5 to 1 (see Fig. 2b), so that
node 1 is not reached, then we add the assertion corresponding to this observation.
Finally, we add a global assertion (assertFalse(”path(1,2).”) to check if path(1,2) is
not contained in any answer set (note that the graph instance and the starting node are
missing in the global inputs).</p>
      <p>The test file described above can be created graphically and executed in ASPIDE as
described in the following section.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Unit Testing in ASPIDE</title>
      <p>In this section we describe the graphic tools implemented in ASPIDE conceived for
developing and running test cases. Space constraints prevent us from providing a
complete description of all the usage scenarios and available commands. However, in order
to have an idea about the capabilities of the testing interface of ASPIDE, we describe
step by step how to implement the example illustrated in the previous section.</p>
      <p>Suppose that we have created in ASPIDE a project named SEA, which contains
the files hamiltonianPath.dl and graphInstance.dl (see Fig. 1) storing the encoding of
the hamiltonian path problem and the graph instance, respectively. Since the file that we
want to test in our example is hamiltonianPath.dl, we select it in the workspace explorer,
then we click the right button of the mouse and select New Test from the popup menu
(Fig. 3a). The system shows the test creation dialog (Fig. 3b), which allows for both
setting the name of the test file and selecting a previously-defined run configuration
(storing execution options). In this case we select the one named SEAHamiltonianPath
explicitly referring to the DLV system (ASPIDE will get the solver path directly from
the selected run configuration). By clicking on the Finish button, the new test file is
created (see Fig. 3c) where the statements regarding input files and invocation are added
automatically. We add the first unit test (called reachability) by exploiting the text editor
(see Fig. 3d), whereas we build the remaining ones (working on some selected rules) by
exploiting the logic program editor. After opening the hamiltonianPath.dl file, we select
rules r2 and r3 inside the text editor, we right-click on them and we select Add selected
rules in test case from the menu item Test of the popup menu (fig. 3e). The system opens
a dialog window where we indicate the test file in which we want to add the new test
case (fig. 3f). We click on the Create test case; the system will ask for the name of the
new test case and we write guessSlice; after that, on the window, we select the option
execute selected rules and click on the Finish button. The system will add the test case
guessSlice filled with the selectRule statements indicating the two selected rules. To add
project files as input of the test case, we select them from the workspace explorer and
click on Use file as input in the menu item Test (fig. 3g). The test created up to now
is shown in figure 3h. Following an analogous procedure we create the remaining test
cases (see Fig. 4a). To execute our tests, we right-click on the test file and select Execute
Test. The Test Execution Dialog appears and the results are shown to the programmer
(see Fig. 4b). Failing tests are indicated by a red icon, while green icons indicate passing
tests. At this point, in order to show how to modify graphically a test case, we add the
following additional test that purposely fails:
reachabilityFailure()
f
inputFile("graphInstance.dl");
input("start(1).");
excludeInput("edge(4, 5).");
excludeInput(":- vtx(X), not reached(X).");
assertTrue("reached(5).");
g</p>
      <p>As shown in Figure 2c this additional test (as expected) fails, and the reason for
this failure is indicated (see Fig. 4c) in the test execution dialog. In order to know
which literals of the solution do not satisfy the assertion, we right-click on the failed
test and select Manage Asserts from the menu. A dialog showing the outputs of the test
appears where, in particular, predicates and literals matching correctly the assertions are
marked in green, whereas the ones violating the assertion are marked in red (gray icons
may appear to indicate missing literals which are expected to be in the solution). In
our example, the assertion is assertTrue(”reached(5).”), so we expect that all solutions
contain the literal reached(5); however, in our instance, node 5 is never reached, this is
because the test case purposely contains an error. We modify this test case by adding the
right assertion. This can be obtained by acting directly on the result window (fig. 4d).
We remove the old assertion by selecting it and clicking on the Remove Assert button.
Finally, we save the modifications, and we execute the test suite again (see Fig. 4e).
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>
        This paper presents a pragmatic environment for testing ASP programs. In particular,
we present a new language, inspired to the JUnit framework [
        <xref ref-type="bibr" rid="ref40">40</xref>
        ], for specifying and
running unit tests on ASP programs. The testing language has been implemented in
ASPIDE together with some graphic tools for easing both the development of tests and
the analysis of test execution.
      </p>
      <p>
        As far as future work is concerned, we plan to extend ASPIDE by
improving/introducing additional dynamic editing instruments, and graphic tools. In particular, we plan
to further improve the testing tool by supporting (semi)automatic test case generation
based on the structural testing techniques proposed in [
        <xref ref-type="bibr" rid="ref39">39</xref>
        ].
      </p>
      <p>Acknowledgments. This work has been partially supported by the Calabrian Region
under PIA (Pacchetti Integrati di Agevolazione industria, artigianato e servizi) project
DLVSYSTEM approved in BURC n. 20 parte III del 15/05/2009 - DR n. 7373 del
06/05/2009.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Classical Negation in Logic Programs</article-title>
          and
          <source>Disjunctive Databases. NGC 9</source>
          (
          <year>1991</year>
          )
          <fpage>365</fpage>
          -
          <lpage>385</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mannila</surname>
          </string-name>
          , H.:
          <article-title>Disjunctive Datalog</article-title>
          .
          <source>ACM TODS 22(3)</source>
          (
          <year>1997</year>
          )
          <fpage>364</fpage>
          -
          <lpage>418</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Lifschitz</surname>
          </string-name>
          , V.:
          <article-title>Answer Set Planning</article-title>
          . In: ICLP'
          <volume>99</volume>
          )
          <fpage>23</fpage>
          -
          <lpage>37</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Namasivayam</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neumann</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , Truszczyn´ski,
          <string-name>
            <surname>M.:</surname>
          </string-name>
          <article-title>The first answer set programming system competition</article-title>
          .
          <source>In: LPNMR'07. LNCS 4483</source>
          , (
          <year>2007</year>
          )
          <fpage>3</fpage>
          -
          <lpage>17</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Balduccini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Watson</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nogeira</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The USA-Advisor: A Case Study in Answer Set Planning</article-title>
          .
          <source>In: LPNMR 2001 (LPNMR-01). LNCS 2173</source>
          , (
          <year>2001</year>
          )
          <fpage>439</fpage>
          -
          <lpage>442</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Baral</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Reasoning Agents in Dynamic Domains</article-title>
          .
          <source>In: Logic-Based Artificial Intelligence</source>
          . Kluwer (
          <year>2000</year>
          )
          <fpage>257</fpage>
          -
          <lpage>279</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Baral</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Uyan</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Declarative Specification and Solution of Combinatorial Auctions Using Logic Programming</article-title>
          .
          <source>In: LPNMR 2001 (LPNMR-01). LNCS 2173</source>
          , (
          <year>2001</year>
          )
          <fpage>186</fpage>
          -
          <lpage>199</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Friedrich</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ivanchenko</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Diagnosis from first principles for workflow executions</article-title>
          .
          <source>Tech. Rep</source>
          ., http://proserver3-iwas.uni-klu.ac.at/download area/
          <source>TechnicalReports/technical report 2008 02.pdf.</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Franconi</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Palma</surname>
            ,
            <given-names>A.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scarcello</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Census Data Repair: a Challenging Application of Disjunctive Logic Programming</article-title>
          .
          <source>In: LPAR 2001. LNCS 2250</source>
          , (
          <year>2001</year>
          )
          <fpage>561</fpage>
          -
          <lpage>578</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Nogueira</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balduccini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Watson</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barry</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>An A-Prolog Decision Support System for the Space Shuttle</article-title>
          .
          <source>In: Practical Aspects of Declarative Languages, Third International Symposium (PADL</source>
          <year>2001</year>
          ).
          <source>LNCS</source>
          <year>1990</year>
          , (
          <year>2001</year>
          )
          <fpage>169</fpage>
          -
          <lpage>183</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosati</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fink</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Greco</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kałka</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lembo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenzerini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lio</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nowicki</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ruzzi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Staniszkis</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Terracina</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>The INFOMIX System for Advanced Integration of Incomplete and Inconsistent Data</article-title>
          .
          <source>In: SIGMOD</source>
          <year>2005</year>
          , Baltimore, Maryland, USA, ACM Press (
          <year>2005</year>
          )
          <fpage>915</fpage>
          -
          <lpage>917</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Baral</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Knowledge Representation, Reasoning and Declarative Problem Solving</article-title>
          .
          <source>CUP</source>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Bardadym</surname>
            ,
            <given-names>V.A.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Computer-Aided School</surname>
          </string-name>
          and University Timetabling:
          <article-title>The New Wave</article-title>
          .
          <source>In: Practice and Theory of Automated Timetabling, First International Conference 1995. LNCS 1153</source>
          , (
          <year>1996</year>
          )
          <fpage>22</fpage>
          -
          <lpage>45</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Grasso</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Iiritano</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Some DLV Applications for Knowledge Management</article-title>
          .
          <source>In: Proceedings of the 10th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR</source>
          <year>2009</year>
          ).
          <source>LNCS 5753</source>
          , (
          <year>2009</year>
          )
          <fpage>591</fpage>
          -
          <lpage>597</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Grasso</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manna</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning: Essays in Honor of M. Gelfond</article-title>
          . LNCS
          <volume>6565</volume>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pfeifer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scarcello</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The DLV System for Knowledge Representation and Reasoning</article-title>
          .
          <source>ACM TOCL 7</source>
          (
          <issue>3</issue>
          ) (
          <year>2006</year>
          )
          <fpage>499</fpage>
          -
          <lpage>562</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Simons</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          : Smodels Homepage (since
          <year>1996</year>
          ) http://www.tcs.hut.fi/Software/ smodels/.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Simons</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , Niemela¨,
          <string-name>
            <given-names>I.</given-names>
            ,
            <surname>Soininen</surname>
          </string-name>
          ,
          <string-name>
            <surname>T.</surname>
          </string-name>
          :
          <article-title>Extending and Implementing the Stable Model Semantics</article-title>
          .
          <source>AI</source>
          <volume>138</volume>
          (
          <year>2002</year>
          )
          <fpage>181</fpage>
          -
          <lpage>234</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>ASSAT homepage</article-title>
          (since
          <year>2002</year>
          ) http://assat.cs.ust.hk/.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>ASSAT: Computing Answer Sets of a Logic Program by SAT Solvers</article-title>
          .
          <source>In: AAAI-2002</source>
          , Edmonton, Alberta, Canada, AAAI Press / MIT Press (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Babovich</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maratea</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Cmodels-2: Sat-based answer sets solver enhanced to non-tight programs</article-title>
          . http://www.cs.utexas.edu/users/tag/cmodels.html (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaufmann</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neumann</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Conflict-driven answer set solving</article-title>
          .
          <source>In: IJCAI</source>
          <year>2007</year>
          ,
          <article-title>(</article-title>
          <year>2007</year>
          )
          <fpage>386</fpage>
          -
          <lpage>392</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Janhunen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , Niemela¨,
          <string-name>
            <given-names>I.</given-names>
            ,
            <surname>Seipel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Simons</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>You</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.H.</surname>
          </string-name>
          :
          <article-title>Unfolding Partiality and Disjunctions in Stable Model Semantics</article-title>
          .
          <source>ACM TOCL 7</source>
          (
          <issue>1</issue>
          ) (
          <year>2006</year>
          )
          <fpage>1</fpage>
          -
          <lpage>37</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Lierler</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Disjunctive Answer Set Programming via Satisfiability</article-title>
          .
          <source>In: LPNMR'05. LNCS 3662</source>
          , (
          <year>2005</year>
          )
          <fpage>447</fpage>
          -
          <lpage>451</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Drescher</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grote</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaufmann</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , Ko¨nig,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Ostrowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <surname>T.</surname>
          </string-name>
          :
          <article-title>Conflict-Driven Disjunctive Answer Set Solving</article-title>
          .
          <source>In: Proceedings of the Eleventh International Conference on Principles of Knowledge Representation and Reasoning (KR</source>
          <year>2008</year>
          ), Sydney, Australia, AAAI Press (
          <year>2008</year>
          )
          <fpage>422</fpage>
          -
          <lpage>432</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Denecher</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vennekens</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bond</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.T.</surname>
          </string-name>
          :
          <article-title>The second answer set programming system competition</article-title>
          .
          <source>In: Logic Programming and Nonmonotonic Reasoning - 10th International Conference, LPNMR'09. LNCS 5753</source>
          , Potsdam, Germany, Berlin // Heidelberg (
          <year>2009</year>
          )
          <fpage>637</fpage>
          -
          <lpage>654</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Dovier</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Erdem</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <source>Report on application session @lpnmr09</source>
          (
          <year>2009</year>
          ) http://www.cs. nmsu.edu/ALP/
          <year>2010</year>
          /03/report-on
          <article-title>-application-session-lpnmr09/.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Terracina</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cianni</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veltri</surname>
            ,
            <given-names>P.:</given-names>
          </string-name>
          <article-title>An integrated graphic tool for developing and testing DLV programs</article-title>
          .
          <source>In: Proceedings of the Workshop on Software Engineering for Answer Set Programming (SEA'07)</source>
          . (
          <year>2007</year>
          )
          <fpage>86</fpage>
          -
          <lpage>100</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Sureshkumar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vos</surname>
            ,
            <given-names>M.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brain</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fitch</surname>
            ,
            <given-names>J.: APE</given-names>
          </string-name>
          :
          <article-title>An AnsProlog* Environment</article-title>
          .
          <source>In: Proceedings of the Workshop on Software Engineering for Answer Set Programming (SEA'07)</source>
          . (
          <year>2007</year>
          )
          <fpage>101</fpage>
          -
          <lpage>115</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Brain</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Pu¨hrer, J.,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tompits</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Woltran</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>That is Illogical Captain! The Debugging Support Tool spock for Answer-Set Programs: System Description</article-title>
          .
          <source>In: Proceedings of the Workshop on Software Engineering for Answer Set Programming (SEA'07)</source>
          . (
          <year>2007</year>
          )
          <fpage>71</fpage>
          -
          <lpage>85</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Brain</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Vos</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>Debugging Logic Programs under the Answer Set Semantics</article-title>
          .
          <source>In: Proceedings ASP05 - Answer Set Programming: Advances in Theory and Implementation</source>
          , Bath, UK (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32.
          <string-name>
            <surname>El-Khatib</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pontelli</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Son</surname>
          </string-name>
          , T.C.
          <article-title>: Justification and debugging of answer set programs in ASP</article-title>
          .
          <source>In: Proceedings of the Sixth International Workshop on Automated Debugging</source>
          , California, USA, ACM (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          33.
          <string-name>
            <surname>Oetsch</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Pu¨hrer, J.,
          <string-name>
            <surname>Tompits</surname>
          </string-name>
          , H.:
          <article-title>Catching the ouroboros: On debugging non-ground answer-set programs</article-title>
          .
          <source>In: Proc. of the ICLP'10</source>
          . (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          34.
          <string-name>
            <surname>Brain</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Pu¨hrer, J.,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tompits</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Woltran</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Debugging asp programs by means of asp</article-title>
          .
          <source>In: LPNMR'07. LNCS 4483</source>
          , (
          <year>2007</year>
          )
          <fpage>31</fpage>
          -
          <lpage>43</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          35.
          <string-name>
            <surname>De Vos</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          , T., eds.: SEA'07:
          <article-title>Software Engineering for Answer Set Programming</article-title>
          .
          <source>In: . Volume</source>
          <volume>281</volume>
          .,
          <string-name>
            <surname>CEUR</surname>
          </string-name>
          (
          <year>2007</year>
          ) Online at http://CEUR-WS.org/Vol-
          <volume>281</volume>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          36.
          <string-name>
            <surname>De Vos</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          , T., eds.: SEA'09:
          <article-title>Software Engineering for Answer Set Programming</article-title>
          .
          <source>In: . Volume</source>
          <volume>546</volume>
          .,
          <string-name>
            <surname>CEUR</surname>
          </string-name>
          (
          <year>2009</year>
          ) Online at http://CEUR-WS.org/Vol-
          <volume>546</volume>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          37.
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gallucci</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schindlauer</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dell'Armi</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grasso</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
          </string-name>
          , N.:
          <article-title>OntoDLV: an ASP-based system for enterprise ontologies</article-title>
          .
          <source>Journal of Logic and Computation</source>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref38">
        <mixed-citation>
          38.
          <string-name>
            <surname>Febbraro</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reale</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>ASPIDE: Integrated Development Environment for Answer Set Programming</article-title>
          .
          <source>In: Logic Programming and Nonmonotonic Reasoning - 11th International Conference, LPNMR'11</source>
          , Vancouver, Canada,
          <year>2011</year>
          ,
          <source>Proceedings. LNCS 6645</source>
          , (May
          <year>2011</year>
          )
          <fpage>317</fpage>
          -
          <lpage>330</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref39">
        <mixed-citation>
          39.
          <string-name>
            <surname>Janhunen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , Niemela¨,
          <string-name>
            <given-names>I.</given-names>
            ,
            <surname>Oetsch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            , Pu¨ hrer, J.,
            <surname>Tompits</surname>
          </string-name>
          , H.:
          <article-title>On testing answer-set programs</article-title>
          .
          <source>In: Proceeding of the 2010 conference on ECAI 2010: 19th European Conference on Artificial Intelligence</source>
          , Amsterdam, The Netherlands,
          <article-title>The Netherlands</article-title>
          , IOS Press (
          <year>2010</year>
          )
          <fpage>951</fpage>
          -
          <lpage>956</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref40">
        <mixed-citation>40. JUnit.org community: JUnit, Resources for Test Driven Development http://www. junit.org/.</mixed-citation>
      </ref>
      <ref id="ref41">
        <mixed-citation>
          41.
          <string-name>
            <surname>Jack</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Software Testing for Conventional and Logic Programming</article-title>
          . Walter de Gruyter &amp; Co., Hawthorne, NJ, USA (
          <year>1996</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref42">
        <mixed-citation>
          42.
          <string-name>
            <surname>Wielemaker</surname>
          </string-name>
          , J.: Prolog Unit Tests http://www.swi-prolog.org/pldoc/ package/plunit.html.
        </mixed-citation>
      </ref>
      <ref id="ref43">
        <mixed-citation>
          43.
          <string-name>
            <surname>Cancinos</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Prolog Development</surname>
          </string-name>
          Tools - ProDT http://prodevtools. sourceforge.net.
        </mixed-citation>
      </ref>
      <ref id="ref44">
        <mixed-citation>
          44.
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The third answer set programming system competition (since 2011) https://www</article-title>
          .mat.unical.it/aspcomp2011/.
        </mixed-citation>
      </ref>
      <ref id="ref45">
        <mixed-citation>
          45.
          <string-name>
            <surname>Terracina</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lio</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Panetta</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Experimenting with recursive queries in database and logic programming systems</article-title>
          .
          <source>TPLP 8</source>
          (
          <year>2008</year>
          )
          <fpage>129</fpage>
          -
          <lpage>165</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref46">
        <mixed-citation>
          46.
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ielpa</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pietramala</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santoro</surname>
            ,
            <given-names>M.C.</given-names>
          </string-name>
          :
          <article-title>Answer Set Programming with Templates</article-title>
          .
          <source>In: ASP'03</source>
          ,
          <string-name>
            <surname>Messina</surname>
          </string-name>
          , Italy (
          <year>2003</year>
          )
          <fpage>239</fpage>
          -
          <lpage>252</lpage>
          Online at http://CEUR-WS.org/ Vol-
          <volume>78</volume>
          /.
        </mixed-citation>
      </ref>
      <ref id="ref47">
        <mixed-citation>
          47.
          <string-name>
            <surname>Calimeri</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Veltri</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>A Visual Tracer for DLV</article-title>
          .
          <source>In: Proc. of SEA'09</source>
          ,
          <string-name>
            <surname>Potsdam</surname>
          </string-name>
          , Germany (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref48">
        <mixed-citation>
          48.
          <string-name>
            <surname>Febbraro</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reale</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ricca</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>A Visual Interface for Drawing ASP Programs</article-title>
          .
          <source>In: Proc. of CILC2010</source>
          , Rende(CS),
          <source>Italy</source>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref49">
        <mixed-citation>
          49.
          <string-name>
            <surname>Sommerville</surname>
            ,
            <given-names>I.: Software</given-names>
          </string-name>
          <string-name>
            <surname>Engineering. Addison-Wesley</surname>
          </string-name>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref50">
        <mixed-citation>
          50.
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Turner</surname>
          </string-name>
          , H.:
          <article-title>Splitting a Logic Program</article-title>
          .
          <source>In: ICLP'94</source>
          , MIT Press (
          <year>1994</year>
          )
          <fpage>23</fpage>
          -
          <lpage>37</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref51">
        <mixed-citation>
          51.
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lukasiewicz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schindlauer</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tompits</surname>
          </string-name>
          , H.:
          <article-title>Combining answer set programming with description logics for the semantic web</article-title>
          .
          <source>Artif. Intell</source>
          .
          <volume>172</volume>
          (
          <year>2008</year>
          )
          <fpage>1495</fpage>
          -
          <lpage>1539</lpage>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>