<!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>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>The Conformance of an RML Processor Built from Scratch to Validate Specifications and Test Cases</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Christophe Debruyne</string-name>
          <email>c.debruyne@uliege.be</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dylan Van Assche</string-name>
          <email>dylan.vanassche@ugent.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>RML, RML Conformance Checking, Knowledge Graph Generation, BURP</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IDLab, Dept. Electronics &amp; Information Systems, Ghent University - imec</institution>
          ,
          <country country="BE">Belgium</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Montefiore Institute, University of Liège</institution>
          ,
          <country country="BE">Belgium</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The Knowledge Graph Construction community has worked on the new RML specifications for the past few years, consolidating and refining various [R2]RML extensions to support various use cases. This new specification involved scholars and practitioners in one or more of RML's modules. These modules were independently specified (vocabulary, SHACL shapes, and test cases). Moreover, participants in the Knowledge Graph Construction Workshop Challenge usually adapted their existing implementations, which have been developed (often to support research projects) to support specific problems (e.g., rewriting mappings and distributed processing). Rather than starting from existing implementations, which come with an inherent bias, we propose developing an RML Processor from scratch to avoid this bias. This engine aims to support the new RML specification while not being influenced by the prior [R2]RML implementations. We report on implementing the Basic and Unassuming RML Processor (BURP) and the current state of RML compliance. While the impact of BURP has been reported in more detail elsewhere, we hope that BURP will become the reference implementation for other implementations.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>CEUR
ceur-ws.org</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>
        Over the past few years, the Knowledge Graph Construction community has dedicated
