<!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 Distributed Computation of Answer Sets?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Marco De Bortoli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Federico Igne</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabio Tardivo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pietro Totis</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Agostino Dovier</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Enrico Pontelli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dept DMIF, University of Udine</institution>
          ,
          <addr-line>Udine</addr-line>
          ,
          <country country="IT">Italy</country>
          <addr-line>Dept CS</addr-line>
          ,
          <institution>New Mexico State University</institution>
          ,
          <addr-line>Las Cruces, NM</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Answer Set Programming (ASP) is a logic programming language widely used in non monotonic automated reasoning. Thanks to its popularity, in the last years there has been a great interest towards the developing of e cient solvers, required to deal with complex problems, like planning and NP problem solving. These solvers can be unable to deal with programs that are \grounded" on huge amount of data, possibly resident in di erent sites. To address this problem, in this paper we present a distributed approach to ASP problems, which involves all the phases of the overall solving process: from a distributed grounder (which can also be used as a solver for strati ed programs) to two different techniques to deal with the pure solving phase (for non-strati ed program too), both of them using the non-standard graph coloring algorithm to characterize answer sets. We show three proposals for solving the issue, two of them developed with the high-level framework Apache Spark, while the the third one is a C++ direct implementation of the rst one.</p>
      </abstract>
      <kwd-group>
        <kwd>Logic programming</kwd>
        <kwd>ASP solving</kwd>
        <kwd>Distributed computation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The Answer Set Programming (ASP) language has become very popular in the
last years thanks to the availability of more and more e cient solvers (e.g.,
Clingo [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and DLV [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]). It is based on the stable model semantics from
Gelfond and Lifschitz [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], introduced to resemble the human reasoning process;
together with its simple syntax, this make ASP a very intuitive language to be
used. Like most logic languages, ASP solving process is split into two phases:
the grounding, namely the transformation of the normal program in a so-called
ground program, which is the equivalent propositional logic program where each
rule is instantiated over the domain of its variables. The second phase
consists in the real solving process, which alternates non deterministic guesses and
? The work is partially supported by the Uniud PRID ENCASE, by GNCS-INdAM,
by two grants from University of Udine for \Tesi all'estero" and by Graz University
of Technology.
deterministic propagation to nd the solutions, starting from the ground
program. As described, e.g., in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], ASP has some important weakness when dealing
with real world complex problems, like planning [
        <xref ref-type="bibr" rid="ref16 ref8">8, 16</xref>
        ], which generates huge
ground programs. The grounding phase is in fact a strong limitation when
dealing with problems which generates a great amount of rules, especially if it is a
in-memory computation. This kind of programs leads to two issues, one
regarding the grounding itself and one regarding the computation of its stable models,
both limited by the amount of resource of the machine. Even if in literature
there is a fair interest towards the parallelization of stable models computation,
the single-machine multithreading applied to this eld still has the memory
limitation issue.
      </p>
      <p>To address this problem, we present in this paper our working project in this
direction, namely three distributed tools that exploit the shared resources of a
distributed system to deal with such programs, thus overcoming the limitation
of a single machine.</p>
      <p>
        In chronological order, the rst tool is a solver called mASPreduce [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]
developed with the Apache distributed framework Spark, which uses the MapReduce
paradigm to distribute the computation. The second one is a solver for strati ed
programs, still developed with Spark, which can be used also as a grounder,
called STRASP. Finally, the last solver we present, namely DASC (Distributed
Answer Set Coloring), makes use of the Coloring Algorithm on which
mASPreduce is built. The Coloring Algorithm [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] is a non-standard technique for nding
stable models in terms of di erent colorings of a graph built over the ASP
program to solve. It was chosen because the graph is a data structure suitable to
distribution. The di erence is that now it is implemented using the boost library
for C++ in order to lower the implementation level and to have more control on
the communication stage between the nodes of the cluster.
      </p>
      <p>The paper is organized as follows. In Section 2 we explain the Graph Coloring
