<!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>Towards an answer set programming methodology for constructing programs following a semi-automatic approach</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Flavio Everardo</string-name>
          <email>flavio.everardo@cs.uni-potsdam.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mauricio Osorio</string-name>
          <email>osoriomauri@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universidad de las Americas Puebla</institution>
          ,
          <country country="MX">Mexico</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Potsdam</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <fpage>61</fpage>
      <lpage>72</lpage>
      <abstract>
        <p>Answer Set Programming (ASP) is a successful rule-based formalism for modeling and solving knowledge-intense combinatorial (optimization) problems. Despite its success in both academic and industry, open challenges like automatic source code optimization, and software engineering remains. This is because a problem encoded into an ASP might not have the desired solving performance compared to an equivalent representation. Motivated by these two challenges, this paper has three main contributions. First, we propose a developing process towards a methodology to implement ASP programs, being faithful to existing methods. Second, we present ASP encodings that serve as the basis from the developing process. Third, we demonstrate the use of ASP to reverse the standard solving process. That is, knowing answer sets in advance, and desired strong equivalent properties, “we” exhaustively reconstruct ASP programs if they exist, paving the road towards a benchmarking procedure of ASP programs.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The automatic generation of solutions for declaratively specified search-problems is one
of the most successful areas of artificial intelligence [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], where Answer Set Programming
(ASP; [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) highlights due to its full support on a compact representation of search
problems. ASP is a rule-based formalism for modeling and solving knowledge-intense
combinatorial (optimization) problems.
      </p>
      <p>ASP’s attractiveness consists of the combination of a declarative modeling language
with highly effective solving engines, allowing to specifying a given (search) problem
rather than programming the algorithm for solving it. In other words, given a search
problem, a programmer specifies the search space domain and problem-specific properties.
Combined, let an ASP solver propose solutions called answer sets.</p>
      <p>
        Currently, ASP is robust and mature enough, offering many important language
constructs like aggregation, (weak) constraints, different types of negations, and
optimization statements to mention a few, as well as high-performance solvers. An example
of a state-of-the-art and award-winning ASP solvers is clasp [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] demonstrating its
competitiveness and versatility, by winning first places at various solver contests since 2011
(eg. ASP, CASC, MISC, PB, and SAT competitions). 3
3 For more details of clasps trophies and tracks, see http://potassco.sourceforge.
      </p>
      <p>
        net/trophy.html.
clasp, combined with the grounder gringo [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], composes clingo [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], an ASP system
to ground and solve logic programs. For the reader interested in learning more about
ASP, including theoretical works, implementations, and applications, see [
        <xref ref-type="bibr" rid="ref4 ref6 ref7 ref9">9,7,4,6</xref>
        ].
      </p>
      <p>
        Despite the success of ASP in both academic and industry, 4 in areas like planning,
scheduling, configuration, design, and diagnosis (to mention a few), challenges like
automatic source code optimization, and software engineering remain open, where there
is a need to integrate software engineering methodologies and tools into ASP [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        To the best of our knowledge, [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] is the only approach describing a standard software
engineering process consisting of the development and the design of ASP programs in
an industrial context. Other works in ASP that have some relationship with software
engineering, concerns Inductive Logic Programming (ILP) [
        <xref ref-type="bibr" rid="ref11 ref12">11,12</xref>
        ], Procedural Content
Generation (PCG) [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], ASP Debbuggers [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] (including Meta-Programming [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]), and
an IDE for ASP called ASPIDE [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
      </p>
      <p>The need for automatic source code optimization, and software engineering tools and
methodologies into ASP come hand in hand. Inspired (among others) by circumstances
where a problem encoded into an ASP might not have the desired solving performance
compared to an equivalent representation.</p>
      <p>
        Motivated by these two challenges, this paper has three main contributions. First,
we propose a developing process towards a methodology to implement ASP programs,
being (as much as possible) faithful to the method proposed by [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Second, we present
ASP encodings that fall under the category of meta-programs [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] serving as the basis
from the developing process. Third, we demonstrate the use of ASP to reverse the
standard solving process. That is, knowing answer sets in advance, and desired strong
equivalent properties, exhaustively reconstruct ASP programs if they exist, following the
approaches from [
        <xref ref-type="bibr" rid="ref20 ref21">20,21</xref>
        ], paving the road towards a benchmarking procedure of ASP
programs, to find an optimal representation. Informally, strong equivalence (SE) means
that we can safely replace a piece of knowledge representation with another regardless of
the context. In other words, we can safely change code without modifying the semantics
of the program.
      </p>
      <p>To motivate this paper, let us set the context of the intended process, and let us
illustrate a running example using ASP as an overview to reverse the standard solving
process. For more fine-grained details including ASP codifications, we refer to Section 3.</p>
      <p>Example Let us asume to have a system called P rogramBuilder which its core
reiteratively calls clingo, and consists (among other features) in three stages. The first
stage takes the answer sets and possible strong equivalent properties as input and delivers
an intermediate representation. The second stage takes this intermediate representation
to construct a starting propositional formula. The third and last stage takes this formula
and proposes a new one strongly equivalent to the initial, according to the user needs.</p>
      <p>The system benefits from the declarative approach of ASP, having a series of
underlying programs comprises in a single one, called SP F that faithfully represents the entire
system workflow. To describe this workflow, let us consider a very simple example with
the intention to transmit our approach very clearly. Interested in finding a propositional</p>
    </sec>
    <sec id="sec-2">
      <title>4 An incomplete but vast list of ASP applications:</title>
      <p>https://www.dropbox.com/s/pe261e4qi6bcyyh/aspAppTable.pdf
formula of two variables p and q, such that it has fpg and fqg as unique answer sets, and
discarding the empty set and fp; qg.</p>
      <p>First Stage Departing from known answer sets as input, the system calls clingo
and let it guess for a formula that satisfies the previous conditions. However, with
these conditions, clingo finds over 300 different intermiediate representations (potential
formulas) that satisfies the given input.</p>
      <p>As mentioned before, the user can benefit from SE properties to delimit more the
search. This means the user can straightforwardly specify in SP F the desired properties
to satisfy. For example, the user can ask for a representation that satisfies commutativity,
associativity, and identity. Calling again SP F coupled with the user-given properties,
clingo encounters four intermediate representations.</p>
      <p>Let us mention that these intermediate representations consist of a 3x3 matrix based
on the 3-valued logic of G3. Now suppose we have two users, the first one, decides
to refine more the search by adding another property, for example idempotency. Now
clingo yields a single matrix, allowing the user to move to the second stage. The second
user instead, asks P rogramBuilder to take two matrices M1 and M2 from the four
remaining, postponing the decision, and moving also to the second stage.</p>
      <p>Second Stage If the user has more than one matrix, he or she could enter into a
dialog process until one solution is selected. However, the user could also keep the
matrices and continue the workflow.</p>
      <p>
        Suppose the user has two matrices M1 and M2, he or she wants to decide for one
of them. To be more specific, let M1 and M2 be the matrices from tables 1a, and 1b
respectively. We can see that both truth tables 1a, and 1b differ in a single value when
both inputs are 1. 5 As mentioned before, these intermediate representations serve
0 1 2
0 0 1 2
1 1 1 2
2 2 2 2
to construct initial propositional formulas. P rogramBuilder takes each matrix and
constructs its corresponding formula. Let us state that each formula is a disjunction of
clauses, where each clause corresponds to the interpretations where the result equals to
2, and let the function F be responsible for the construction of the following formulas:
F1 = F (M1) = (p ^ :q) _ (q ^ :p) _ (p ^ ::q) _ (q ^ ::p) _ (p ^ q)
F2 = F (M2) = (p ^ :q) _ (q ^ :p) _ (p ^ ::q) _ (q ^ ::p) _ (p ^ q) _ (::p ^ ::q)
P rogramBuilder can warn the user, that if you add another program Q, consisting
of the rules (p :q) ^ (q :p) to both formulas F1 and F2, then, AS(F1 ^ Q) =
5 We present the tables for the reader and the sake of clarity. However, they could be irrelevant
for the user. For the interested reader, the semantics of G3 can be found in [
        <xref ref-type="bibr" rid="ref34">34</xref>
        ].
ffpg; fqgg, while AS(F2 ^ Q) = f g. In other words, for the first case, we have the
single answer set fp; qg, and for the second case, there are no answer sets (unsatisfiable).
This means, that F1 and F2 are not strongly equivalent. It is relevant to mention that it is
up to the user to pick one of them or to continue to the third stage.
      </p>
      <p>Third Stage The system takes each formula and proposes a new strongly equivalent
alternative. P rogramBuilder is equiped with an algebra of logical transformations
(respecting SE), that can translate F1 into a given normal-form. For this case, F1 is
translated into to the logical disjunction p _ q. With the example above, we propose a first
step methodology with the possibility to implement it into an interactive software that
construct ASP programs through defined properties. As mentioned above, this software
could include transformation modules to visualize the constructed programs in multiple
forms. We present this toy example on purpose to make it easy to follow. Nevertheless,
this example inspires the conception of a more general framework.</p>
      <p>The remainder of the paper is structured as follows: Section 2 informally introduces
ASP, followed by the formal definition of strong equivalence. Then, we focus on the
introduction of non-standard concepts needed in this paper, like the approach to construct
formulas from an interpretation in the 3-valued logic of G3. We also mention the
straightforward relationship with the logic of of Here-and-There (HT ). We close this
section with the best practices for designing and developing ASP programs. Section 3
describes our methodology by complementing the running example, illustrating with
more complex examples as well as ASP programs. Finally, we discuss the conclusions
of the paper, and direct future work in Section 4.
2</p>
      <sec id="sec-2-1">
        <title>Background</title>
        <p>
          In this section, we present theoretical and practical aspects that would be of interests in
our proposed approach such as formal definition of strong equivalence, the formalities
to construct propositional formulas using Go¨del’s 3-valued logic (G3) [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ], and its
relationship with the logic of Here-and-There (HT ) [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ], among others. Lastly, we
recapitulate the design and development process of ASP programs from [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
2.1
        </p>
        <sec id="sec-2-1-1">
          <title>Strong Equivalence</title>
          <p>
            The term Strong Equivalence [
            <xref ref-type="bibr" rid="ref17">17</xref>
            ], concerning ASP programs, means that, having two
programs (formulas) F1 and F2, F1 is strongly equivalent to F2 if F1 is equivalent to F2
in the Go¨del’s 3-valued logic (G3), which is equivalent to the logic of Here-and-There
(HT ). Also, via the reduct [
            <xref ref-type="bibr" rid="ref27">27</xref>
            ], F1 is strongly equivalent to F2 if for each set X of
atoms both reducts F1X and F2X are equivalent in classical logic [
            <xref ref-type="bibr" rid="ref18 ref19">18,19</xref>
            ]. It is relevant to
remark the importance of Strong Equivalence into a software engineering perspective,
which not only F1 and F2 comprise the same answer sets (meaning F1 F2) but, we
can extend both formulas with another one R such that F1 [ R and F2 [ R yield the
same answer sets (represented by F1 SE F2).
2.2
          </p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Constructing formulas from an interpretation in G3 or HT</title>
          <p>
            For software engineering purposes, it is possible to construct propositional formulas
(hence, ASP programs) from an interpretation in HT [
            <xref ref-type="bibr" rid="ref20 ref21">20,21</xref>
            ]. Yet, it is also possible to
use G3 logic, which it is equivalent to HT , and the relationship is straightforward. 6
          </p>
          <p>
            For the G3 values 0, 1, and 2, 0 equals ? or false There, 1 equals false Here but
true There, and 2 equals &gt; or true Here. Therefore, considering that both logics G3
and HT are equivalent, we keep G3 for the remainder of the paper. That is, given a
G3-interpretation I (as shown in Tables 1a and 1b), we apply the following specification
or clause C from [
            <xref ref-type="bibr" rid="ref21">21</xref>
            ]. 7 To create a clause, we apply the formula below whenever an
interpretation equals to 2. A more detailed example is shown in Table 2 from Section 3.
          </p>
          <p>!
^ v ^
I(v)=2</p>
          <p>^
I(w)=0</p>
          <p>!
:w
^</p>
          <p>^
I(x)=1</p>
          <p>!
::x
^</p>
          <p>^
I(y);I(z)=1;y6=z</p>
          <p>!
(y ! z)
(1)</p>
          <p>
            Then, to construct the propositional formula, we need to apply disjunctions over the
resulting clauses, as shown in F1 from the running example. Lastly, the formula can
be simplified according to (but not necessarily all) [
            <xref ref-type="bibr" rid="ref27 ref30 ref31">27,30,31</xref>
            ] Taking back the running
example, the formula F1 is reduced to the disjunction p _ q _ (p ^ q), that is strongly
equivalent to the constructed formula p _ q. 8
          </p>
          <p>
            On the other hand, we can apply the same procedure to find a counter-example
for two programs P1 and P2 such that P1 P2 (yield the same answer sets), but
instead of applying disjunctions over the resultant clauses, we conjunct them [
            <xref ref-type="bibr" rid="ref26">26</xref>
            ]. This
counter-example serves to prove if both programs are strong equivalent, meaning that
P1 SE P2 as shown in the previous section.
2.3
          </p>
        </sec>
        <sec id="sec-2-1-3">
          <title>Software Engineering</title>
          <p>
            The work from [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ] proposes a six steps methodology for the development of ASP
programs, following the project management (PM) standard ISO 21500:2012, also
coordinated with the principles behind the life cycles development from the Project
Management Body of Knowledge (PMBOK) [
            <xref ref-type="bibr" rid="ref22">22</xref>
            ]. We recapitulate the six areas and let
us point out the intersection with the aforemention stages from our methodology.
1. Identify the needs Find opportunities where ASP is stronger than conventional
methods. Define and document the application requirements properly (first stage).
2. Design a valid specification of the problem Implement an ASP specification of
the core problem with small instances for testing. Take advantages of ASP which
allows interactive problem refinement and tuning (second stage with support from
the first stage).
6 We only mention the needed concepts from the logics of G3 and HT . For more information,
we may refer the reader to [
            <xref ref-type="bibr" rid="ref28 ref29">28,29</xref>
            ].
7 The original formula is in the context of HT . To be consistent, we adapted for the G3.
8 For more details about the simplification, we refer to [
            <xref ref-type="bibr" rid="ref21">21</xref>
            ].
3. Performance engineering Explore alternatives of ASP program implementations
(as shown in the third stage with the support of the other two stages), and evaluate
their performance considering “real-world” size instances. 9 For a prototyping
process, like our methodology, we focus more on readability rather than performance.
4. Integrate into the existing environment Choose the best ASP program alternative
from the feasibility study and implement a clean ASP program which processes the
transformed data. Evaluate if is possible to use incremental solving, and consider
the manipulation of answer sets. Design interfaces and implement a complete and
efficient transformation from legacy input data to ASP and back. It is now possible
to integrate ASP solvers like clingo, into legacy systems in a more natural way due
to a complete API in languages like Python or C++.
5. Testing and debugging Ensure high-quality via automated tests, and debugging of
          </p>
          <p>
            ASP programs if applicable. For instance, ASP Debbuggers like [
            <xref ref-type="bibr" rid="ref14 ref15">14,15</xref>
            ].
6. Maintenance Focus on a well-defined structure of the program, and benefit from
ASP’s modularity for further adaptions.
          </p>
          <p>
            Also, [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ] stated that in this development process, they consider knowledge base
design and performance engineering as the most important and most different steps from
conventional software engineering. Our method falls in these two steps, particularly,
covering the first three, letting glimpse opportunities to develop the last three steps.
          </p>
          <p>
            Furthermore, in [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ], they use an Object-Oriented approach (OO) into ASP called
OOASP, which allows analyzing OO software models and their instances employing ASP.
The OOASP approach has been successfully implemented in Siemens, as an extension
to any OO modeling environment. It has been evaluated together with Siemens internal
tools. This modeling approach is currently out of the scope of this paper, but it will be
considered for future work development.
3
          </p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>Methodology and Approaches</title>
        <p>This section describes and exemplifies our methodology, delving more into the underlying
ASP encodings. That is, we retake our running example, and decompose the three stages
with more complex examples. Let us motivate again with the definition of the problem.</p>
        <p>Problem definition. Given (an incomplete set of) answer sets, and possible strong
equivalent properties as input, search and construct a single or several propositional
formulas, hence, an ASP program satisfying these conditions. To do so, we follow the
standard guess-and-check paradigm of ASP where solution candidates are tested for
feasibility with the possibility of yielding none, one, or multiple answer sets. Typically,
these answer sets serve as the solutions of an encoded program, but for our purposes,
they are interpretations in G3 which allow us to construct formulas.</p>
        <p>Before delving into the three stages, let us explain that we have two types of answer
sets (due to our meta-programming approach), the answer sets given as input, and
the answer sets as intermediate representations. From now on, we easily differentiate
9 Particularly, for the third area, we only focus on the exploration of ASP program alternatives and
their implementations. Their performance evaluation concerning “real-world” size instances, is
left for future work.
them as answer set(s)input and answer set(s)output respectively, and we use them
interchangeably.</p>
        <p>Our implementation of the core problem into ASP follows the common practices of
ASP, by separately provide an instance and an encoding. As stated above in the definition
of the problem, the instance corresponds to answer setsinput and strong equivalent
properties. On the other hand, the encoding consists of means to prove the existence or
the lack of a propositional formula. Before addressing the three stages, let us illustrate
our workflow with another example. Originally, a motivation behind this work was
the question about the existence of an interpretation, that satisfies the four essential
properties from the exclusive disjunction (XOR).</p>
        <p>Let us request a propositional formula, keeping the same variables p and q, and the
same unique answer setsinput fpg and fqg, while discarding again the empty set and
fp; qg. We represent each input answer set with the atom answer set having a string
value as its argument, as shown in Listing 1.1.</p>
        <p>1 :- not answer_set("p").
2 :- not answer_set("q").
3 :- answer_set("").
4 :- answer_set("p q").</p>
        <p>Listing 1.1: Answer sets as part of the instance (answer sets.lp).</p>
        <p>Since the requirements are clear beforehand, and as part of the first stage, we can
represent the four essential properties from the classical logic XOR as part of our input,
where two of them are commutativity and associativity. The other two properties are self
inverse, meaning that any input XORed with itself is false, and identity, where an input
XORed by false, yields the double negation of the entry. 10 To see these properties in the
context of an instance, we refer to Listing 1.2.</p>
        <p>1 %% Commutativity : X xor Y = Y xor X
2 :- op(X,Y,R1), op(Y,X,R2), R1!=R2.
4 %% Associativity : (X xor Y) xor Z = X xor (Y xor Z)
5 left(X,Y,Z,R) :- op(X,Y,W1), op(W1,Z,R). %% Left
6 right(X,Y,Z,R) :- op(Y,Z,W1), op(X,W1,R). %% Right
7 :- left(X,Y,Z,R1), right(X,Y,Z,R2), R1 != R2.
9 %% Self Inverse : X xor X = 0
10 :- op(X,X,R), R!=0.
12 %% Identity : X xor 0 = not not X
13 :- op(X,0,Y), neg(X,X1), neg(X1,Z), value(Y), Y != Z.
Listing 1.2: Essential SE properties of the classical XOR operator
(xor strong.lp).</p>
        <p>From the code above, we represent each property as an integrity constraint, where
the atom op(X,Y,R) corresponds to the desired operator of two arguments (variables)
X and Y and its result R. Let us allow to get ahead, and mention that this atom is part
10 By letting us expressing that a variable p XORed with a false constant as p
This is represented in ASP as a constraint of the form: :- not p.</p>
        <p>?, equals ::p.
of the answer setsoutput or intermediate representation. Before we move to the second
stage, we describe the encodings that yield the intermediate representations.</p>
        <p>The encoding consists of four parts, the guessing of the intermediate representation,
the definition of the logical operators, the theory completion, and G3 persistency
properties. Let us start with the intermediate representation guessing, which is no other than a
choice rule with both boundaries set to one, asking for an operator op(X,Y,R), from
any to values X and Y , resulting in R (Listing 1.3).</p>
        <p>1</p>
        <p>1 { op(X,Y,Z) : value(Z) } 1 :- value(X), value(Y).</p>
        <p>Listing 1.3: Guess formula via an interpretation in G3 (guess formula.lp).</p>
        <p>The second part is the definition of the logical operators in G3, shown in Listing 1.4.
1 value(0..2). %% G3 values
3 and(X,X,X) :- value(X).
4 and(X,Y,X) :- value(X), value(Y), X&lt;Y.
5 and(X,Y,Y) :- value(X), value(Y), Y&lt;X.
7 or(X,X,X) :- value(X).
8 or(X,Y,X) :- value(X), value(Y), Y&lt;X.
9 or(X,Y,Y) :- value(X), value(Y), X&lt;Y.
11 neg(0,2). neg(2,0). neg(1,0).
13 implication(X,Y,2) :- value(X), value(Y), X &lt;= Y.
14 implication(X,Y,Y) :- value(X), value(Y), X &gt; Y.</p>
        <p>Listing 1.4: G3 values and logical operators (logical operators.lp).</p>
        <p>This encoding consisting of the operators and, or, negation, and implication, serves
twofold. It works for the generation of intermediate representations or to compute
the answer sets if given an initial formula. 11 To find intermediate representations
(answer setsouput), we need to characterize them in terms of what we call a theory
completion, as shown in Listing 1.5. 12
1 completion(0,X,Y,R):- neg(X,X1), neg(Y ,Y1), and(X1,Y1,R).
2 completion(1,X,Y,R):- neg(X,X1), neg(X1,X2), neg(Y,Y1),
and(X2,Y1,R).
3 completion(2,X,Y,R):- neg(Y,Y1), neg(Y1,Y2), neg(X,X1),
and(X1,Y2,R).
4 completion(3,X,Y,R):- neg(Y,Y1), neg(Y1,Y2), neg(X,X1),
neg(X1,X2), and(X2,Y2,R).
6 belongs(1,p). belongs(2,q). belongs(3,p). belongs(3,q).
8 code(0,""). code(1,"p"). code(2,"q"). code(3,"p q").
11 We discuss this point at the end of the section.
12 For the sake of clarity, we fix this encoding concerning the exemplary signature fp; qg. However,
it is possible to generate this encoding for a given signature.
10 completion_asp(A_ID,X,Y,R) :- op(X,Y,Z), completion(A_ID,X
,Y,C), and(Z,C,R).
12 consistent(A_ID):-completion_asp(A_ID,X,Y,R),value(R),R&gt;0.
13 incomplete(A_ID):-belongs(A_ID,p), completion_asp(A_ID,X,Y
,Z), implication(Z,X,R), R&lt;2.
14 incomplete(A_ID):-belongs(A_ID,q), completion_asp(A_ID,X,Y
,Z), implication(Z,Y,R), R&lt;2.
16 answer_set(S) :- consistent(A_ID), not incomplete(A_ID),
code(A_ID,S).</p>
        <p>Listing 1.5: Theory completion for answer sets (theory completion.lp).</p>
        <p>Describing an overview of the main function of this code, the first four rules from
Listing 1.5, captures the completions needed for all possible answer sets (related to
answer setinput) concerning our inputs p and q. Then, the facts in line 6, display the
correspondence between the constants p and q with all the possible answer sets, followed
by (facts) mappings into string representations in line 8. Line 10 forms the completion
concerning the operator. Then, the completion must be consistent (line 12), and we define
what incompleteness is (lines 13 and 14). Lastly, line 16, derives the corresponding
answer sets in string representation via their correlated code. These answer sets must
satisfy consistency and completeness, as well as the answer setsinput (Listing 1.1).</p>
        <p>
          Finally, we need to guarantee G3 persistence properties [
          <xref ref-type="bibr" rid="ref21 ref25">25,21</xref>
          ]. They are displayed
in Listing 1.6. Here, line 1 states that it is not possible that in case there exist an
interpretation 1,0,2, then exist another intepretation with inputs 2 and 0, that evaluates
to any other value different than 2. Line 2 describes the commutated property, and line
3 states that, is not possible that an interpretation resulting in 1, comes from inputs
different than 1.
        </p>
        <p>1 :- op(1,0,2), op(2,0,X), X != 2.
2 :- op(0,1,2), op(0,2,X), X != 2.
3 :- op(X,Y,1), X != 1, Y != 1.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Listing 1.6: G3 persistence (g3 persistence.lp).</title>
      <p>Solving both, the instance, and the encoding produces the intermediate
representations to move to the second stage. However, for this particular example, there are no
answer setsoutput. This means it is not possible to represent an XOR operator as a
function of two arguments in ASP, that aside, satisfy all four properties. Despite the
negative solution where there is no formula to construct, it is positive in the sense that
this methodology can save time, money, and resources. Also, this fits perfectly into
iterative software engineering methodologies, taking the user back to the initial or design
stage, wondering about the requirements.</p>
      <p>
        On the other hand, and following our XOR motivation, we also question ourselves if
we can find a formula that semantically behaves as a parity constraint as the ones used
in xorro [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ]. That is, we are searching for a constraint formula that discards candidate
answer sets from an independent generation process. 13 We affirmatively answer this
13 The generation process for every variable x is represented as x _ :x.
question, and this comes after an exhaustive search. In other words, we ask clingo for
all possible intermediate representations, and clingo found a single answer setoutput.
This means that there is only one possibility to represent an XOR as a constraint in
ASP satisfying the aforementioned properties. By these means, we can confirm that the
founded formula semantically behaves as the parity constraints used in xorro.
op(0,0,0), op(0,1,2), op(0,2,2)
op(1,0,2), op(1,1,0), op(1,2,0)
op(2,0,2), op(2,1,0), op(2,2,0)
      </p>
    </sec>
    <sec id="sec-4">
      <title>With this intermediate representation (2) as a</title>
      <p>matrix of the form of M1 or M2 (from the running
example), we can move to the second stage.</p>
      <p>For this example, we do not have more than
one representation, so we do not have anything
else to compare. Hence, the constructed formula,
namely Fxor gives the following clauses (2),
taking the specification shown in 1. This results in the
initial propositional formula:
Fxor = (:p ^ ::q) _ (:p ^ q) _ (::p ^ :q) _ (p ^ :q)</p>
      <p>Lastly, the third stage proposes a transformation for Fxor. For instance, a resulting
formula could be (::p _ ::q) ^ (:p _ :q). Nevertheless, it is possible to reverse the
presented method by given a propositional formula and let clingo search for the answer
sets. For example, let our instance be the same Fxor formula using the logical operators
from Listing 1.4, as:
op(X,Y,Z2) :- or(X,Y,R1), neg(X,X1), neg(Y,Y1), or(X1,Y1,R2),
and(R1,R2,Z), neg(Z,Z1), neg(Z1,Z2).</p>
      <p>This formula replaces the code from Listings 1.1, and 1.3, and reuse the
aforementioned encoding, logical operators (Listings 1.4), theory completion (Listings 1.5), and
G3 persistency properties (Listings 1.6). Therefore, generating candidate answer sets
over p and q, Fxor discards the empty set and fp; qg.</p>
      <p>Finally, it is worth mentioning that currently, we have an initial and very basic
implementation using Python and clingo. For more details, go to
https://github.com/flavioeverardo/Propositional-Formula-Builder-PFB.
4</p>
      <sec id="sec-4-1">
        <title>Discussion</title>
        <p>Motivated by the need for automatic source code optimization, and the inclusion of
software engineering into ASP, we presented a preliminary developing process towards a
methodology to implement ASP programs, following existing methods. We captured this
developing process into an initial prototype consisting of ASP encodings, that reverses
the standard solving workflow towards an exhaustive search for propositional formulas,
all within ASP. The resultant formula(s) must satisfy strong equivalent properties as well
as known answer sets.</p>
        <p>
          For future work, there is too much to do. First of all, we plan to continue the
development of a fully-integrated software concerning the proposed methodology, including
the tools for reconstructing more complex formulas. This initial prototype uses ASP
in its whole, as it is conceived thanks to high-level interfaces, sophisticated algorithms
for grounding and solving, including search heuristics and learning techniques based
on nogoods, among others. Hence, this initiative constructs propositional formulas.
However, it is far from fully equipped software. One possible extension could be the
construction of not only propositional formulas, but non-ground ASP programs. That
is, including variables. Then, we could benefit from tools like anthem [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ] to verifying
Strong Equivalence of ASP programs in the input language of gringo.
        </p>
        <p>
          In terms of software engineering, both our method and the prototype could benefit
from several other techniques from the ASP community, fitting perfectly with the
uncovered steps (4,5, and 6) from [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] as well as into the OOASP approach. Some of
these techniques, includes Inductive Logic Programming, debugging, Graphical User
Interfaces encouraged by ASPIDE, to name a few.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Woltran</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Answer set programming unleashed!</article-title>
          .
          <source>KI-Ku¨nstliche Intelligenz</source>
          ,
          <volume>32</volume>
          (
          <issue>2-3</issue>
          ),
          <fpage>105</fpage>
          -
          <lpage>108</lpage>
          , (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Lifschitz</surname>
          </string-name>
          , V.:
          <article-title>Answer set planning</article-title>
          .
          <source>In International Conference on Logic Programming and Nonmonotonic Reasoning</source>
          . pp.
          <fpage>373</fpage>
          -
          <lpage>374</lpage>
          . Springer, Berlin, Heidelberg (
          <year>1999</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaufmann</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          , T.:
          <article-title>Conflict-driven answer set solving: From theory to practice</article-title>
          .
          <source>Artificial Intelligence</source>
          ,
          <volume>187</volume>
          ,
          <fpage>52</fpage>
          -
          <lpage>89</lpage>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Kaufmann,
          <string-name>
            <given-names>B.</given-names>
            , and
            <surname>Schaub</surname>
          </string-name>
          , T.:
          <article-title>Answer set solving in practice</article-title>
          .
          <source>Synthesis lectures on artificial intelligence and machine learning</source>
          ,
          <volume>6</volume>
          (
          <issue>3</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>238</lpage>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Ko¨nig, A., and
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          , T.:
          <article-title>Advances in gringo series 3</article-title>
          .
          <source>In International Conference on Logic Programming and Nonmonotonic Reasoning</source>
          (pp.
          <fpage>345</fpage>
          -
          <lpage>351</lpage>
          ). Springer, Berlin, Heidelberg (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Kaufmann,
          <string-name>
            <given-names>B.</given-names>
            , and
            <surname>Schaub</surname>
          </string-name>
          , T.:
          <article-title>Clingo = ASP + Control: Preliminary Report</article-title>
          . CoRR, abs/1405.3694 (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Kaufmann,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Ostrowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            , and
            <surname>Wanko</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>Theory solving made easy with clingo 5</article-title>
          .
          <source>In Technical Communications of the 32nd International Conference on Logic Programming (ICLP</source>
          <year>2016</year>
          ).
          <article-title>Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (</article-title>
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          , T.:
          <article-title>Complex optimization in answer set programming</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          ,
          <volume>11</volume>
          (
          <issue>4-5</issue>
          ),
          <fpage>821</fpage>
          -
          <lpage>839</lpage>
          (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Wanko</surname>
            ,
            <given-names>P.:</given-names>
          </string-name>
          <article-title>A tutorial on hybrid answer set solving with clingo</article-title>
          .
          <source>In Reasoning Web International Summer School</source>
          (pp.
          <fpage>167</fpage>
          -
          <lpage>203</lpage>
          ). Springer, Cham (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Falkner</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Friedrich</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schekotihin</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taupe</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Teppan</surname>
            ,
            <given-names>E. C.</given-names>
          </string-name>
          :
          <article-title>Industrial applications of answer set programming</article-title>
          .
          <source>KI-Ku¨nstliche Intelligenz</source>
          ,
          <volume>32</volume>
          (
          <issue>2-3</issue>
          ),
          <fpage>165</fpage>
          -
          <lpage>176</lpage>
          , (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Corapi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Russo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Lupu</surname>
          </string-name>
          , E.:
          <article-title>Inductive logic programming in answer set programming</article-title>
          .
          <source>In International Conference on Inductive Logic Programming</source>
          (pp.
          <fpage>91</fpage>
          -
          <lpage>97</lpage>
          ). Springer, Berlin, Heidelberg (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Law</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Russo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Broda</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Inductive learning of answer set programs</article-title>
          .
          <source>In European Workshop on Logics in Artificial Intelligence</source>
          (pp.
          <fpage>311</fpage>
          -
          <lpage>325</lpage>
          ). Springer, Cham (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Smith</surname>
            ,
            <given-names>A. M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Mateas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Answer set programming for procedural content generation: A design space approach</article-title>
          .
          <source>IEEE Transactions on Computational Intelligence and AI</source>
          in Games,
          <volume>3</volume>
          (
          <issue>3</issue>
          ),
          <fpage>187</fpage>
          -
          <lpage>200</lpage>
          (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Brain</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and De Vos,
          <string-name>
            <surname>M.:</surname>
          </string-name>
          <article-title>Debugging Logic Programs under the Answer Set Semantics</article-title>
          .
          <source>In Answer Set Programming</source>
          (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Gebser</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , P u¨hrer, J.,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Tompits</surname>
          </string-name>
          , H.:
          <article-title>A meta-programming technique for debugging answer-set programs</article-title>
          .
          <source>In AAAI (Vol. 8</source>
          , pp.
          <fpage>448</fpage>
          -
          <lpage>453</lpage>
          ) (
          <year>2008</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Febbraro</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reale</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , and
          <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 International Conference on Logic Programming and Nonmonotonic Reasoning</source>
          (pp.
          <fpage>317</fpage>
          -
          <lpage>330</lpage>
          ). Springer, Berlin, Heidelberg (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pearce</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Valverde</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Strongly equivalent logic programs</article-title>
          .
          <source>ACM Transactions on Computational Logic (TOCL)</source>
          ,
          <volume>2</volume>
          (
          <issue>4</issue>
          ),
          <fpage>526</fpage>
          -
          <lpage>541</lpage>
          , (
          <year>2001</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Turner</surname>
          </string-name>
          , H.:
          <article-title>Strong equivalence made easy: nested expressions and weight constraints</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          ,
          <volume>3</volume>
          (
          <issue>4</issue>
          + 5),
          <fpage>609</fpage>
          -
          <lpage>622</lpage>
          (
          <year>2003</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Ferraris</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Answer Sets for Propositional Theories</article-title>
          . In: Baral,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Greco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Leone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Terracina</surname>
          </string-name>
          ,
          <string-name>
            <surname>G</surname>
          </string-name>
          . (eds.)
          <source>Proceedings of the Eighth International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'05). Lecture Notes in Artificial Intelligence</source>
          , vol.
          <volume>3662</volume>
          , pp.
          <fpage>119</fpage>
          -
          <lpage>131</lpage>
          . Springer-Verlag (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Cabalar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Ferraris</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Propositional theories are strongly equivalent to logic programs</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          ,
          <volume>7</volume>
          (
          <issue>6</issue>
          ),
          <fpage>745</fpage>
          -
          <lpage>759</lpage>
          (
          <year>2007</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Aguado</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabalar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fandinno</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pearce</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , Pe´rez, G., and
          <string-name>
            <surname>Vidal</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Forgetting auxiliary atoms in forks</article-title>
          .
          <source>Artificial Intelligence</source>
          ,
          <volume>275</volume>
          ,
          <fpage>575</fpage>
          -
          <lpage>601</lpage>
          , (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22. Project Management Institute.
          <article-title>: A Guide to the Project Management Body of Knowledge (PMBOK Guide)</article-title>
          -Sixth
          <string-name>
            <surname>Edition</surname>
          </string-name>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Heyting</surname>
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Die formalen Regeln der intuitionistischen Logik, Sitz</article-title>
          . Berlin 42-
          <fpage>56</fpage>
          (
          <year>1930</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24. Go¨del,
          <string-name>
            <surname>K</surname>
          </string-name>
          ,: Zum intuitionistischen Aussagenkalku¨l,
          <source>Anzeiger der Akademie der Wissenschaften in Wien</source>
          <volume>69</volume>
          <fpage>65</fpage>
          -
          <lpage>66</lpage>
          ;
          <article-title>reprinted in em Kurt Go¨del, Collected Works</article-title>
          , Volume
          <volume>1</volume>
          ,
          <string-name>
            <surname>OUP</surname>
          </string-name>
          , (
          <year>1986</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Osorio</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Navarro</surname>
            ,
            <given-names>J. A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Arrazola</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>Equivalence in answer set programming</article-title>
          .
          <source>In International Workshop on Logic-Based Program Synthesis and Transformation</source>
          (pp.
          <fpage>57</fpage>
          -
          <lpage>75</lpage>
          ). Springer, Berlin, Heidelberg (
          <year>2001</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Osorio</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Navarro</surname>
            ,
            <given-names>J. A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Arrazola</surname>
          </string-name>
          , J.:
          <article-title>Applications of intuitionistic logic in answer set programming</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          ,
          <volume>4</volume>
          (
          <issue>3</issue>
          ),
          <fpage>325</fpage>
          -
          <lpage>354</lpage>
          (
          <year>2004</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Osorio</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Navarro</surname>
            ,
            <given-names>J. A.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Arrazola</surname>
          </string-name>
          , J.:
          <article-title>Safe beliefs for propositional theories</article-title>
          .
          <source>Annals of Pure and Applied Logic</source>
          ,
          <volume>134</volume>
          (
          <issue>1</issue>
          ),
          <fpage>63</fpage>
          -
          <lpage>82</lpage>
          (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Pearce</surname>
            ,
            <given-names>D.:</given-names>
          </string-name>
          <article-title>A new logical characterisation of stable models and answer sets</article-title>
          .
          <source>In International Workshop on Non-monotonic Extensions of Logic Programming</source>
          (pp.
          <fpage>57</fpage>
          -
          <lpage>70</lpage>
          ). Springer, Berlin, Heidelberg (
          <year>1996</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Navarro</surname>
            ,
            <given-names>J. A.</given-names>
          </string-name>
          :
          <article-title>Answer Sets through G3 Logic</article-title>
          . In ESSLLI Student Session p.
          <volume>181</volume>
          (
          <year>2002</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Cabalar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pearce</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Valverde</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Reducing propositional theories in equilibrium logic to logic programs</article-title>
          .
          <source>In Portuguese Conference on Artificial Intelligence</source>
          (pp.
          <fpage>4</fpage>
          -
          <lpage>17</lpage>
          ). Springer, Berlin, Heidelberg (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Cabalar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pearce</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Valverde</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Minimal logic programs</article-title>
          .
          <source>In International Conference on Logic Programming</source>
          (pp.
          <fpage>104</fpage>
          -
          <lpage>118</lpage>
          ). Springer, Berlin, Heidelberg (
          <year>2007</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32.
          <string-name>
            <surname>Everardo</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Janhunen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schaub</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>The return of xorro</article-title>
          . In:
          <string-name>
            <surname>Balduccini</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lierler</surname>
            <given-names>Y.</given-names>
          </string-name>
          , and Woltran S. (eds.)
          <source>Proceedings of the Fifteenth International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'19). Lecture Notes in Artificial Intelligence</source>
          , vol.
          <volume>11481</volume>
          , pp.
          <fpage>284</fpage>
          -
          <lpage>297</lpage>
          . Springer-Verlag (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          33.
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , Lu¨hne, P., and
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          , T.:
          <article-title>Verifying Strong Equivalence of Programs in the Input Language of gringo</article-title>
          .
          <source>In International Conference on Logic Programming and Nonmonotonic Reasoning</source>
          (pp.
          <fpage>270</fpage>
          -
          <lpage>283</lpage>
          ). Springer, Cham (
          <year>2019</year>
          ) .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          34.
          <string-name>
            <surname>Ultlog</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Calculi for the Go¨del Logic (</article-title>
          <year>2001</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>