<!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>Possible Worlds Explorer: Datalog and Answer Set Programming for the Rest of Us</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sahil Gupta</string-name>
          <email>sjgupta2@illinois.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yi-Yun Cheng</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bertram Ludascher</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dept. of Computer Science, University of Illinois at Urbana-Champaign</institution>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Information Sciences, University of Illinois at Urbana-Champaign</institution>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <fpage>44</fpage>
      <lpage>55</lpage>
      <abstract>
        <p>Datalog and Answer Set Programming (ASP) are powerful languages for rule-based querying and constraint solving, respectively. We have developed Possible Worlds Explorer (PWE), an open source Python-based toolkit that employs Jupyter notebooks to make working with Datalog and ASP systems easier and more productive. PWE can parse output from di erent reasoners (Clingo and DLV) and then run analytical queries over all answer sets or \possible worlds" (PWs), e.g., to calculate relative frequencies of atoms across PWs or to hierarchically cluster PWs based on user-de ned complexity and similarity measures. PWE also has support for well-founded Datalog models (from DLV) and temporal models that use a special state argument. Using simple Python functions, generic as well as user-de nable presentation and visualization formats can be easily created, e.g., to display all PWs (world views), the unique three-valued well-founded model (partial views), and temporal models (timelines and time series). We provide containerized versions of PWE that can be run in the cloud or locally. We hope that in this way Datalog and ASP can be made more accessible for a wider audience.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Datalog has a long and rich history in database foundations and theory [
        <xref ref-type="bibr" rid="ref1 ref15 ref22">1,15,22</xref>
        ],
and has seen a recent resurgence in academia and industry [
        <xref ref-type="bibr" rid="ref14 ref16 ref19 ref25 ref28">14,16,19,25,28</xref>
        ].3
Answer Set Programming (ASP) shares some common roots with Datalog and
evolved from the stable model semantics [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] of logic programs with non-stratifed
negation and disjunction in rule heads. The availability of ASP solvers such as
DLV [
        <xref ref-type="bibr" rid="ref2 ref23">23,2</xref>
        ] and Clingo [
        <xref ref-type="bibr" rid="ref11 ref12">12,11</xref>
        ], among others, has facilitated new extensions and
applications in KR and ML; see, e.g., [
        <xref ref-type="bibr" rid="ref8 ref9">9,8</xref>
        ] and the various surveys on theory
and practice of ASP [
        <xref ref-type="bibr" rid="ref10 ref12 ref24 ref5 ref7">10,5,12,24,7</xref>
        ].
      </p>
      <p>
        Despite the signi cant interest and considerable capabilities for advanced
applications, declarative querying and problem solving with Datalog and ASP have
not found wider adoption among general programmers and data and information
scientists, and all too often remain an \experts only" domain.
3 See also the \Datalog 2.0" workshop series [
        <xref ref-type="bibr" rid="ref26 ref3">26,3</xref>
        ], documenting this resurgence.
      </p>
      <p>
        Python, on the other hand, is one of the most popular and fastest growing
programming languages in recent years [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ]. Some of the reasons for this include
its gentle learning curve (from beginner to expert), the comprehensive package
support for data science and machine learning (e.g., Pandas, Matplotlib,
Scikit-Learn, etc.), and a very active, ever-growing community of users. These
and other factors have made Python the de-facto programming language for data
science and tool integration.
      </p>
      <p>
        We have developed Possible Worlds Explorer (PWE) [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], an open source,
Python-based toolkit that aims to bring together the best of both worlds in order
to serve a wide audience of users. In particular, the goals of PWE are to:
(i) empower traditional user groups, i.e., not yet experienced with declarative
problem solving, to explore problems and their Datalog/ASP solutions in a
familiar, interactive user environment (Jupyter notebooks);
(ii) empower Datalog and ASP experts to be more productive by being able to
seamlessly mix and match declarative rules from di erent rule engines and
solvers (e.g., Clingo and DLV) with procedural code (implementing, e.g.,
analytical queries over and visualizations of possible worlds); and
(iii) allow both groups of users to easily create and share executable knowledge
artifacts as Jupyter notebooks [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ].
      </p>
      <p>
        We continue to improve and extend the functionality of the PWE toolkit [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ],