significant efort to consolidate and refine various [R2]RML extensions into a new, comprehensive
RML specification [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This endeavor involved collaboration between scholars and practitioners
across multiple RML modules (vocabulary, SHACL shapes, and test cases) and aimed to address
a broader range of use cases. Notably, participants often adapted existing implementations
developed for specific research projects to address unique challenges (e.g., optimizing the RDF
generation process by rewriting mappings and distributed processing of RDF generation). Tools
often rewrite or extend implementation and aim to ensure some form of backward
compatibility. RMLMapper1, for instance, now supports R2RML [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], the original RML [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], its various
http://christophedebruyne.be/ (C. Debruyne); https://dylanvanassche.be (D. Van Assche)
      </p>
      <p>© 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
extensions, and now the new RML-core specification. One could argue that this complicates
things.</p>
      <p>
        In contrast to this approach, we propose the development of an RML Processor from scratch,
unburdened by the inherent biases2 of prior [R2]RML implementations. The Basic and
Unassuming RML Processor (BURP) is designed to support the new RML specification. While the impact
of BURP has been documented elsewhere [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], we anticipate that it will serve as a baseline for
future RML implementations. This paper reports on the implementation of BURP and assesses
its current compliance with the RML specification, which was covered by Track 1 of the KGC
Workshop’s Challenge.3
      </p>
    </sec>
    <sec id="sec-3">
      <title>2. Implementation</title>
      <p>
        The development of BURP was initially driven by the lack of an RML-CC implementation,
which consolidated and expanded ideas presented in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Implementing RML-CC, which
allows for values to be aggregated into RDF Containers and Collections within and across
iterations, required drastic changes in existing codebases of RML implementations. Moreover,
we discovered inconsistencies within and across RML modules. Thus, an implementation started
from scratch seemed an adequate approach to developing this RML Processor to avoid these
inconsistencies and evaluate the community’s decisions in the new RML modules.
      </p>
      <p>”Basic” refers to the implementation following steps that are inspired by R2RML’s reference
algorithm: it uses simple data structures, relies on nested loops, does not rewrite mappings,
does not use concurrent or distributed programming techniques, etc. BURP assumes that
all data to be transformed fits in the machine’s memory. The algorithm is deliberately kept
simple, as introducing the aforementioned techniques may come at a cost. For example, the
aggregation of results in a distributed environment relies on associative monoids, which afect
the results yielded by Gather Maps. ”Unassuming” means that the specification, the shapes, and
the test cases solely drive the development of this processor and no other assumptions w.r.t.
the mappings and data are made to optimize the RDF generation process.</p>
      <p>BURP follows simple steps to generate RDF, similar to the R2RML reference algorithm.
The code and RDF generation algorithm is deliberately kept simple to help RML Processors’
developers implement the new RML specifications. BURP uses simple data structures to store all
data in memory. Moreover, BURP does not try to recover from or correct errors. When an error
occurs, BURP merely outputs an error message to the user indicating what went wrong and, if
possible, where it went wrong. Then, it exits with a non-zero exit code. BURP will not even
try to generate partial results. Such a feature is potentially and arguably desirable in industry
settings as one only needs to rerun the failed mappings. Still, we deem this beyond the scope of
a reference implementation.
2I.e, relying on codebases developed for (or starting from) diferent mapping languages, [R2]RML dialects, and/or
developed for specific use cases.
3https://kg-construct.github.io/workshop/2024/challenge.html</p>
    </sec>
    <sec id="sec-4">
      <title>3. Compliance</title>
      <p>BURP currently fully supports RML-Core, RML-CC, and RML-FNML. It also supports some
functionality of RML-IO4. Complete support for RML-IO and RML-Star is planned for the latter
part of 2024.</p>
      <p>BURP passes 100% of the RML-Core and RML-CC features and 92% of RML-FNML. The only
failed test is RMLFNOTC0000-CSV6. This test relies on generating a UUID via a function that
takes no input. The generation of the same UUID is practically unlikely, and the test thus always
fails. Given that this test was ill-conceived, we deem that we cover the RML-FNML specification
regarding the test cases.</p>
      <p>We noticed issues when running RML-IO test cases; some tests relied on outdated RML,
and others contained mistakes. RMLSTC0006c, for instance, relied on an endpoint that was not
configured properly. As such, BURP allowed us to determine what went wrong. BURP passes
78% percent of RML-IO source test cases, with the ones failing related to diferent vocabularies
to download data and CSVW dialects. Only one of the RML-IO target test cases passes (2%).</p>
    </sec>
    <sec id="sec-5">
      <title>4. Discussion: Are We Suficiently Conservative?</title>
      <p>It is important to remember that the specifications and test cases mostly drive the development
of BURP. This has led to the various RML modules becoming more integrated (e.g., the SHACL
shapes must consider the various RML Term Maps and Expression Maps).</p>
      <p>Several questions can be raised concerning the coverage of our test cases. Some examples that
can be mentioned are: 1) How can we ensure that we have covered most (if not all) combinations
of the various modules? 2) RML-FNO uses rml:inputValueMap to link an input with a Term
Map. Some Term Maps have a Graph Map (e.g., Subject Maps), how does that impact the
Predicate Object Maps with Graph Maps? 3) Quoted triples can be included in RDF Containers
and Collections, but what is the expected behavior when RML Quoted Triples Maps are also
used as a Gather Map?</p>
      <p>We recognize that some of these corner cases seem far-fetched, but they require
documentation. The behavior can be left to the implementation, but our opinion is to propose documenting
the expected behavior via notes and test cases.</p>
    </sec>
    <sec id="sec-6">
      <title>5. Conclusions</title>
      <p>We reported on the implementation of a simple RML Processor ’BURP’ that was initially driven
by a need for an RML-CC-compliant processor and turned out to be an exercise to test the
validity of various RML modules throughout the Knowledge Graph Construction Workshop
Challenge.</p>
      <p>This RML Processor, which we dubbed BURP, is not (necessarily) intended as a
