<!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>Efficient Model Construction for Horn Logic with VLog: Extended Abstract?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jacopo Urbani</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Markus Krötzsch</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ceriel Jacobs</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Irina Dragoste</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Carral</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Vrije Universiteit Amsterdam</institution>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>cfaed</institution>
          ,
          <addr-line>TU Dresden</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <abstract>
        <p>Horn ontologies consisting of existential rules are used in various fields ranging from reasoning over knowledge graphs [7] and Description Logics (DL) ontologies [5,6], to data integration [4] and social network analysis [10]. To solve conjunctive query answering over these logical theories, we can apply the chase algorithm-a sound and complete (albeit non-terminating) bottom-up materialisation procedure where all relevant consequences are precomputed, allowing queries to be directly evaluated over materialised sets of facts. As our main contribution, we extend the in-memory Datalog engine VLog [11] to support Horn existential rules without equality (a fragment that encompasses HornSRI in terms of expressivity). Namely, we implement the skolem and the restricted variants of the chase on VLog's architecture. In the skolem chase, rules are replaced by their skolemisation. In the restricted chase, new terms are introduced during the reasoning process only if already derived terms and facts cannot be reused to satisfy the corresponding existential restriction. The latter terminates in many more cases than the former [2,3] and often produces smaller models, but termination depends on the rule application order and its implementation requires value reusability checks. We implement a slightly different version of the restricted chase which leads to termination in more cases [3], by prioritising the exhaustive application of Datalog rules (rules without existentially quantified variables). This enables facts derived from Datalog rules to satisfy some existential restrictions that would otherwise lead to non-termination. In our implementation, we exploit the highly memory-efficient architecture of VLog, based on columnar storage: instead of storing a list of tuples (rows), the data is organised into a tuple of columns (value lists). The columns are ordered lexicographically, enabling fast merge joins and duplicate elimination, as well as data compression schemes for low memory usage. Because updates are slow in columnar tables, VLog operates in appendonly mode, applying one rule per materialisation step, and creating separate tables for the derived facts. To reduce redundant derivations, VLog uses semi-naive evaluation, which only considers rule body matches that were not found up to the previous application of the same rule. We adopted the 1-parallel-restricted chase [1] optimisation, in which the facts derived in the ongoing chase step are not checked for value reusability. We evaluate our implementation using existential rule programs from a recent (skolem and restricted) chase benchmark [1]. In addition, we also use rules obtained from translating data-rich, real world OWL ontologies (UOBM, Reactome, and Uniprot). The test data involves programs with millions of facts and thousands of rules, and predicates with relatively large arities (maximum 11). We test increasing partitions of data for the</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        same rule sets. In each case, we run the skolem and restricted chase on a commodity
laptop, and measure time and peak memory usage. We compare the results against the chase
benchmark leading system, RDFox [
        <xref ref-type="bibr" rid="ref8 ref9">9,8</xref>
        ]. Like VLog, RDFox is a performance-oriented
in-memory chase engine, but it is designed with the goal of enabling highly parallel
processing rather than memory efficiency. RDFox does not prioritise Datalog rules,
hence may terminate in fewer cases than VLog, but this does not affect our experiments.
      </p>
      <p>The results for the restricted chase are shown in Figure 1. Both VLog and RDFox
require significantly less time and memory for the restricted chase, with only few
exceptions (deep-100, deep-200, Ontology-256 require slightly less time and memory
in the skolem chase). These findings further motivate the use of the restricted chase.</p>
      <p>On average, VLog uses only 40% of the memory required by RDFox, ostensibly due
to its compressed data structures. In two cases, RDFox runs out of memory, while VLog
terminates (using OS swap space in only one case). Regarding time performance, VLog
takes between 5.8% and 137.5% of the time needed by RDFox. RDFox outperforms
VLog for only two ontologies, UOBM and doctors. This result is surprising, since VLog
ran on a single thread, while RDFox used maximal parallelism (8 cores), in some cases
peaking at over 700% of CPU usage.</p>
      <p>To summarise, we provide the first implementation of the chase on a columnar
architecture, by extending VLog. Our tool is more memory-efficient than the state of the
art while being comparatively fast, even on a single thread. VLog is free and open-source.
It can be used in two ways: as a command-line client with an optional web interface,3
and through a Java API4 with additional functionality (translating OWL files to rules,
executing SPARQL queries against remote endpoints, integrating RDF data, . . . ). We
hope our tool proves useful for the community, and encourages a broader adoption of
the expressive language of existential rules.</p>
      <p>Acknowledgements This work was supported by the DFG within the cfaed Cluster of