along with a growing repository of introductory PWE notebooks [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. To further
lower the barrier to entry, PWE and notebooks can be deployed in cloud-based
environments, i.e., Whole Tale [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and Binder [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], so that users can execute
the notebooks without having to install any software and dependent packages.
      </p>
      <p>The remainder of the paper is organized as follows: In Section 2, we describe
the PWE architecture and discuss its components. In Section 3, we present a
few introductory examples for declarative problem solving with PWE. These
are meant to provide a rst illustration of the power of logic-based declarative
problem solving4 for novices, and to introduce some capabilities of Python-based
notebooks (e.g., visualizations of PWs) to Datalog/ASP experts not familiar
with Jupyter notebooks. In Section 4, we brie y summarize and conclude.
2</p>
      <p>
        Possible Worlds Explorer: System Overview
PWE is a Python-based open-source toolkit with several components that aim
to make interacting with ASP and Datalog systems easier, and to provide users
with features and conventions that allow them to analyze potentially large sets
of possible worlds (answer sets ). We employ Jupyter notebooks5 as the preferred
user interface for PWE, since notebooks can interleave an explanatory narrative
with code snippets and inline visualizations. In this way, PWE notebooks
offer both an interactive problem solving and exploration environment, and can
4 many more can be found in [
        <xref ref-type="bibr" rid="ref10 ref12 ref24 ref5">10,5,12,24</xref>
        ]
5 https://jupyter.org/
      </p>
      <p>ASP Solutions
(Possible Worlds)
+ Meta Data
(Schema, Temporal
Attributes, etc.)
Internal Solution(s)
Representation
(Pandas DataFrames)</p>
      <p>Answer Set
Program (ASP)
Query (Pandas)
(many useful
built-ins)
Distance Function
(Python)
Visualization
Function (Python)</p>
      <p>Complexity
Function (Python)
Export Format</p>
    </sec>
    <sec id="sec-2">
      <title>ASPRAunleaslysis</title>
      <p>ASP Solver (Clingo or DLV)
ASP Solutions Parser (ANTLR)
Complexity/Property Calculation</p>
      <p>Tool
Query Tool
Distance Tool
Visualization Tool</p>
      <p>Export Tool
Time-Series Tool
Export (as ASP) Tool</p>
      <p>PW-Explorer
Query
Solution
Distance</p>
      <p>Matrix
Visualization
Property
Value
Solution in
Exported</p>
      <p>Format</p>
    </sec>
    <sec id="sec-3">
      <title>TimeM→apState</title>
      <p>Answer Set
Program
Output
Intermediates</p>
      <p>
        User Input
be seen as reproducible, computational artifacts that are shareable, browsable,
and re-executable [
        <xref ref-type="bibr" rid="ref18 ref6">18,6</xref>
        ]. The PWE components can be accessed in conventional
scripts and interactive notebooks, like any other Python library. We provide a
comprehensive set of Python modules with many functions as part of our PWE
library. We also provide a command-line interface for users who prefer to use the
command-line. The following are some key components of PWE:
ASP/Datalog Wrappers. PWE currently includes wrappers for Clingo [
        <xref ref-type="bibr" rid="ref11 ref12">12,11</xref>
        ]
and DLV [
        <xref ref-type="bibr" rid="ref2 ref23">23,2</xref>
        ]. The PWE wrappers provide users with a \pythonic" interface
to these engines. Python strings can be used as ASP rules to be evaluated by
the underlying reasoners. This also allows users to easily generate rule instances
based on a parameterized problem. For example, the well-known Towers of Hanoi
problem is parameterized by the number of disks and pegs. PWE uses
Antlr6based parsers to read the outputs of the wrapped systems and load them into
Pandas7 DataFrame objects. Another PWE feature is the support for 3-valued,
well-founded models [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] output by DLV { see Section 3.2 for an example. Our
system also contains extension points so users can add special annotations as
comments in logic programs, which then can be detected by PWE. Attribute
names, e.g., can help users better understand complex relational schemas, so
6 Another Tool for Language Recognition: https://en.wikipedia.org/wiki/ANTLR
7 Python Data Analysis Library: https://pandas.pydata.org/
users can include schema annotations of the form
      </p>
      <p>% schema R(A1; : : : ; An)
indicating that relation R has attributes A1; : : : ; An. These user-declared names
for attributes Ai can then be used as column names in Pandas DataFrames.</p>
      <p>Similarly, the PWE annotation</p>
      <p>% temporal R(: : : ; T; : : :)
identi es, via the special symbol \T", the argument position in a relation R that
should be treated as containing a temporal or state identi er. This argument
position can then be used by other PWE modules for time-series based analysis.
Query Tool. PWE can query across all possible worlds, e.g., to nd unique
features, or to intersect or union all PWs. In particular, PWE can access and
work with brave and cautious consequences of ASP programs.</p>
      <p>Distance Tool. Often a natural question we want to answer when analyzing
sets of PWs is: How similar or di erent are PWs to each other? Using this tool,
users can nd the distance between any two PWs based on their shared (or
unique) facts, or by de ning a new distance metric.</p>
      <p>
        Visualization Tool. This module allows users to visualize individual solutions
or the whole solution space. Some built-in visualizations, including clustering,
dendrograms, and 2D distance mapping, all use the distance matrix generated by
the distance tool. Users can also easily de ne their own visualization functions.
PWE also includes some basic visualizations for time-series based answer sets,
so users can see how states \evolve" over time within each PW.
Complexity (World Feature) Calculation Tool. This tool allows users to
de ne a metric to be calculated for each PW, which then can be used to rank
PWs. For example, in the stable marriage problem [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], a fairness metric can be
de ned to nd the PW which is fairest for both groups.
      </p>
      <p>Time-Series Module. PWE has some built-in support for ASP problems that
are time-series based, e.g., the classic Towers of Hanoi puzzle. The temporal
annotation mentioned above allows users to indicate which argument holds the
state identi er. PWE can then group and display answers by state, in order, etc.
PW Import/Export Tool. This tool is for advanced users who would like
to (i) export Pandas DataFrames used by PWE to other formats (e.g., CSV,
Pickle, or SQLite) for further processing, or (ii) re-import as database facts the
possible worlds output in an earlier step. PWE can also export a unique 3-valued
well-founded model (from DLV) and then re-import it as database facts for a
subsequent Clingo step. In addition, di erent export schemas are available, e.g.,
\as-is", or a triple-based generic encoding that rei es relation names as data,
thereby supporting querying and reasoning about schemas.</p>
      <sec id="sec-3-1">
        <title>Declarative Problem Solving by Example</title>
        <p>
          In order to demonstrate the capabilities and features of PWE, we have created
several executable Jupyter notebooks which guide the user, step by step, through
a number of introductory and advanced problems. In this section we highlight a
few elements of some of these examples from our growing demo repository [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ].
The repository includes an environment.yml le and a postBuild bash script
that are used to create an automated build to assemble an image to execute
PWE and the example notebooks, either locally using Conda8, or online in a
cloud-based environment such as provided by Binder [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] or Whole Tale [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ].
3.1
        </p>
        <p>Combinatorics (Graph Coloring): Two ASP Rules Su ce
To get a rst intuition of declarative problem solving, consider the following:
(a) node(1..5). e(1,2). e(2,3). e(3,4). e(4,1). e(4,5). % Database facts
(b) col(X,red) ; col(X,green) ; col(X,blue) :- node(X). % Generator
(c) :- e(X,Y), col(X,C), col(Y,C), X != Y. % Constraint</p>
        <p>Line (a) states that we have a graph consisting of ve nodes and some edges
e(x; y), forming a \square" 1-2-3-4-1 with an \appendage" 4-5. Thus line (a)
consists of a set of database facts. In contrast, a rule like the one in (b) is
written in the form \head :- body" and means that if the condition in body is
true, then the head logically follows. Here, (b) states that every node x can have
any of three colors, i.e., the semicolons \;" in the head are interpreted as logical
disjunctions \_" and (b) thus acts as a generator of alternatives (x could be red
or green or blue). Finally, (c) is a special rule that acts as a denial constraint : it
has an empty head and states that if there is an edge e(x; y) and if x and y have
the same color c (for x 6= y), then the \current world" under consideration is
not a possible world, since neighboring nodes must always have di erent colors.</p>
        <p>There are 35 = 243 di erent ways overall to associate one of three colors to
ve nodes. If the denial constraint (c) is removed, an ASP reasoner will indeed
generate all 243 possible worlds. For a human, it is di cult to determine how
many and which of the 243 candidate solutions also satisfy the given constraint
(c), demanding di erent colors for neighboring nodes. ASP solvers such as DLV
or Clingo easily handle such combinatorial puzzles:
$ clingo -n0 3col.lp4
Answer: 1
col(1,blue) col(2,red) col(3,green) col(4,red) col(5,blue)
...</p>
        <p>Answer: 36
col(1,red) col(2,green) col(3,blue) col(4,green) col(5,blue)
SATISFIABLE
Models
CPU Time
8 https://conda.io/</p>
        <p>The command-line parameter nN indicates that at most N models should
be computed; setting N =0 as above means: compute all solutions. Here there are
exactly 36 solutions among the 243 candidates, representing all valid 3-colorings
of the input graph.</p>
        <p>Even for such a fairly small number of PWs, it is di cult for a user to relate
and compare solutions and answer simple questions such as \how many PWs
use only two colors?" or \what PWs use all three colors?", etc.</p>
        <p>With the analysis and visualization capabilities of PWE running within a
Jupyter notebook, the limitations of traditional, \spartan" command-line
interfaces can be easily overcome: Fig. 2 shows di erent cells of a demo notebook,
highlighting how \meta-analyses" can be performed across all solutions in PWE.</p>
        <p>
          The visualizations in Fig. 3 illustrate how PWE can be used to nd further
structure in a set of possible worlds. The heat map in the lower left clearly shows
the separation of the cluster of 6 solutions using only two colors (cf. Fig. 2) and
a larger cluster of the remaining 30 solutions which use all three colors. The
latter contains further substructure (revealed by another metric) as seen by the
heatmap and associated dendrograms on the right in Fig. 3; see [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] for details.
        </p>
        <p>
          This (non-strati ed) rule states that in a game graph the position x is won, if in
the graph there exists a move from x to some position y which is not won (since
the opponent then moves from y). Consider a simple graph consisting of the
following relation moves = f(a; b); (b; a); (b; c); (c; d)g. Since d is a sink, win(d)
is false, i.e., d is lost. This in turn makes win(c) true since there is a move from
c to d. On the other hand, a and b are both drawn, since the best move from b is
to a, perpetuating the game (moving to c would be a win for the opponent). The
unique 3-valued well-founded model [
          <xref ref-type="bibr" rid="ref30">30</xref>
          ] can be computed with DLV directly:
        </p>
        <sec id="sec-3-1-1">
          <title>Timeline Input Database</title>
          <p>
            PWE recognizes 3-valued output by DLV. A user-de ned visualization is used to
render the solved game graph with colored positions (Fig. 4). Both Clingo and
DLV can be used to generate all stable models of the above program. All stable
models Si extend the unique well-founded model W, i.e., agree on the de ned
parts of W and can only vary over the unde ned parts of W.
3.3 Integrity Constraint Repair and Timeline Visualizations
ASP has numerous applications, e.g., in model-based diagnosis and repair. In
the case of inconsistent databases, alternative repairs, i.e., minimal changes that
restore integrity, can be generated via declarative rules [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ], giving rise to di erent
possible worlds. We illustrate how this can be done with PWE using a small
sample dataset from the Museum of Modern Art (MoMA) that we have prepared
so it exhibits interesting data quality problems. We selected a handful of artists
and a few of their artworks, i.e., Pablo Picasso, Yayoi Kusama, and Artko.
Artworks include Picasso's Seated Woman and War and Peace, Kusama's
Flower, Endless, and Accumulations, and Artko's Acapulco Gold.
          </p>
          <p>For each of the artists, we created a few synthetic errors to mimic similar
quality issues for more poorly curated collections. For Pablo Picasso, e.g.,
we created another instance Picasso (i.e., without his rst name) who passed
away in a di erent year, but who uses the same artist-ID. Integrity constraint
violations (ICVs) can be captured via auxiliary rules: e.g., the following rules
report primary key violations and \posthumous art works", respectively:
icv_PK(ID, N1, N2)
:</p>
          <p>artist(N1,ID,_,_), artist(N2,ID,_,_), N1 != N2.
icv_PostHumous(T, AN, AID, ArtYear)
:</p>
          <p>artwork(T,_,AID,ArtYear),artist(AN,AID,_,DeathYear), ArtYear&gt;DeathYear.</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Timeline PW1</title>
          <p>.
.
.</p>
        </sec>
        <sec id="sec-3-1-3">
          <title>Timeline PW4</title>
          <p>Repair rules then specify alternate \ xes", e.g., by deleting artist N1 or N2,
referred to in the rule above. Similar to the way illustrated in Section 3.1, PWE
can now be used to rank, compare, and cluster PWs, i.e., alternate \repair
worlds". Here, we instead choose a timeline visualization (Fig. 5), as it lets users
visually inspect the dataset for inconsistencies.</p>
          <p>
            When repair rules are used (see, e.g., [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ]), multiple PWs are generated. Fig. 6
shows two of four PWs generated for our running MoMA example. For relatively
small numbers of PWs, the user can visually inspect the alternatives. For larger
sets, Python code (or declarative meta-programs) can be used to automatically
rank and compare worlds.
3.4
          </p>
          <p>
            Towers of Hanoi: State-based Search and Graph Analysis
Towers of Hanoi (ToH) is a computer science classic to teach about recursion. It
is also a good introductory example for declarative problem solving, where the
reasoner has to nd a sequence of actions to accomplish a goal while observing a
number of constraints. The Potassco/Clingo User Guide [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ] contains a simple,
state-based problem description of ToH.9 We use a PWE notebook to better
analyze the time-series nature of the solutions to this problem [
            <xref ref-type="bibr" rid="ref18">18</xref>
            ]. In our PWE
demo notebook, we use a small instance of ToH with three disks and the usual
three pegs. The smallest number of moves to transfer all disks from the initial
state (labeled aaa) to the nal state (labeled ccc) is 7 in this case.
9 https://github.com/potassco/clingo/tree/master/examples/gringo/toh
          </p>
          <p>
            Another model of ToH can be created by employing a di erent representation,
the Hanoi graph10. The state space of this move graph is more interesting than
it might seem at rst glance. It contains the set of all possible con gurations
and all valid moves between them and is radially symmetric. By design it also
encodes some useful information such as the shortest sequence of moves required
to move between any two states. We can create, analyze, and visualize the Hanoi
graph easily in PWE: We can use Python code, parametrized by the number of
disks and pegs, to generate ASP rules that encode the graph edges. We then
leverage Python's NetworkX11 library to extract and conveniently visualize
this information. We can then perform various analyses on the Hanoi graph. For
example, as shown on the left in Fig. 7, we can nd the shortest sequence of
moves that take us from the initial state (aaa) to the goal state (ccc) by nding
the shortest path between these two nodes. Similarly, one might be interested
in determining whether there exists a sequence of moves that visits all possible
con gurations exactly once and returns to the initial con guration. This test for
the existence of a Hamiltonian cycle can be directly encoded in ASP, or it could
be computed using a Python library; see Fig. 7 (right) for a rendering of the
Hamiltonian cycle in the Hanoi graph, and [
            <xref ref-type="bibr" rid="ref18">18</xref>
            ] for further details.
4
          </p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Summary and Conclusions</title>
        <p>
          We have presented Possible Worlds Explorer (PWE), a toolkit Datalog and ASP
systems with the down-to-earth practical data wrangling and visualization
capa10 https://en.wikipedia.org/wiki/Tower_of_Hanoi#Graphical_representation
11 NetworkX Python Library: http://networkx.github.io
bilities of Python, running in an interactive, user-friendly Jupyter environment.
To illustrate the power and capabilities of PWE, we have developed multiple
demonstration notebooks that are available at [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. In addition, we have
provided a Conda-based virtual environment con guration which can be used with
Binder [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] to navigate and interact with these examples and create new ones.
We believe that PWE will help making declarative problem solving more
accessible to practitioners and educators in academia and industry. Conversely, we
hope that theoreticians will be tempted to use PWE as a \language lab", where
ideas combining multiple tools and systems can be tried out rapidly. The PWE
library is available via PyPi12 and the source code is available on Github [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ].
        </p>
        <p>
          We have not studied the scalability of PWE yet, but have run a few
experiments involving millions of facts, spread across tens to hundreds of thousands of
PWs, resulting in PWE load times under 15 minutes on a modern laptop. PWE
is an ongoing project and the tool is still evolving and being improved. We
believe, however, that PWE in its present form already adds signi cant value for
new users, especially when compared to the \bare bones", command-line only
tools usually available. In future iterations of PWE, we intend to add additional
functionality to this tool such as support for temporal and range queries and
new distance measures that can take into account temporal aspects. We also
believe that PWE and tools like it may play an increasing role in future data
science and AI applications (cf. QASP [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ]) by combining declarative problem
solving in the style of ASP and Datalog with tool integration through Python.
12 PWE PyPi: https://pypi.org/project/PW-explorer
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Abiteboul</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hull</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vianu</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          : Foundations of Databases. Addison-Wesley (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Alviano</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pfeifer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Terracina</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          :
          <article-title>The Disjunctive Datalog System DLV</article-title>
          . In: de Moor et al. [
          <volume>26</volume>
          ]
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Barcelo</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pichler</surname>
            ,
            <given-names>R</given-names>
          </string-name>
          . (eds.):
          <source>Datalog in Academia and Industry: 2nd Intl. Workshop, Datalog</source>
          <volume>2</volume>
          .0, Vienna, Austria, Sept.
          <fpage>11</fpage>
          -
          <lpage>13</lpage>
          . LNCS 7494, Springer (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bertossi</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Database Repairing and Consistent Query Answering</article-title>
          .
          <source>Synthesis Lectures on Data Management</source>
          <volume>3</volume>
          (
          <issue>5</issue>
          ),
          <volume>1</volume>
          {
          <fpage>121</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Brewka</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Truszczynski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Answer Set Programming at a Glance</article-title>
          .
          <source>CACM</source>
          <volume>54</volume>
          (
          <issue>12</issue>
          ),
          <volume>92</volume>
          {
          <fpage>103</fpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Brinckman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chard</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ga</surname>
            <given-names>ney</given-names>
          </string-name>
          , N.,
          <string-name>
            <surname>Hategan</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jones</surname>
            ,
            <given-names>M.B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kowalik</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kulasekaran</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , Ludascher,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Mecum</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.D.</given-names>
            ,
            <surname>Nabrzyski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Stodden</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            ,
            <surname>Taylor</surname>
          </string-name>
          , I.J.,
          <string-name>
            <surname>Turk</surname>
            ,
            <given-names>M.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Turner</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Computing Environments for Reproducibility: Capturing the \Whole Tale"</article-title>
          .
          <source>Future Gen. Comp. Systems</source>
          <volume>94</volume>
          ,
          <fpage>854</fpage>
          {
          <fpage>867</fpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Cabalar</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pearce</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Valverde</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Answer Set Programming from a Logical Point of View</article-title>
          . KI - Ku
          <source>nstliche Intelligenz</source>
          <volume>32</volume>
          (
          <issue>2</issue>
          ),
          <volume>109</volume>
          {118 (Aug
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Clercq</surname>
            ,
            <given-names>S.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schockaert</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cock</surname>
            ,
            <given-names>M.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nowe</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Solving Stable Matching Problems Using Answer Set Programming</article-title>
          .
          <source>TPLP</source>
          <volume>16</volume>
          (
          <issue>3</issue>
          ),
          <volume>247</volume>
          {
          <fpage>268</fpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Germano</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaminski</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Redl</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , Schuller,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Weinzierl</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>The DLVHEX System</article-title>
          .
          <source>KI - Kunstliche Intelligenz</source>
          <volume>32</volume>
          (
          <issue>2</issue>
          ),
          <volume>187</volume>
          {
          <fpage>189</fpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ianni</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krennwallner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Answer Set Programming: A Primer</article-title>
          .
          <source>In: Reasoning Web</source>
          . pp.
          <volume>40</volume>
          {
          <fpage>110</fpage>
          . LNCS 5689, Springer (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <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>Lindauer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Ostrowski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Romero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Thiele</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Wanko</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <source>Potassco User Guide v2.2.0. Tech. rep.</source>
          , University of Potsdam (Jan
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <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>Schaub</surname>
          </string-name>
          ,
          <string-name>
            <surname>T.</surname>
          </string-name>
          :
          <article-title>Answer Set Solving in Practice</article-title>
          .
          <source>Synthesis Lectures on AI and Machine Learning</source>
          <volume>6</volume>
          (
          <issue>3</issue>
          ),
          <volume>1</volume>
          {
          <fpage>238</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Gelfond</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lifschitz</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>The stable model semantics for logic programming</article-title>
          .
          <source>In: ICLP/SLP</source>
          . vol.
          <volume>88</volume>
          , pp.
          <volume>1070</volume>
          {
          <issue>1080</issue>
          (
          <year>1988</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koch</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baumgartner</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herzog</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Flesca</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The Lixto Data Extraction Project: Back and Forth Between Theory and Practice</article-title>
          .
          <source>In: Principles of Database Systems (PODS)</source>
          . pp.
          <volume>1</volume>
          {
          <issue>12</issue>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. Gradel, E.,
          <string-name>
            <surname>Kolaitis</surname>
            ,
            <given-names>P.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Libkin</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marx</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Spencer</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vardi</surname>
            ,
            <given-names>M.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Venema</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weinstein</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <source>Finite Model Theory and Its Applications</source>
          . Springer (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Green</surname>
            ,
            <given-names>T.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aref</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karvounarakis</surname>
          </string-name>
          , G.:
          <article-title>LogicBlox, Platform and Language: A Tutorial</article-title>
          .
          <source>In: Datalog in Academia and Industry</source>
          , pp.
          <volume>1</volume>
          {
          <issue>8</issue>
          . Lecture Notes in Computer Science, Springer, Berlin, Heidelberg (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <source>Possible Worlds Explorer source code repository (Feb</source>
          <year>2019</year>
          ), https: //github.com/idaks/PW-explorer
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          : PWE demos (
          <year>Feb 2019</year>
          ), https://github.com/idaks/PWE-demos
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Hellerstein</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>The Declarative Imperative: Experiences and Conjectures in Distributed Logic</article-title>
          .
          <source>SIGMOD Rec</source>
          .
          <volume>39</volume>
          (
          <issue>1</issue>
          ),
          <volume>5</volume>
          {
          <fpage>19</fpage>
          (Sep
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Project</surname>
            <given-names>Jupyter</given-names>
          </string-name>
          , Matthias Bussonnier, Jessica Forde, Jeremy Freeman, Brian Granger, Tim Head, Chris Holdgraf, Kyle Kelley, Gladys Nalvarte, Andrew Oshero , Pacer,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Yuvi</surname>
          </string-name>
          <string-name>
            <surname>Panda</surname>
          </string-name>
          , Fernando Perez, Benjamin Ragan Kelley,
          <source>Carol Willing: Binder</source>
          <volume>2</volume>
          .
          <article-title>0 { Reproducible, interactive, sharable environments for science at scale</article-title>
          .
          <source>In: 17th Python in Science Conference</source>
          . pp.
          <volume>113</volume>
          {
          <issue>120</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Kluyver</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ragan-Kelley</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perez</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Granger</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bussonnier</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Frederic</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kelley</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hamrick</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grout</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corlay</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ivanov</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Avila</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abdalla</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Willing</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <article-title>Jupyter development team: Jupyter Notebooks { a Publishing Format for Reproducible Computational Work ows</article-title>
          .
          <source>In: Positioning and Power in Academic Publishing: Players, Agents and Agendas</source>
          . pp.
          <volume>87</volume>
          {
          <fpage>90</fpage>
          . IOS Press (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Kolaitis</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>A Retrospective on Datalog 1.0</article-title>
          . In: Barcelo and Pichler [3]
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Leone</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pfeifer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Faber</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eiter</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Scarcello</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The DLV System for Knowledge Representation and Reasoning</article-title>
          .
          <source>ACM TOCL 7</source>
          (
          <issue>3</issue>
          ),
          <volume>499</volume>
          {
          <fpage>562</fpage>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Lifschitz</surname>
          </string-name>
          , V.:
          <article-title>Achievements in Answer Set Programming</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          <volume>17</volume>
          (
          <issue>5-6</issue>
          ),
          <volume>961</volume>
          {
          <fpage>973</fpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Mazuran</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Serra</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zaniolo</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Extending the Power of Datalog Recursion</article-title>
          .
          <source>The VLDB Journal</source>
          <volume>22</volume>
          (
          <issue>4</issue>
          ),
          <volume>471</volume>
          {493 (Aug
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>de Moor</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gottlob</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Furche</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sellers</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . (eds.):
          <source>Datalog Reloaded: 1st Intl. Workshop</source>
          , Datalog, Oxford, UK, March
          <volume>16</volume>
          -
          <fpage>19</fpage>
          . LNCS 6702, Springer (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Nickles</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A System for the Use of Answer Set Programming in Reinforcement Learning</article-title>
          .
          <source>In: Logics in AI</source>
          , pp.
          <volume>488</volume>
          {
          <fpage>491</fpage>
          . Springer (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Seo</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lam</surname>
            ,
            <given-names>M.S.:</given-names>
          </string-name>
          <article-title>SociaLite: An E cient Graph Query Language Based on Datalog</article-title>
          .
          <source>TKDE</source>
          <volume>27</volume>
          (
          <issue>7</issue>
          ),
          <year>1824</year>
          {
          <year>1837</year>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Tung</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Programming Language of the Year? Python Is Standout in Latest Rankings (Jan</article-title>
          <year>2019</year>
          ), ZDNet Magazine
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Van Gelder</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ross</surname>
            ,
            <given-names>K.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schlipf</surname>
            ,
            <given-names>J.S.:</given-names>
          </string-name>
          <article-title>The Well-Founded Semantics for General Logic Programs</article-title>
          .
          <source>J. ACM</source>
          <volume>38</volume>
          (
          <issue>3</issue>
          ),
          <volume>619</volume>
          {649 (Jul
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>