productionready tool as everything is processed in memory. No efort was spent on optimizing the RDF
generation process (no mapping rewriting, no parallel processing, etc.). We hope that BURP
will become the community’s reference implementation and sandbox for further research.
4RML Logical Sources are supported, and RML Logical Target is under development
Dylan Van Assche is supported by the Special Research Fund of Ghent University5 under
grant BOF20/DOC/132. The collaboration of Dylan Van Assche and Christophe Debruyne is
stimulated by the KG4DI FWO scientific research network (W001222N).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Iglesias-Molina</surname>
          </string-name>
          ,
          <string-name>
            <surname>D. Van Assche</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Arenas-Guerrero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>De Meester</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Debruyne</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jozashoori</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Maria</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Michel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Chaves-Fraga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dimou</surname>
          </string-name>
          ,
          <article-title>The RML ontology: A communitydriven modular redesign after a decade of experience in mapping heterogeneous data to RDF, in: The Semantic Web - ISWC</article-title>
          <year>2023</year>
          - 22nd International Semantic Web Conference, Athens, Greece, November 6-
          <issue>10</issue>
          ,
          <year>2023</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          , volume
          <volume>14266</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2023</year>
          , pp.
          <fpage>152</fpage>
          -
          <lpage>175</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Das</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sundara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          ,
          <article-title>R2RML: RDB to RDF Mapping Language</article-title>
          , Working Group Recommendation,
          <source>World Wide Web Consortium (W3C)</source>
          ,
          <year>2012</year>
          . URL: http://www.w3.org/TR/ r2rml/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dimou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. Vander</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Colpaert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          , E. Mannens, R. Van de Walle,
          <article-title>RML: A generic language for integrated RDF mappings of heterogeneous data</article-title>
          ,
          <source>in: Proceedings of the Workshop on Linked Data on the Web co-located with the 23rd International World Wide Web Conference (WWW</source>
          <year>2014</year>
          ), Seoul, Korea, April 8,
          <year>2014</year>
          , volume
          <volume>1184</volume>
          <source>of CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Van Assche</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Debruyne, BURPing Through RML Test Cases</article-title>
          , in: A.
          <string-name>
            <surname>Dimou</surname>
            , D. ChavesFraga, U. Serles,
            <given-names>D. Van</given-names>
          </string-name>
          <string-name>
            <surname>Assche</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Iglesias-Molina</surname>
          </string-name>
          (Eds.),
          <source>Proceedings of the 5th International Workshop on Knowledge Graph Construction (KGCW</source>
          <year>2024</year>
          )
          <article-title>co-located with 19th Extended Semantic Web Conference (ESWC</article-title>
          <year>2024</year>
          ), Hersonissos, Greece, May
          <volume>27</volume>
          ,
          <year>2024</year>
          , CEUR Workshop Proceedings, CEUR-WS.org,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C.</given-names>
            <surname>Debruyne</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>McKenna</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>O'Sullivan, Extending R2RML with support for RDF collections and containers to generate MADS-RDF datasets</article-title>
          ,
          <source>in: Research and Advanced Technology for Digital Libraries - 21st International Conference on Theory and Practice of Digital Libraries, TPDL</source>
          <year>2017</year>
          , Thessaloniki, Greece,
          <source>September 18-21</source>
          ,
          <year>2017</year>
          , Proceedings, volume
          <volume>10450</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2017</year>
          , pp.
          <fpage>531</fpage>
          -
          <lpage>536</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>F.</given-names>
            <surname>Michel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Djimenou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Faron-Zucker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Montagnat</surname>
          </string-name>
          ,
          <article-title>Translation of Relational and Nonrelational Databases into RDF with xR2RML</article-title>
          ,
          <source>in: WEBIST 2015 - Proceedings of the 11th International Conference on Web Information Systems and Technologies</source>
          , Lisbon, Portugal,
          <fpage>20</fpage>
          -22 May,
          <year>2015</year>
          , SciTePress,
          <year>2015</year>
          , pp.
          <fpage>443</fpage>
          -
          <lpage>454</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>