<!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>Git2PROV: Exposing Version Control System Content as W3C PROV</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tom De Nies</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sara Magliacane</string-name>
          <email>s.magliacane@vu.nl</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ruben Verborgh</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sam Coppens</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paul Groth</string-name>
          <email>p.t.groth@vu.nl</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Erik Mannens</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rik Van de Walle</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ghent University - iMinds - Multimedia Lab</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>VU University Amsterdam</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Data provenance is de ned as information about entities, activities and people producing or modifying a piece of data. On the Web, the interchange of standardized provenance of (linked) data is an essential step towards establishing trust [2]. One mechanism to track (part of) the provenance of data, is through the use of version control systems (VCS), such as Git. These systems are widely used to facilitate collaboration primarily for both code and data. Here, we describe a system to expose the provenance stored in VCS in a new standard Web-native format: W3C PROV [4]. This enables the easy publication of VCS provenance on the Web and subsequent integration with other systems that make use of PROV. The system is exposed as a RESTful Web service, which allows integration into user-friendly tools, such as browser plugins.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Version control systems (VCS) have a long history in computing. The rst such
system was the Source Code Control System, developed in 1972 [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Nowadays,
VCS are widely popular and becoming more so with the advent of cloud-based
services, such as Github3 and Bitbucket4, that both simplify the management
of the VCS and expose their information through Web interfaces. For example,
Github has over 3 million users and maintains over 6 million repositories.5
      </p>
      <p>
        Versioning of data is an aspect of provenance: information about entities,
activities and people producing or modifying a piece of data. Provenance is critical
in contexts ranging from scienti c reproducibility to journalism. Furthermore, a
number of sub-disciplines of computer science, including databases, distributed
systems and the Web have been addressing issues related to provenance [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
Provenance is particularly important to the Semantic Web community because
3 http://www.github.com
4 http://www.bitbucket.com
5 See http://thenextweb.com/insider/2013/04/11/code-sharing-site-github-turns-
veand-hits-3-5-million-users-6-million-repositories/
of the need to ascertain the trust of data originating from multiple interlinked
sources [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Because of the importance of provenance to the Web, the W3C
produced the PROV recommendations for the interchange of provenance on the
Web [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. PROV was recently released and already has over 60 implementations
and is in use by several Linked Data datasets.
      </p>
      <p>Thus, the aim of the system described in this paper is to enable the
provenance within VCS to be exposed in a Web-native and interoperable format. This
provenance can then be consumed by other PROV enabled tools. Indeed, given
that the software used to create many Linked Data sets is available through
public version control systems6, we believe that the tool can be used to enrich
the provenance of many of these datasets.</p>
      <p>The rest of this paper is organized as follows. We brie y discuss related work
and present a mapping from the Git version control system to PROV. This
is followed by a description of the implementation and demonstration of our
system. In particular, our demo illustrates how the resulting information can be
consumed by other PROV enabled systems. The demonstration (live and video)
is available at the following URI: http://git2prov.org.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>
        This paper is part of a greater e ort to create more interoperability among
di erent platforms that track provenance information, by mapping them to a
standard interlingua such as [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Two relevant examples are the Dublin Core
Mapping to PROV [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], and the mapping of the revision history of Wikipedia to
OPM (an ancestor of PROV) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        Currently, the most commonly used VCS is Git, an example of a distributed
version control system. Due to brevity we will omit a detailed explanation of
Git, and refer to [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for an overview.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>A Mapping from VCS to PROV</title>
      <p>
        Our mapping, shown in Fig. 1, was created by identifying whether the data could
represent information from one or more broad classes of provenance information.
The three classes we used are identi ed below. For each class, we describe how
provenance can be expressed using concepts from the PROV Data Model [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
{ Dependency - a dependency between two objects expressed as the
relationship between two prov:Entity objects using prov:wasDerivedFrom and
prov:specializationOf , e.g. a le fc was derived from another previous le
fc 1, both are a specialization of a certain le f ;
{ Activities - a process expressed as a prov:Activity that connects two prov:Entity
objects, expressed through prov:used and prov:wasGeneratedBy relations,
e.g. a commit c uses a le fc 1 and generates a le fc;
6 e.g. https://github.com/dbpedia
twc-healthdata
or
https://github.com/jimmccusker/
      </p>
      <p>{ Attribution - attribution information expressed as the prov:Agent that
created the Entity using the prov:wasAttributedTo and prov:wasAssociatedWith
relations, modeling the two potentially distinct roles of a author and a
committer.</p>
      <p>
        These classes re ect the three use-case perspectives on provenance identi ed by
the W3C Provenance Primer [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]: object-oriented, process-oriented and
agentoriented.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Implementation</title>
      <p>Because we want our conversion tool to be as exible as possible, we chose
to build a RESTful git2prov Web Service for this purpose, using the Node.js7
framework. The service is available at the following URI: http://git2prov.
org/git2prov?gituri=&lt;your_git_uri&gt;.</p>
      <p>The only required input for this service is a URL giturl that refers to a git
repository. In this rst proof-of-concept implementation, only openly accessible
repositories are supported. However, adding support for secure repositories is
part of our future work. In addition to giturl, the service accepts a number of
optional parameters, with the default value in bold:
serialization (possible values: [PROV-N, PROV-O, PROV-JSON,
PROV</p>
      <p>XML]) This parameter is used to specify the desired PROV serialization.
shortHashes (possible values: [false, true]) This parameter forces the service
to use the short commit hash in the exported provenance, to increase
readability for human users
7 http://nodejs.org
ignore (possible values: a provenance relation) This parameter is used to lter
the speci ed relation from the converted provenance.</p>
      <p>Note that each provenance document generated by the git2prov service includes
a link to the complete document (without any restricting parameters).</p>
      <p>Upon receiving a request, the service clones the git repository to a temporary
location, and performs a git log command on it. The output of this log is then
mapped to PROV as described in Sect. 3, and written to the HTTP response
in the requested serialization. To demonstrate our service, we wrote a small
web application, available at http://git2prov.org. A video is also available at
http://vimeo.com/70980809.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and Future Work</title>
      <p>We believe that systems such as Git2PROV have the potential to become an
important enabler of the widespread interchange of standardized provenance. With
our proof-of-concept implementation, we have shown that it is certainly feasible
to build a lightweight RESTful Web service to convert versioning systems into
PROV. In future work, we aim to improve our work by including more semantic
annotations in combination with the provenance to allow further reasoning over
it, with the prospect of deriving trust assessments.</p>
      <p>Acknowledgements These research activities were funded by Ghent
University, iMinds, the IWT Flanders, the FWO-Flanders, and the European Union, as
well as the Data2Semantics project in the Dutch national program COMMIT.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Daniel</given-names>
            <surname>Garijo</surname>
          </string-name>
          , K.E.: Dublin core to prov mapping - w3c working group note
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>De</given-names>
            <surname>Nies</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Coppens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Verborgh</surname>
          </string-name>
          ,
          <string-name>
            <surname>R.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Vander</given-names>
            <surname>Sande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Mannens</surname>
          </string-name>
          , E., Van de Walle, R.,
          <string-name>
            <surname>Michaelides</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moreau</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Easy Access to Provenance: an Essential Step Towards Trust on the Web</article-title>
          .
          <source>In: METHOD</source>
          <year>2013</year>
          , Kyoto, Japan (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Gil</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miles</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , et al.:
          <article-title>PROV Model Primer</article-title>
          . W3C Working Group Note (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Groth</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Moreau</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>PROV-Overview: An Overview of the PROV Family of Documents</article-title>
          . W3C Working Group Note (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Groth</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gil</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Editorial - using provenance in the semantic web</article-title>
          .
          <source>Web Semantics: Science, Services and Agents on the World Wide Web</source>
          <volume>9</volume>
          (
          <issue>2</issue>
          ) (
          <year>2011</year>
          ), http://www.websemanticsjournal.org/index.php/ps/article/view/196
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Loeliger</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          :
          <article-title>Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development</article-title>
          .
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          , Inc. (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Moreau</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Missier</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          , (Eds.) et al:
          <article-title>PROV-DM: The PROV Data Model</article-title>
          .
          <source>W3C Recommendation</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Moreau</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>The foundations for provenance on the web</article-title>
          .
          <source>Foundations and Trends in Web Science</source>
          <volume>2</volume>
          (
          <issue>2</issue>
          {3),
          <volume>99</volume>
          {
          <fpage>241</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Orlandi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Passant</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Modelling provenance of DBpedia resources using wikipedia contributions</article-title>
          .
          <source>Web</source>
          Semantics pp.
          <volume>149</volume>
          {
          <issue>164</issue>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Rochkind</surname>
            ,
            <given-names>M.J.:</given-names>
          </string-name>
          <article-title>The source code control system</article-title>
          .
          <source>Software Engineering, IEEE Transactions on (4)</source>
          ,
          <volume>364</volume>
          {
          <fpage>370</fpage>
          (
          <year>1975</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>