<!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>Evaluating Datalog via Structure-Aware Rewriting</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Hangdong Zhao</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paraschos Koutris</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shaleen Deep</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Wisconsin-Madison</institution>
          ,
          <addr-line>Madison</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <fpage>48</fpage>
      <lpage>53</lpage>
      <abstract>
        <p>Datalog is a powerful yet elegant language that allows expressing recursive computation. Although Datalog evaluation has been extensively studied in the literature, so far, only loose upper bounds are known on how fast a Datalog program can be evaluated. In this work, we ask the following question: given a Datalog program, what is the tightest possible runtime? To this end, our main contribution is a structure-aware query evaluation technique that computes a Datalog program by first rewriting it to generate the smallest possible grounding. Using this technique we can obtain state-of-the-art theoretical runtime results. We also give some preliminary evidence that the rewriting method can lead to practical runtime improvements.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Datalog</kwd>
        <kwd>tree decomposition</kwd>
        <kwd>rewriting</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Datalog is a recursive query language that has gained prominence due to its expressivity and rich
applications across multiple domains, including graph processing [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], declarative program analysis [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ],
and business analytics [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Many graph analytics tasks (e.g., pattern finding) and program analysis tasks
such as Dyck-reachability [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5, 6, 7</xref>
        ], context-free reachability [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], and Andersen’s analysis [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] can be
naturally cast as Datalog programs.
      </p>
      <p>
        Much prior work has sought to characterize the complexity of Datalog evaluation. The general
data complexity of Datalog is P-complete [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ]. Some fragments of Datalog can have lower data
complexity: the evaluation for non-recursive Datalog is in AC0, whereas evaluation for Datalog with
linear rules is in NC and thus eficiently parallelizable [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
        ]. However, all such results do not tell us
how eficiently we can evaluate a given Datalog program. Furthermore, the current general algorithmic
techniques for Datalog evaluation typically aim for an imprecise polynomial bound instead of specifying
the tightest possible exponent. Semi-naïve or naïve evaluation only provides upper bounds on the
number of iterations, ignoring the computational cost of each iteration.
      </p>
      <p>
        Endeavors to pinpoint the exact data complexity for Datalog fragments have focused on the class of
Conjunctive Queries (CQs) [
        <xref ref-type="bibr" rid="ref14 ref15 ref16">14, 15, 16</xref>
        ] and union of CQs [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. When recursion is involved, however,
exact runtimes are known only for special classes of Datalog [
        <xref ref-type="bibr" rid="ref18 ref19 ref20 ref21">18, 19, 20, 21</xref>
        ]. The seminal work of
Yannakakis [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] established a (3) runtime for chain Datalog programs, where  is the size of the
active domain. Such programs have a direct correspondence to context-free grammars and capture
a fundamental class of static analysis known as context-free reachability (CFL-reachability). When
the chain Datalog program corresponds to a regular grammar, the runtime can be further improved
to ( · ), where  denotes the size of the input data. An (3) algorithm was proposed for the
Datalog program that captures Andersen’s analysis [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Recently, Casel and Schmid [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] studied the
ifne-grained complexity of evaluation, enumeration, and counting problems over regular path queries
(also a Datalog fragment) with similar upper bounds. However, none of these techniques generalize to
arbitrary Datalog programs.
      </p>
      <p>Our Contribution In [24], we address the following question: given a Datalog program  , what is
the tightest possible runtime as a function of the input size  and the size of the active domain ?</p>
      <p>To answer this question, we propose a general framework for evaluating  based on rule rewriting.
The key idea is based on the fundamental result that a grounded Datalog program (i.e., one where every
rule has constants) can be evaluated in time linear w.r.t. its size. Hence, the goal of the framework is to
transform  into an equivalent grounded program that is as small as possible. Though constructing
grounded programs naïvely is rather straightforward, we show that groundings of smaller size are
attainable via rewriting  using tree decomposition techniques. We apply our framework to prove
state-of-the-art and new results for practical Datalog fragments (e.g. linear Datalog).</p>
      <p>This paper summarizes the key results from [24] and seeks to experimentally evaluate the idea of
rewriting a Datalog program  to obtain the smallest possible grounding. We show that the rewriting
can often lead to significant speed-ups in evaluation.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Preliminaries</title>
      <p>Datalog consists of a set of rules over a set of extensional and intensional relations (simply referred
to as EDB and IDB respectively, henceforth). EDBs correspond to relations in a given database, each
comprising a set of EDB tuples, whereas IDBs are derived by the rules. The head of each rule is an
IDB, and the body of the rule consists of zero or more EDBs and IDBs as a Conjunctive Query defining
how the head IDB is derived. We illustrate with the example of transitive closure on a binary EDB R
denoting edges in a directed graph, a single IDB T, and two rules:</p>
      <p>T(, ) ←
T(, ) ←</p>
      <p>R(, ).</p>
      <p>R(, ), T(, ).</p>
      <p>For every Datalog program, we will assume that there is a unique IDB that we identify as the target
(or output) of the program. We use arity( ) to denote the maximum number of variables contained in
any IDB of a program  . We say that a Datalog program  is monadic if every IDB is unary; a Datalog
program is linear if the body of every rule contains at most one IDB. A chain Datalog program is a
program where every rule has the following form:</p>
      <p>T(1, +1) ←</p>
      <p>T1(1, 2), T2(2, 3), . . . , T(, +1).</p>
      <p>A chain Datalog program corresponds to a Context-Free Grammar (CFG).</p>
      <p>We use  to denote the sum of sizes of the input EDB relations to a Datalog program. We use  to
denote the size of the active domain of EDB relations (i.e., the number of distinct constants that occur
in the input). We assume data complexity, i.e. the program size (the total number of predicates and the
variables) is a constant. We use the standard word-RAM model with (log )-bit words and unit-cost
operations for all complexity results.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Main Results</title>
      <p>In this section, we sketch the main results from [24] on structure-aware Datalog rewriting. The readers
may refer to [24] for the formal algorithm and analysis. Our first result considers Datalog programs
that are rulewise-acyclic. A rule is said to be acyclic if the body of the rule, viewed as a Conjunctive
Query, admits a join tree. We say that a program is rulewise-acyclic if it has only acyclic rules.
Theorem 3.1 ([24]). Let  be a rulewise-acyclic Datalog program with input size , active domain
size , and arity . Then, we can evaluate  in time (− 1 · ( + )).</p>
      <p>We give below an example of how our algorithm for the theorem works, using even-hop backward
reachability in directed graphs:
sink().
edge(, ), edge(, ), evenPath().</p>
      <p>Both rules here are acyclic, and the arity is  = 2. Observe that producing directly all groundings of
the second rule would generate a grounded program of size ( · ). Our algorithm first rewrites the
second rule following the structure of its join tree:
oddPath() ←</p>
      <p>Now grounding the resulting rules will produce a grounded program of only size (), which implies
an evaluation algorithm with runtime (). In fact, a direct corollary of Theorem 3.1 is that for
monadic acyclic Datalog we have a linear runtime of (), which is essentially optimal.</p>
      <p>Theorem 3.1 can be generalized from acyclic rules to rules bounded by submodular width.
Theorem 3.2 ([24]). Let  be a Datalog program where arity( ) ≤ , subw is the maximum submodular
width across all rules of  , and suppose the input size is , and the active domain size is . Then, we
can evaluate  in time ̃︀(− 1 · (subw + · subw)), where ̃︀ hides a polylogarithmic factor.</p>
      <p>As an example, consider the following Datalog program, which computes a diamond-pattern
reachability starting from some node set source():</p>
      <p>T() ←
T() ←
source().</p>
      <p>T(), edge(, ), edge(, ), edge(, ), edge(, ).</p>
      <p>For this program, the submodular width of the second rule is 3/2. Further, its arity is  = 1. Thus, we
can evaluate the above program in time ̃︀(3/2).</p>
      <p>
        As a corollary of Theorem 3.2, monadic Datalog (i.e. when  = 1) can be evaluated in time ̃︀(subw).
This is also the best-known runtime for Boolean Conjunctive Queries [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. Hence, this result tells us
that the addition of recursion with unary IDBs does not really add to the runtime of evaluation!
      </p>
      <p>When the rules in the Datalog program are linear, we can obtain even stronger runtime results.
Theorem 3.3 ([24]). Let  be a linear and rulewise-acyclic Datalog program with input size , active
domain size , and arity ≤ 2. Then, we can evaluate  in time ( · ).</p>
      <p>Theorem 3.4 ([24]). Let  be a linear Datalog program with input size , active domain size , arity
≤ , and submodular width subw. Then, we can evaluate  in time (− 1 · subw− 1 · ( + )).</p>
    </sec>
    <sec id="sec-4">
      <title>4. Experiments</title>
      <p>In this section, we demonstrate that our rewriting technique can result in significant runtime speed-ups
in practice. We ran all our experiments on a bare-metal single-node virtual machine on Cloudlab [25]
that has two Intel E5-2683 v3 14-core CPUs and 256GB main memory.</p>
      <p>
        We test our structure-aware rewritings via three programs on Soufflé. Soufflé [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is a widely used
high-performance Datalog system that is primarily designed for program analysis and uses advanced
optimization techniques such as eficient program synthesis. All results reported are configured to run
single-threaded in main memory. The three programs are: 1 same generation [26, 27], i.e.
and its rewriting (using our technique)
sg(, ) ←
sg(, ) ←
edge(, ), edge(, ),  ̸= .
      </p>
      <p>edge(, ), sg(, ), edge(, ).
sg(, ) ←
sg(, ) ←
fatherOf(, ) ←
fatherOf(, ), edge(, ).
edge(, ), edge(, ),  ̸= .</p>
      <p>edge(, ), sg(, ).
(2)
(3)
(4)
(5)
Dataset
G5k
G10k
wiki-Vote
ego-Twitter
web-Stanford
soc-Livejournal
2 even-hop backward reachability and its rewriting (both outlined in Section 3), and 3
diamondpattern reachability (3) (it is not rulewise-acyclic) and its rulewise-acyclic rewriting as follows:
T() ← source().</p>
      <p>Z(, ) ← T(), edge(, ), edge(, ).</p>
      <p>W(, ) ← T(), edge(, ), edge(, ).</p>
      <p>T() ← Z(, ), W(, ).
(6)</p>
      <p>We use graph datasets (wiki-Vote, ego-Twitter, web-Stanford and soc-Livejournal) from
the Stanford Large Network Dataset Collection [28] as program inputs. The G5k and G10k datasets are
random graphs of 5 and 10 nodes sampled from the Erdős-Rényi model [29], where each edge exists
with probability 0.001. All datasets are listed in Table 1. Whenever necessary, we randomly sample 100
nodes from the graph and designate them as the source nodes source() or the sink nodes sink().</p>
      <p>Table 2 summarizes the runtime results on Soufflé. We find a consistent 2.5 up to ~20x speed-up on
the first two programs. In the last row, one regression (~ 5x slowdown) is observed on web-Stanford
because the final result set is small but the introduced Z(, ), W(, ) IDBs are very large and hence
expensive to materialize in the rewritten Soufflé program (6).</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>We propose a structure-aware rewriting technique that allows us to obtain and even refine the
bestknown theoretical runtime results. The theoretical results are based on our recent PODS 2024
publication [24]. In addition, our rewriting exhibits significant speed-ups on Soufflé across multiple
recursive graph workloads. Future directions include an in-depth understanding of the tightness of our
results and a more comprehensive investigation of the practicality of our technique in modern Datalog
engines like Soufflé.
48–53</p>
      <p>LIPIcs, Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021, pp. 19:1–19:20.
[24] H. Zhao, S. Deep, P. Koutris, S. Roy, V. Tannen, Evaluating datalog over semirings: A
groundingbased approach, Proc. ACM Manag. Data 2 (2024) 90.
[25] Cloudlab, https://www.cloudlab.us/, 2018.
[26] F. Bancilhon, D. Maier, Y. Sagiv, J. D. Ullman, Magic sets and other strange ways to implement
logic programs, in: Proceedings of the fifth ACM SIGACT-SIGMOD symposium on Principles of
database systems, 1985, pp. 1–15.
[27] Z. Fan, S. Mallireddy, P. Koutris, Towards better understanding of the performance and design of
datalog systems., Datalog 2 (2022) 166–180.
[28] J. Leskovec, A. Krevl, SNAP Datasets: Stanford large network dataset collection, http://snap.</p>
      <p>stanford.edu/data, 2014.
[29] D. A. Bader, K. Madduri, Gtgraph: A synthetic graph generator suite (2006).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J.</given-names>
            <surname>Seo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Park</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Shin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Lam</surname>
          </string-name>
          ,
          <article-title>Distributed socialite: A datalog-based language for large-scale graph analysis</article-title>
          ,
          <source>Proc. VLDB Endow</source>
          .
          <volume>6</volume>
          (
          <year>2013</year>
          )
          <fpage>1906</fpage>
          -
          <lpage>1917</lpage>
          . URL: http://www.vldb.org/pvldb/vol6/ p1906-seo.pdf.
          <source>doi:10.14778/2556549</source>
          .2556572.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>B.</given-names>
            <surname>Scholz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Jordan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Subotic</surname>
          </string-name>
          , T. Westmann,
          <article-title>On fast large-scale program analysis in datalog</article-title>
          , in: CC, ACM,
          <year>2016</year>
          , pp.
          <fpage>196</fpage>
          -
          <lpage>206</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Smaragdakis</surname>
          </string-name>
          , G. Balatsouras,
          <article-title>Pointer analysis</article-title>
          ,
          <source>Found. Trends Program. Lang</source>
          .
          <volume>2</volume>
          (
          <issue>2015</issue>
          )
          <fpage>1</fpage>
          -
          <lpage>69</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>T. J.</given-names>
            <surname>Green</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. S.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. T.</given-names>
            <surname>Loo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <article-title>Datalog and recursive query processing</article-title>
          ,
          <source>Found. Trends Databases</source>
          <volume>5</volume>
          (
          <year>2013</year>
          )
          <fpage>105</fpage>
          -
          <lpage>195</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>T. W.</given-names>
            <surname>Reps</surname>
          </string-name>
          ,
          <article-title>Program analysis via graph reachability</article-title>
          ,
          <source>Inf. Softw. Technol</source>
          .
          <volume>40</volume>
          (
          <year>1998</year>
          )
          <fpage>701</fpage>
          -
          <lpage>726</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , T. Reps,
          <article-title>Fast graph simplification for interleaved dyck-reachability</article-title>
          ,
          <source>in: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>780</fpage>
          -
          <lpage>793</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , T. Reps,
          <article-title>On the complexity of bidirected interleaved dyck-reachability</article-title>
          ,
          <source>Proceedings of the ACM on Programming Languages</source>
          <volume>5</volume>
          (
          <year>2021</year>
          )
          <fpage>1</fpage>
          -
          <lpage>28</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Mathiasen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Pavlogiannis</surname>
          </string-name>
          ,
          <article-title>The fine-grained and parallel complexity of andersen's pointer analysis</article-title>
          ,
          <source>Proc. ACM Program. Lang</source>
          .
          <volume>5</volume>
          (
          <issue>2021</issue>
          )
          <fpage>1</fpage>
          -
          <lpage>29</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>L. O.</given-names>
            <surname>Andersen</surname>
          </string-name>
          ,
          <article-title>Program analysis and specialization for the C programming language</article-title>
          ,
          <source>Ph.D. thesis, Citeseer</source>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M. R.</given-names>
            <surname>Garey</surname>
          </string-name>
          ,
          <article-title>Computers and intractability: A guide to the theory of np-completeness, freeman</article-title>
          ,
          <source>Fundamental</source>
          (
          <year>1997</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>S.</given-names>
            <surname>Cosmadakis</surname>
          </string-name>
          ,
          <article-title>Inherent complexity of recursive queries</article-title>
          ,
          <source>in: Proceedings of the eighteenth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems</source>
          ,
          <year>1999</year>
          , pp.
          <fpage>148</fpage>
          -
          <lpage>154</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Ullman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. V.</given-names>
            <surname>Gelder</surname>
          </string-name>
          ,
          <article-title>Parallel complexity of logical query programs</article-title>
          ,
          <source>Algorithmica</source>
          <volume>3</volume>
          (
          <year>1988</year>
          )
          <fpage>5</fpage>
          -
          <lpage>42</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>F.</given-names>
            <surname>Afrati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. H.</given-names>
            <surname>Papadimitriou</surname>
          </string-name>
          ,
          <article-title>The parallel complexity of simple logic programs</article-title>
          ,
          <source>Journal of the ACM (JACM) 40</source>
          (
          <year>1993</year>
          )
          <fpage>891</fpage>
          -
          <lpage>916</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>M.</given-names>
            <surname>Joglekar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Ré</surname>
          </string-name>
          ,
          <article-title>It's all a matter of degree - using degree information to optimize multiway joins</article-title>
          ,
          <source>Theory Comput. Syst</source>
          .
          <volume>62</volume>
          (
          <year>2018</year>
          )
          <fpage>810</fpage>
          -
          <lpage>853</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>H. Q.</given-names>
            <surname>Ngo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Porat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Ré</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rudra</surname>
          </string-name>
          ,
          <article-title>Worst-case optimal join algorithms</article-title>
          ,
          <source>J. ACM</source>
          <volume>65</volume>
          (
          <year>2018</year>
          )
          <volume>16</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>16</lpage>
          :
          <fpage>40</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Khamis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. Q.</given-names>
            <surname>Ngo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Suciu</surname>
          </string-name>
          ,
          <article-title>What do shannon-type inequalities, submodular width, and disjunctive datalog have to do with one another?</article-title>
          , in: PODS, ACM,
          <year>2017</year>
          , pp.
          <fpage>429</fpage>
          -
          <lpage>444</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>N.</given-names>
            <surname>Carmeli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kröll</surname>
          </string-name>
          ,
          <article-title>On the enumeration complexity of unions of conjunctive queries</article-title>
          ,
          <source>ACM Transactions on Database Systems (TODS) 46</source>
          (
          <year>2021</year>
          )
          <fpage>1</fpage>
          -
          <lpage>41</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Y. A.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. D.</given-names>
            <surname>Stoller</surname>
          </string-name>
          ,
          <article-title>From datalog rules to eficient programs with time and space guarantees</article-title>
          ,
          <source>in: Proceedings of the 5th ACM SIGPLAN International Conference on Principles and Practice of Declaritive Programming</source>
          ,
          <source>PPDP '03</source>
          ,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2003</year>
          , p.
          <fpage>172</fpage>
          -
          <lpage>183</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <surname>K. T. Tekle</surname>
            ,
            <given-names>Y. A.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>Precise complexity analysis for eficient datalog queries</article-title>
          ,
          <source>in: Proceedings of the 12th International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming</source>
          ,
          <source>PPDP '10</source>
          ,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2010</year>
          , p.
          <fpage>35</fpage>
          -
          <lpage>44</lpage>
          . URL: https://doi.org/10.1145/1836089.1836094. doi:
          <volume>10</volume>
          .1145/1836089.1836094.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>K. T. Tekle</surname>
            ,
            <given-names>Y. A.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>Precise complexity guarantees for pointer analysis via datalog with extensions</article-title>
          ,
          <source>Theory Pract. Log. Program</source>
          .
          <volume>16</volume>
          (
          <year>2016</year>
          )
          <fpage>916</fpage>
          -
          <lpage>932</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>K. T. Tekle</surname>
            ,
            <given-names>Y. A.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>More eficient datalog queries: subsumptive tabling beats magic sets</article-title>
          ,
          <source>in: Proceedings of the 2011 ACM SIGMOD International Conference on Management of Data, SIGMOD '11</source>
          ,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2011</year>
          , p.
          <fpage>661</fpage>
          -
          <lpage>672</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>M.</given-names>
            <surname>Yannakakis</surname>
          </string-name>
          ,
          <article-title>Graph-theoretic methods in database theory</article-title>
          , in: PODS, ACM Press,
          <year>1990</year>
          , pp.
          <fpage>230</fpage>
          -
          <lpage>242</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>K.</given-names>
            <surname>Casel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. L.</given-names>
            <surname>Schmid</surname>
          </string-name>
          ,
          <article-title>Fine-grained complexity of regular path queries</article-title>
          ,
          <source>in: ICDT</source>
          , volume
          <volume>186</volume>
          of
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>