Algorithm for solving, implemented in di erent ways by both mASPreduce and
DASC. From Section 3 to 5 we present the three tools. Some experimental results
and comparison between them are reported in Section 6. The reader can nd
our conclusions in Section 7.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Graph Coloring</title>
      <p>
        We brie y present the Coloring Algorithm for computation of answer sets [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ],
used by both mASPreduce and DASC solvers. In order to understand the
following, we expect from the reader a basic knowledge about ASP syntax.
      </p>
      <p>A labeled graph is a pair (G; `) where G = (V; E) is a directed graph and
` : E ! L is a map from edges to a set of labels L = f0; 1g (intuitively 0 will
represent a positive dependency and 1 a negative dependency). (G; `) can be
represented by the triple (V; E0; E1), where Ei = fe 2 E j `(e) = ig for i = 0; 1.
Given a labeled graph G = (V; E0; E1), an i{subgraph of G for i = 0; 1 is a
subgraph of the graph Gi = (V; Ei)|i.e. a graph G0 = (W; F ) s.t. W V , and
F Ei \ (W 2). If x; y 2 V , an i{path is a path from x to y in the graph Gi.</p>
      <p>Let be a ground logic program; its rule dependency graph (RDG) =
( ; E0; E1) is the labeled graph where nodes are the (number of) program rules
and</p>
      <p>E0 = f(r; r0) j r; r0 2
E1 = f(r; r0) j r; r0 2
; head(r) 2 body+(r0)g
; head(r) 2 body (r0)g
A (partial/total) coloring of is a partial/total map C : ! f ; g, where
and are two colors. We will denote C = fr j r 2 ; C(r) = g and
C = fr j r 2 ; C(r) = g, and a (partial) coloring as (C ; C ). Let us de ne
with C the set of all (partial) colorings, and de ne a partial order over C as
follows: let C; C0 be partial coloring of . We say that C v C0 i C C0 and
C C0 . The empty coloring (;; ;) is the bottom of the partial order C . Colors
represent enabling ( ) and disabling ( ) of rules. Intuitively, we are interested
in nding all possible subsets of generating rules, leading us to all the possible
answer sets of a logic program.</p>
      <p>De nition 1 (Generating Rules of an answer set). Given a set of atoms
X from a program , the set R (X) of generating rules is given by
R (X) = fr 2
j body+(r)</p>
      <p>X; body (r) \ X = ;g:</p>
      <p>
        Let be a logic program, and let be the corresponding RDG. We
dene the notion of admissible coloring as follows: if X 2 AS( ), then C =
(R (X); n R (X)) is an admissible coloring of (i.e., all the rules
satis ed by X are colored positively, and the other rules negatively). Moreover,
head(C ) = X [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. We denote by AC( ) the set of all admissible colorings of
.
      </p>
      <p>
        By de nition, admissible colorings are total and one-to-one with answer sets.
As shown in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], for computing them we have to visit the space of partial
colorings. Of course we are interested in partial colorings that will lead us to a
total admissible coloring.
      </p>
      <p>Let be a program and C a coloring of :
= ( ; E0; E1). For r 2
{ r is supported in ( ; C), if body+(r) fhead(r0) j (r0; r) 2 E0; r0 2 C g;
{ r is unsupported in ( ; C), if there is q 2 body+(r) s.t. fr0 j (r0; r) 2</p>
      <p>E0; head(r0) = qg C ;
{ r is blocked in ( ; C), if there exists r0 2 C s.t. (r0; r) 2 E1;
{ r is unblocked in ( ; C), if r0 2 C for all (r0; r) 2 E1.</p>
      <p>We also de ne the sets of supported S( ; C), unsupported S( ; C), blocked
B( ; C), and unblocked B( ; C) rules. By de nition, S( ; C) \ S( ; C) = ; and
B( ; C)\B( ; C) = ;. With C total coloring, a rule is unsupported or unblocked
i it is not supported or blocked, respectively. This is not true, in general, for
partial colorings.</p>
      <p>
        The above de ned notions can be used to de ne an operational semantics to
compute the stable models of a logic program. We will only give an overview of
the characterization implemented in our solver. For a deeper analysis of several
other operational characterizations, we refer the reader to [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>Let be the RDG of a logic program and C be a partial coloring of .
The coloring operator D : C ! C, where 2 f ; g, is de ned as follows:
1. D
2. D
= (C [ frg; C ) for some r 2 S( ; C) n (C
= (C ; C [ frg) for some r 2 S( ; C) n (C
[ C );
[ C ).</p>
      <p>Operator D will be used to encode a branching path in the visit of the
coloring tree, in fact, representing a non-deterministic choice (restricting our
choice to the supported rules). Since support is a local property of a node (it only
depends on information coming from the neighborhood), the coloring operator
can be e ciently applied.</p>
      <p>Let be the RDG of a logic program and C be a (partial) coloring of .
Let us de ne the operators P ; T ; V : C ! C as follows</p>
      <p>P (C) = (C
T (C) = (C
V (C) = (C ;
[ (S( ; C) \ B( ; C)); C
[ (S( ; C) n C ); C )
n V )
[ (S( ; C) [ B( ; C)))
where V = T (C ) and T (C) is the v-smallest coloring containing C and
closed under T . A coloring C is closed under the operator op if C = op(C).
Finally, let (PV) (C) be the v-smallest coloring containing C and being closed
under P and V .</p>
      <p>Theorem 21 (Operational Answer Set Characterization, III) Let be
the RDG of a logic program and let C be a total coloring . Then, C is an
admissible coloring of i there exists a coloring sequence C0; C1; : : : ; Cn such
that: (1) C0 = (PV) ((;; ;)), (2) Ci+1 = (PV) (D (Ci)) for some 2 f ; g
and 0 i &lt; n, (3) Cn = C.</p>
      <p>
        Given an admissible coloring C (point 3), head(C ) returns its corresponding
answer set. The proof of the above theorem can be found in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] and a general
introduction of so-called ASP computation is given in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ].
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>The mASPreduce solver</title>
      <p>
        The mASPreduce solver is based on the MapReduce distributed programming
paradigm rst introduced in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. It is designed to analyze and process large data
sets, and recent implementations of the model [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] are usually executed on clusters
to take full advantage of the parallel nature of the architecture. A preliminary
version was presented in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
      <p>A bare-bones implementation of MapReduce works on a generic collection of
homogeneus data, and provides a basic interface consisting of two methods:
1. map( ) that maps a function over a collection of objects. It outputs a
collection of \key-value" tuples;
2. reduce( ) that takes as input a collection of key-value pairs and merges the
values of all entries with the same key. The merging operation is user-de ned.
The user de nes a MapReduce program as a sequence of map/reduce calls;
modern implementations provide additional operators usually built on top of the
primitives map/reduce (e.g., lters, xpoints).</p>
      <p>
        We used Apache Spark as a state-of-the-art in-memory MapReduce
framework to implement the solver [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. The framework relies on the concept of
Resilient Distributed Dataset : a RDD is an immutable, fault-tolerant distributed
collection of objects, a read-only, partitioned collection of records, organized into
logical partitions, that may be located and processed on di erent nodes of the
network. Spark abstracts from the underlying storage system, making it
virtually compatible with any kind of lesystem. We built our system on top of the
Hadoop Distributed File System (HDFS), since it is natively compatible with
Spark.
      </p>
      <p>As a further astraction over MapReduce, Spark o ers two di erent families
of high-level operators:
1. transformations, which create a new dataset from an existing one;
2. actions, which aggregate elements of a RDD with a custom function and
return a single results to the caller.</p>
      <p>In this case, map is a simple example of transformation because it executes a
user-de ned function on each node and returns a new RDD; reduce is an
action that aggregates all the elements of the RDD using the provided function.
Transformations are lazily executed, in that they do not compute their results
until an action needs to be executed.</p>
      <p>
        We implemented the rule dependency graph and the graph coloring algorithm
for the computation of answer sets using the GraphX module [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] of Spark.
      </p>
      <p>
        Apart from giving access to a complete distributed graph implementation,
GraphX also provides a Pregel API [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. Pregel is a programming model for
large-scale graph problems and for x-point computations over graphs. A typical
Pregel computation consists of a sequence of supersteps. Within each superstep,
vertices in a graph may interact with their neighbours sending messages. Each
vertex analyzes the set of messages received in the previous superstep (if any)
and alter its property according to a user-de ned function; then, it can send new
messages to the neighbourhood. A Pregel computation stops when a superstep
does not generate any new message (or when other meta-conditions, such as a
maximum number of iterations, are met).
      </p>
      <p>The software is written in Scala and the RDG of a logic program is
implemented as a subclass of Graph[VD,ED], GraphX built-in class that gives access to
the property graph. The original Graph[VD,ED] class is parametrized over vertex
and edge property labels (VD and ED respectively). In the case of the RDG class,
nodes keep track of rules and edges keep track of support and blockage relations
between rules. RDG is in turn enclosed in a wrapper class which keeps track of
the atom table (provided by the grounder) and the answer sets computed so far.</p>
      <p>As described before, the RDG coloring process alternates between two phases:
1. Non-deterministic coloring : it is basically encoded as a visit over the
colorings tree. Di erent heuristics will change the way we visit the tree, achieving
better performances on di erent programs;
2. Deterministic coloring : deterministic propagation of the colors to avoid a
blind visit of the colorings tree.</p>
      <p>The main recursive procedure encodes the non-deterministic search and the
backpropagation process to compute all possible answer sets. At any time, it goes
through the vertices and (randomly) choose an uncolored supported rule. If none
exists, we reached an admissible total coloring and we can build the
corresponding answer set. In case an uncolored supported rule r exists, the computation
branches. In the rst case, r is colored with and the color is deterministically
propagated; nally, the function calls itself on the new graph. The second case
is similar, but r is colored with .</p>
      <p>Deterministic and non-deterministic operators are implemented as
map/reduce routines, while xpoint operators are implemented using Pregel.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Exploiting strati cation</title>
      <p>Strati ed programs re ect the following intuition: at the point of the inference
process where a rule is used, each negative reference should regard only atoms
such that a complete information about their foundedness is available. This
entails that a program is strati ed if and only if it is possible to de ne an
ordering on the evaluation of the rules such that whenever we encounter a naf
literal its membership to the answer set is already determined.</p>
      <p>
        The stable model is unique and can be obtained by iterating minimum
xpoint procedures at each strata [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The experiments presented in this section
are aimed to test the e ectiveness of the Apache Spark approach in absence of
non determinism (hence, handling of backtracking).
      </p>
      <p>
        [
        <xref ref-type="bibr" rid="ref3 ref4 ref9">9, 4, 3</xref>
        ] o er an overview of the way the computation of an answer set can be
structured in order to exploit SMP (Symmetric Multi-Processing) architectures.
Three levels of parallelism can be distinguished on a program P, of which we
implemented the rst two: Component level parallelism, Rules level parallelism
and Single Rule level parallelism. The reader can nd more details in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>The DASC solver</title>
      <p>The DASC solver has been developed with the purpose of improving the poor
performance and scaling of mASPreduce, caused by the limitation of the
highlevel framework Spark (as witnessed by the results on strati ed programs
explained in the next section). To reach this goal, we opted for a C++
implementation, with the help of the Parallel Boost Graph Library (brie y, PBGL) for
the distributed graph data structure, and the boost MPI library for the
communication stage. Thanks to the latter, we have complete control over the messages
sent on the network and the synchronization between the di erent computational
nodes. Since the bad scaling of mASPreduce resides on the communication stage,
our optimization starts from that.</p>
      <p>The way PBGL distributes the graph is pretty straightforward: vertices are
divided between the computational nodes in Round Robin way, stored in a node
list, and each unit keeps track of the edges connected to its local vertices with
adjacency lists. Vertex properties are stored in a property map.
5.1</p>
      <p>Design choices
The rst and most visible change with respect to mASPreduce is a modi
cation of the RDG structure, which has two noticeable e ects: it is more suitable
to address the notif y change implementation of propagation, explained in the
next subsection, and it potentially reduces the number of edges of an unbound
number, at the cost of doubling up the nodes. From now on, we refer to such a
graph as RDG'.</p>
      <p>De nition 2 (New Rule Dependency Graph: RDG'). Given a logic
program we de ne the RDG' as the graph (V; E0; E1; E2) where
{ V = [ atoms( )
{ E0 = f(a; r) j a 2 atoms( ) ^ r 2 ; a 2 body+(r)g
{ E1 = f(a; r) j a 2 atoms( ) ^ r 2 ; a 2 body (r)g
{ E2 = f(r; a) j r 2 ^ a 2 atoms( ); head(r) = ag</p>
      <p>The reason why this graph is more suitable to our algorithm is that we rely
only on information local to a node to decide whether the latter is supported or
blocked.</p>
      <p>For instance, a rule r is blocked if we are sure that in the actual coloring an
atom a belonging to body (r) does not belong to the answer set, i.e, for all rules
r0 such that a = head(r0), then r0 2 C . To perform this check without forcing
r to query all its neighbors, we could use a counter for each atom in body (r)
to keep count of how many r0 were disabled. Since it is not a good idea to keep
variable size data structures inside a node, we opted to use atom nodes, each
one with its own single counter.</p>
      <p>The other reason to choose this RDG structure is that it can strongly decrease
the number of edges, which is a very good point in a distributed graph: fewer
edges between di erent computational nodes, less amount of communication.</p>
      <p>To address performance and reduce communication, a completely di erent
strategy was developed in DASC to implement the propagation operators.</p>
      <p>MapReduce paradigm has a big downside when dealing with a distributed
system. Querying a neighbor stored in another computational node is a very
expensive operation, and this situation always happens, even if the considered
vertex would never be touched by the actual propagation. We refer to nodes
connected to other computational units as border nodes; since MapReduce relies
g
6</p>
    </sec>
    <sec id="sec-6">
      <title>Testing</title>
      <p>on the fact that each node queries all of its neighbors, this implies that also in
the case of a local propagation, which theoretically does not need to send any
message on the network, edges connected to border nodes are crossed, causing
useless tra c inside the cluster.</p>
      <p>To x the problem, the idea is to develop an algorithm in which only the nodes
really a ected by the actual propagation (plus their neighbors) are touched: we
will refer to this implementation as notif y change algorithm, since it will be
duty of an a ected node to notify its neighbors of an eventual change in its
coloring state, and not the opposite. The reader can nd the pseudocode in Figure 1.
v o i d n o t i f y c h a n g e ( node v ) f
//v i s e v e n t u a l l y c o l o r e d by p r o p a g a t i o n o p e r a t o r s
i f ( v has j u s t been c o l o r e d ) then</p>
      <p>n o t i f y c h a n g e ( u ) f o r a l l u such t h a t t h e r e i s a edge ( v , u ) ;
e l s e</p>
      <p>r e t u r n ;
In Figure 2 the reader can nd a quick comparison between DASC and
mASPreduce. Each DASC test is executed with all possible combinations of distribution
options.</p>
      <p>STRASP solver supports both the maximal strati ed subprogram and the
fully strati ed program resolution; moreover, we implemented a rst naive form
of distributed grounding, by exploiting the component and rule level parallelism
in order to distribute among the available nodes the computation and resolution
of the ground predicates.</p>
      <p>STRASP performance as solver for strati ed programs can be seen in Figure
3. We tested it by using the same logic (strati ed) program, where the base
stratum is composed of predicates such as a(1..20).. The upper strata de ne
predicates with rules referring to the lower strata with combinations leading to
an exponentially large grounding. Each test instance is obtained from the
previous by increasing (+10%) the ranges of the base stratum. The comparison with
Clingo shows that the two time series have similar trends, diverging only by a
constant factor; unfortunately this constant is too large.</p>
      <p>Although the shape of the graph of the running times with this approach is
the same w.r.t. Clingo on the same strati ed programs, the di erence in terms of
constants showed that the approach is still unfeasible. E ciency is probably lost
in the various abstraction levels that separates Apache users from the machine.</p>
      <p>Since strati ed programs can be fully evaluated at grounding time, the
computation of the maximal strati ed subprogram can be used as a starting point
for a more general distributed grounding, by rst grounding and solving the
maximal strati ed subprogram with the distributed procedure implemented in
STRASP, and then considering the non deterministic part of the program.
1
2
3
4
5
6
7</p>
      <sec id="sec-6-1">
        <title>Inst Distr RR RD RR</title>
        <p>RD
RR
RD
RR
RD
RR
RD
RR
RD
RR
RD</p>
      </sec>
      <sec id="sec-6-2">
        <title>1 cp unit</title>
      </sec>
      <sec id="sec-6-3">
        <title>DASC MR 0.003 NR 0.048</title>
        <p>NR
0.36
NR
1N.R83 SE
7N.R03 to
2N1R.99 to
5N8R.90 to</p>
      </sec>
      <sec id="sec-6-4">
        <title>2 cp unit</title>
      </sec>
      <sec id="sec-6-5">
        <title>DASC MR</title>
      </sec>
      <sec id="sec-6-6">
        <title>3 cp unit</title>
      </sec>
      <sec id="sec-6-7">
        <title>DASC MR</title>
      </sec>
      <sec id="sec-6-8">
        <title>4 cp unit</title>
      </sec>
      <sec id="sec-6-9">
        <title>DASC MR</title>
      </sec>
      <sec id="sec-6-10">
        <title>5 cp unit</title>
        <p>DASC MR
Since this project started with mASPreduce, we made some steps forward in
building a tool capable of exploiting distributed systems resources in order to
manage huge size programs. Yet, we are still far from achieve the goal of large
problems handling, and a lot of work has to be done to make our tools
competitive with state-of-the-art solvers. Heuristics implementation and a variant
of clause learning would probably be the main task to perform in order to
closing the gap with them. At that point, DASC could be used to handle ground
programs too big for single machine solvers.</p>
        <p>In order to handle the overall solving process, STRASP is a good starting
point for the grounding phase, even if performance are averagely 1000 time slower
then Clingo in strati ed programs. This gap is probably due to Spark ine ciency,
)
s
d
n
o
c
e
s
(
e
m
i
T
2;000
1;000</p>
        <p>0
5</p>
        <p>Test
1
3
7
9
1
3</p>
        <p>5</p>
      </sec>
      <sec id="sec-6-11">
        <title>Test</title>
        <p>7
9
so we expect much better results with a direct implementation, how it happened
between mASPreduce and DASC. However, STRASP performance can still be
improved by implementing the last level (Single rule level) of parallelism, in
order to handle huge programs.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. W. T. Adrian,
          <string-name>
            <given-names>M.</given-names>
            <surname>Alviano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Calimeri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Cuteri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Dodaro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Faber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fusca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Manna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Perri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Veltri</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Zangari</surname>
          </string-name>
          .
          <article-title>The ASP system DLV: advancements and applications</article-title>
          .
          <source>KI</source>
          ,
          <volume>32</volume>
          (
          <issue>2-3</issue>
          ):
          <volume>177</volume>
          {
          <fpage>179</fpage>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>K. R.</given-names>
            <surname>Apt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. A.</given-names>
            <surname>Blair</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Walker</surname>
          </string-name>
          .
          <article-title>Towards a theory of declarative knowledge</article-title>
          . In J. Minker, editor,
          <source>Foundations of Deductive Databases and Logic Programming</source>
          , pages
          <volume>89</volume>
          {
          <fpage>148</fpage>
          . Morgan Kaufmann,
          <year>1988</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Balduccini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Pontelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>El-Khatib</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>H.</given-names>
            <surname>Le</surname>
          </string-name>
          .
          <article-title>Issues in parallel execution of non-monotonic reasoning systems</article-title>
          .
          <source>Parallel Computing</source>
          ,
          <volume>31</volume>
          (
          <issue>6</issue>
          ):
          <volume>608</volume>
          {
          <fpage>647</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>F.</given-names>
            <surname>Calimeri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Perri</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          .
          <article-title>Experimenting with parallelism for the instantiation of ASP programs</article-title>
          .
          <source>J. Algorithms</source>
          ,
          <volume>63</volume>
          (
          <issue>1-3</issue>
          ):
          <volume>34</volume>
          {
          <fpage>54</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>A.</given-names>
            <surname>Dal Palu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dovier</surname>
          </string-name>
          , E. Pontelli, and
          <string-name>
            <surname>G. Rossi.</surname>
          </string-name>
          <article-title>GASP: answer set programming with lazy grounding</article-title>
          .
          <source>Fundam</source>
          . Inform.,
          <volume>96</volume>
          (
          <issue>3</issue>
          ):
          <volume>297</volume>
          {
          <fpage>322</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>J.</given-names>
            <surname>Dean</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Ghemawat</surname>
          </string-name>
          . Mapreduce:
          <article-title>Simpli ed data processing on large clusters</article-title>
          . In E. A. Brewer and P. Chen, editors,
          <source>6th Symposium on Operating System Design and Implementation</source>
          (OSDI
          <year>2004</year>
          ), San Francisco, California, USA, December 6-
          <issue>8</issue>
          ,
          <year>2004</year>
          , pages
          <fpage>137</fpage>
          {
          <fpage>150</fpage>
          . USENIX Association,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Dean</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Ghemawat</surname>
          </string-name>
          .
          <source>MapReduce: Simpli ed Data Processing on Large Clusters</source>
          , volume
          <volume>51</volume>
          , pages
          <fpage>107</fpage>
          {
          <fpage>113</fpage>
          . ACM, Jan.
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>A.</given-names>
            <surname>Dovier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          , and
          <string-name>
            <surname>E. Pontelli.</surname>
          </string-name>
          <article-title>An empirical study of constraint logic programming and answer set programming solutions of combinatorial problems</article-title>
          . J.
          <string-name>
            <surname>Exp</surname>
          </string-name>
          . Theor. Artif. Intell.,
          <volume>21</volume>
          (
          <issue>2</issue>
          ):
          <volume>79</volume>
          {
          <fpage>121</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>A.</given-names>
            <surname>Dovier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Pontelli</surname>
          </string-name>
          .
          <article-title>Parallel answer set programming</article-title>
          . In Y. Hamadi and L. Sais, editors,
          <source>Handbook of Parallel Constraint Reasoning</source>
          ., pages
          <volume>237</volume>
          {
          <fpage>282</fpage>
          . Springer,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>M. Gebser</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Kaufmann</surname>
            , and
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Schaub</surname>
          </string-name>
          .
          <article-title>Clingo = ASP + control: Preliminary report</article-title>
          . CoRR, abs/1405.3694,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>M.</given-names>
            <surname>Gelfond</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          .
          <article-title>Logic programs with classical negation</article-title>
          .
          <source>In Logic Programming, Proceedings of the Seventh International Conference</source>
          , Jerusalem, Israel, June 18-20,
          <year>1990</year>
          , pages
          <fpage>579</fpage>
          {
          <fpage>597</fpage>
          ,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>F.</given-names>
            <surname>Igne</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dovier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Pontelli</surname>
          </string-name>
          .
          <article-title>Masp-reduce: A proposal for distributed computation of stable models</article-title>
          .
          <source>In Technical Communications of the 34th International Conference on Logic Programming</source>
          ,
          <source>ICLP 2018, July 14-17</source>
          ,
          <year>2018</year>
          , Oxford, United Kingdom, volume
          <volume>64</volume>
          <source>of OASICS</source>
          , pages
          <volume>8</volume>
          :
          <issue>1</issue>
          {
          <issue>8</issue>
          :
          <issue>4</issue>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>K.</given-names>
            <surname>Konczak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Linke</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          .
          <article-title>Graphs and colorings for answer set programming</article-title>
          .
          <source>TPLP</source>
          ,
          <volume>6</volume>
          (
          <issue>1</issue>
          -2):
          <volume>61</volume>
          {
          <fpage>106</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. L.
          <string-name>
            <surname>Liu</surname>
            , E. Pontelli,
            <given-names>T. C.</given-names>
          </string-name>
          <string-name>
            <surname>Son</surname>
            , and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Truszczynski</surname>
          </string-name>
          .
          <article-title>Logic programs with abstract constraint atoms: The role of computations</article-title>
          . In V. Dahl and I. Niemela, editors,
          <source>Logic Programming</source>
          , 23rd International Conference, ICLP 2007, Porto, Portugal, September 8-
          <issue>13</issue>
          ,
          <year>2007</year>
          , Proceedings, volume
          <volume>4670</volume>
          <source>of LNCS</source>
          , pages
          <volume>286</volume>
          {
          <fpage>301</fpage>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. G. Malewicz,
          <string-name>
            <given-names>M. H.</given-names>
            <surname>Austern</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. J. C.</given-names>
            <surname>Bik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Dehnert</surname>
          </string-name>
          , I. Horn,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leiser</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Czajkowski.</surname>
          </string-name>
          <article-title>Pregel: a system for large-scale graph processing</article-title>
          . In S. Tirthapura and L. Alvisi, editors,
          <source>Proceedings of the 28th Annual ACM Symposium on Principles of Distributed Computing, PODC</source>
          <year>2009</year>
          , Calgary, Alberta, Canada,
          <source>August 10-12</source>
          ,
          <year>2009</year>
          ,
          <article-title>page 6</article-title>
          . ACM,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>T.</given-names>
            <surname>Son</surname>
          </string-name>
          and
          <string-name>
            <given-names>E.</given-names>
            <surname>Pontelli</surname>
          </string-name>
          .
          <article-title>Planning for biochemical pathways: A case study of answer set planning in large planning problem instances</article-title>
          . In M. De Vos and T. Schaub, editors,
          <source>Proceedings of the First International SEA'07 Workshop</source>
          , Tempe, Arizona, USA, volume
          <volume>281</volume>
          <source>of CEUR Workshop Proceedings</source>
          , pages
          <volume>116</volume>
          {
          <fpage>130</fpage>
          , 01
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <article-title>The Apache Software Foundation</article-title>
          .
          <source>Apache Spark (website)</source>
          ,
          <year>2018</year>
          . [last accessed Feb.
          <year>2018</year>
          ] https://spark.apache.org/.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <article-title>The Apache Software Foundation</article-title>
          .
          <source>GraphX (website)</source>
          ,
          <year>2018</year>
          . [last accessed Feb.
          <year>2018</year>
          ] https://spark.apache.org/docs/latest/graphx
          <article-title>-programming-guide</article-title>
          .html.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>