Excellence, CRC 912 (HAEC), and Emmy Noether grant KR 4381/1-1.
3 VLog core reasoner: https://github.com/karmaresearch/vlog
4 VLog4j: https://github.com/knowsys/vlog4j, also available via Maven</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Benedikt</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Konstantinidis</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mecca</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Papotti</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santoro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsamoura</surname>
          </string-name>
          , E.:
          <article-title>Benchmarking the chase</article-title>
          .
          <source>In: Proc. 36th Symposium on Principles of Database Systems (PODS'17)</source>
          . pp.
          <fpage>37</fpage>
          -
          <lpage>52</lpage>
          . ACM (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Carral</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dragoste</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krötzsch</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Restricted chase (non)termination for existential rules with disjunctions</article-title>
          . In: Sierra,
          <string-name>
            <surname>C</surname>
          </string-name>
          . (ed.)
          <source>Proc. 26th Int. Joint Conf. on Artificial Intelligence (IJCAI'17)</source>
          . pp.
          <fpage>922</fpage>
          -
          <lpage>928</lpage>
          . IJCAI (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Carral</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feier</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.:</given-names>
          </string-name>
          <article-title>A practical acyclicity notion for query answering over HornSRIQ ontologies</article-title>
          .
          <source>In: Proc. 15th Int. Semantic Web Conf. (ISWC'16)</source>
          . LNCS, vol.
          <volume>9981</volume>
          , pp.
          <fpage>70</fpage>
          -
          <lpage>85</lpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Fagin</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kolaitis</surname>
            ,
            <given-names>P.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>R.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Popa</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Data exchange: semantics and query answering</article-title>
          .
          <source>Theoretical Computer Science</source>
          <volume>336</volume>
          (
          <issue>1</issue>
          ),
          <fpage>89</fpage>
          -
          <lpage>124</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Consequence-driven reasoning for Horn SHIQ ontologies</article-title>
          .
          <source>In: Proc. 21st Int. Joint Conf. on Artificial Intelligence (IJCAI'09)</source>
          . pp.
          <fpage>2040</fpage>
          -
          <lpage>2045</lpage>
          . IJCAI (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Kazakov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krötzsch</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Simančík</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>The incredible ELK: From polynomial procedures to efficient reasoning with E L ontologies</article-title>
          .
          <source>J. of Automated Reasoning</source>
          <volume>53</volume>
          ,
          <fpage>1</fpage>
          -
          <lpage>61</lpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Marx</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krötzsch</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thost</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Logic on MARS: Ontologies for generalised property graphs</article-title>
          . In: Sierra,
          <string-name>
            <surname>C</surname>
          </string-name>
          . (ed.)
          <source>Proc. 26th Int. Joint Conf. on Artificial Intelligence (IJCAI'17)</source>
          . pp.
          <fpage>1188</fpage>
          -
          <lpage>1194</lpage>
          . IJCAI (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nenov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Piro</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Combining rewriting and incremental materialisation maintenance for datalog programs with equality</article-title>
          . In: Yang,
          <string-name>
            <given-names>Q.</given-names>
            ,
            <surname>Wooldridge</surname>
          </string-name>
          , M. (eds.)
          <source>Proc. 24th Int. Joint Conf. on Artificial Intelligence (IJCAI'15)</source>
          . pp.
          <fpage>3127</fpage>
          -
          <lpage>3133</lpage>
          . AAAI Press (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nenov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Piro</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olteanu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Parallel materialisation of Datalog programs in centralised, main-memory RDF systems</article-title>
          .
          <source>In: Proc. 28th AAAI Conf. on Artif. Intell. (AAAI'14)</source>
          . pp.
          <fpage>129</fpage>
          -
          <lpage>137</lpage>
          . AAAI Press (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <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 efficient graph query language based on Datalog</article-title>
          .
          <source>IEEE Trans. Knowl. Data Eng</source>
          .
          <volume>27</volume>
          (
          <issue>7</issue>
          ),
          <fpage>1824</fpage>
          -
          <lpage>1837</lpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Urbani</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jacobs</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krötzsch</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Column-oriented Datalog materialization for large knowledge graphs</article-title>
          .
          <source>In: Proc. 30th AAAI Conf. on Artificial Intelligence (AAAI'16)</source>
          . pp.
          <fpage>258</fpage>
          -
          <lpage>264</lpage>
          . AAAI Press (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Urbani</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krötzsch</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jacobs</surname>
            ,
            <given-names>C.J.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dragoste</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Carral</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Efficient model construction for horn logic with vlog - system description</article-title>
          . In: Galmiche,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Schulz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Sebastiani</surname>
          </string-name>
          ,
          <string-name>
            <surname>R</surname>
          </string-name>
          . (eds.)
          <source>Proc. 9th Int. Joint Conf. on Automated Reasoning (IJCAR'18)</source>
          . LNCS, vol.
          <volume>10900</volume>
          , pp.
          <fpage>680</fpage>
          -
          <lpage>688</lpage>
          . Springer (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>