PROV-DM is a data model for provenance that describes the entities, people and activities involved in producing a piece of data or thing in the world. PROV-DM is domain-agnostic, but is equipped with extensibility points allowing further domain-specific and application-specific extensions to be defined. PROV-DM is accompanied by PROV-N, a technology-independent notation, which allows serializations of PROV-DM instances to be created for human consumption, which facilitates the mapping of PROV-DM to concrete syntax, and which is used as the basis for a formal semantics of PROV-DM. The purpose of this document is to define the PROV-N notation.
Provenance is defined as a record that describes the people, institutions, entities, and activities, involved in producing, influencing, or delivering a piece of data or a thing in the world. Two companion specifications respectively define PROV-DM, a data model for provenance, allowing such descriptions to be expressed [[PROV-DM]] and a set of constraints that provenance descriptions are expectively to satisfy [[PROV-DM-CONSTRAINTS]].
In this context, PROV-N was introduced as a notation to write instances of the data model, as close to its abstract syntax as possible. PROV-N is primarily aimed at human consumption. PROV-N allows serializations of PROV-DM instances to be written in a technology independent manner. So far, PROV-N has been used in the following ways:
PROV-N was designed to be as close as possible to PROV-DM without the syntactic bias and modelling constraints that concrete technologies bring with them, e.g., XML's choice between attribute and element, RDF's reliance on triples, or JSON's usage of dictionaries.
The purpose of this document is solely to define the syntax of PROV-N. For each construct of PROV-DM, a corresponding PROV-N expression is introduced, by way of a production in the PROV-N grammar presented in this document.
This specification is one of several specifications, referred to as the PROV family of specifications, defining the various aspects that are necessary to achieve the vision of inter-operable exchange of provenance:
The PROV-DM namespace is http://www.w3.org/ns/prov/.
All the elements, relations, reserved names and attributes introduced in this specification belong to the PROV-DM namespace.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [[!RFC2119]].
A key goal of PROV-DM is the specification of a machine-processable data model for provenance so that application having obtained the provenance of the resource they manipulate can reason about such provenance. As such, representations of PROV-DM are available in RDF and XML.
However, communicating provenance between humans is also important when teaching, illustrating, formalizing, and discussing provenance-related issues. To this end, PROV-N is a notation that is designed to write instances of the PROV-DM data model in a compact textual form, without the syntactic bagage and constraints coming with a markup language such as XML or a description framework such as RDF.
wasDerivedFrom(e2, e1, a, g2, u1)
PROV-N optional arguments need not be specified (when this does not lead to ambiguity).
The activity, generation, and usage are specified in the first derivation, whereas they are not in the second.
wasDerivedFrom(e2, e1, a, g2, u1) wasDerivedFrom(e2, e1)
Activity a1 does not have start and end times specified, whereas a2 does
activity(a1) activity(a2, 2011-11-16T16:00:00, 2011-11-16T16:00:01)
For cases where it is desirable to indicate which arguments have not been specified, PROV-N uses the syntactic marker - for unspecified arguments.
The activity, generation, and usage are specified in the first derivation, whereas they are not in the second, but have been explicitly marked as such.
wasDerivedFrom(e2, e1, a, g2, u1) wasDerivedFrom(e2, e1, a, -, -) wasDerivedFrom(e2, e1, -, -, -)
Activity a1 does not have start and end times specified, but they are been marked syntactically.
activity(a1, -, -) activity(a2, 2011-11-16T16:00:00, 2011-11-16T16:00:01)
The identifier always occur in first position. For expressions with optional identifier, it may be expressed by the syntactic marker -.
Derivation has an optional identifier. In the first derivation, the identifier is not expressed. It is explicit in the second, and marked by a - in the third.
wasDerivedFrom(e2, e1) wasDerivedFrom(d, e2, e1) wasDerivedFrom(-, e2, e1)
Most expressions have an optional set of attribute-value pairs, which occur in last position, and delimited by square brackets.
activity(ex:a10) activity(ex:a10, []) activity(ex:a10, [prov:type="createFile"]) activity(ex:a10, [ex:param="a", ex:param="b"])
This specification includes a grammar for PROV-N expressed using the Extended Backus-Naur Form (EBNF) notation.
Each production rule (or production, for short) in the grammar defines one non-terminal symbol, in the form:
E ::= expression
Within the expression on the right-hand side of a rule, the following expressions are used to match strings of one or more characters:A PROV-N document allows writing down instances of the PROV-DM data model in a compact textual form. It consists of a sequence of expressions.
Instances of the PROV-DM data model are expressed in PROV-N by a text conformant with the toplevel production expression of the grammar.
expression
::= |
entityExpression
| activityExpression
| generationExpression
| usageExpression
| startExpression | endExpression | communicationExpression | startByActivityExpression | agentExpression | attributionExpression | associationExpression | responsibilityExpression | derivationExpression | revisionExpression | quotationExpression | hadOriginalSourceExpression | traceabilityExpression | alternateExpression | specializationExpression | noteExpression | annotationExpression |
An entity's text matches the entityExpression production.
entity(tr:WD-prov-dm-20111215) entity(tr:WD-prov-dm-20111215, [ prov:type="document" ]) entity(tr:WD-prov-dm-20111215, [ prov:type="document", ex:version=2 ])
An activity's text matches the activityExpression production.
activity(ex:a10) activity(ex:a10, -, -) activity(ex:a10, -, -, [prov:type="edit"]) activity(ex:a10, -, 2011-11-16T16:00:00) activity(ex:a10, 2011-11-16T16:00:00, -) activity(ex:a10, 2011-11-16T16:00:00, -, [prov:type="createFile"]) activity(ex:a10, 2011-11-16T16:00:00, 2011-11-16T16:00:01, [prov:type="createFile"]) activity(ex:a10, [prov:type="edit"])
A generation's text matches the generationExpression production.
wasGeneratedBy(tr:WD-prov-dm-20111215, ex:edit1, -) wasGeneratedBy(tr:WD-prov-dm-20111215, ex:edit1, 2011-11-16T16:00:00) wasGeneratedBy(e2, a1, -, [ex:fct="save"]) wasGeneratedBy(e2, -, -, [ex:fct="save"]) wasGeneratedBy(ex:g1, tr:WD-prov-dm-20111215, ex:edit1, -) wasGeneratedBy(ex:g1, tr:WD-prov-dm-20111215, ex:edit1, 2011-11-16T16:00:00) wasGeneratedBy(-, tr:WD-prov-dm-20111215, ex:edit1, -)
Even though the production generationExpression allows for expressions wasGeneratedBy(e2, -, -) and wasGeneratedBy(-, e2, -, -), these expressions are not valid in PROV-N.
A usage's text matches the usageExpression production.
used(ex:act2, ar3:0111, -) used(ex:act2, ar3:0111, 2011-11-16T16:00:00) used(a1,e1, -, [ex:fct="load"]) used(ex:u1, ex:act2, ar3:0111, -) used(-, ex:act2, ar3:0111, -)
Even though the production usageExpression allows for expressions used(e2, -, -) and used(-, e2, -, -), these expressions are not valid in PROV-N.
An activity start's text matches the startExpression production of the grammar
wasStartedBy(ex:act2, ar3:0111, -) wasStartedBy(ex:act2, ar3:0111, 2011-11-16T16:00:00) wasStartedBy(ex:act2, -, 2011-11-16T16:00:00) wasStartedBy(ex:act2, -, -) wasStartedBy(ex:act2, -, -, [ex:param="a"]) wasStartedBy(s, ex:act2, ar3:0111, 2011-11-16T16:00:00) wasStartedBy(-, ex:act2, ar3:0111, 2011-11-16T16:00:00)
Even though the production startExpression allows for expressions wasStartedBy(e2, -, -) and wasStartedBy(-, e2, -, -), these expressions are not valid in PROV-N.
An activity end's text matches the endExpression production of the grammar.
wasEndedBy(ex:act2, ex:trigger, -) wasEndedBy(ex:act2, ex:trigger, 2011-11-16T16:00:00) wasEndedBy(ex:act2, -, 2011-11-16T16:00:00) wasEndedBy(ex:act2, -, 2011-11-16T16:00:00, [ex:param="a"]) wasEndedBy(e,ex:act2, -, -) wasEndedBy(e, ex:act2, ex:trigger, 2011-11-16T16:00:00) wasEndedBy(-, ex:act2, ex:trigger, 2011-11-16T16:00:00)
Even though the production endExpression allows for expressions wasEndedBy(e2, -, -) and wasEndedBy(-, e2, -, -), these expressions are not valid in PROV-N.
wasInformedBy(ex:a1, ex:a2) wasInformedBy(ex:a1, ex:a2, [ex:param1="a", ex:param2="b"]) wasInformedBy(i, ex:a1, ex:a2) wasInformedBy(i, ex:a1, ex:a2, [ex:param1="a", ex:param2="b"]) wasInformedBy(-, ex:a1, ex:a2) wasInformedBy(-, ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
wasStartedByActivity(ex:a1, ex:a2) wasStartedByActivity(ex:a1, ex:a2, [ex:param1="a", ex:param2="b"]) wasStartedByActivity(s,ex:a1, ex:a2) wasStartedByActivity(s,ex:a1, ex:a2, [ex:param1="a", ex:param2="b"]) wasStartedByActivity(-,ex:a1, ex:a2) wasStartedByActivity(-,ex:a1, ex:a2, [ex:param1="a", ex:param2="b"])
An agent's text matches the agentExpression production.
agent(ag4) agent(ag4, [ prov:type="prov:Person" %% xsd:QName, ex:name="David" ])
wasAttributedTo(e,ag) wasAttributedTo(e,ag,[ex:license="cc:attributionURL" %% "xsd:QName"]) wasAttributedTo(id,e,ag,[ex:license="cc:attributionURL" %% "xsd:QName"]) wasAttributedTo(-,e,ag,[ex:license="cc:attributionURL" %% "xsd:QName"])
An association's text matches the activityAssociationExpression productions of the grammar defined in this specification document.
wasAssociatedWith(ex:a1, -, ex:e1) wasAssociatedWith(ex:a1, ex:ag1, -) wasAssociatedWith(ex:a1, ex:ag1, ex:e1) wasAssociatedWith(ex:a1, ex:ag1, ex:e1, [ex:param1="a", ex:param2="b"]) wasAssociatedWith(a, ex:a1, -, ex:e1) wasAssociatedWith(-, ex:a1, -, ex:e1) wasAssociatedWith(-, ex:a1, ex:ag1, -)
Even though the production associationExpression allows for expressions wasAssociatedWith(a, -, -) and wasAssociatiedWith(-, a, -, -), these expressions are not valid in PROV-N.
actedOnBehalfOf(ag1, ag2, -) actedOnBehalfOf(ag1, ag2, a) actedOnBehalfOf(ag1, ag2, -, [prov:type="delegation"]) actedOnBehalfOf(ag2, ag3, a, [prov:type="contract"]) actedOnBehalfOf(r, ag2, ag3, a, [prov:type="contract"]) actedOnBehalfOf(-, ag1, ag2, -)
A derivation expression's text matches the derivationExpression production.
wasDerivedFrom(e2, e1) wasDerivedFrom(e2, e1, a, g2, u1) wasDerivedFrom(e2, e1, -, g2, u1) wasDerivedFrom(e2, e1, a, -, u1) wasDerivedFrom(e2, e1, a, g2, -) wasDerivedFrom(e2, e1, a, -, -) wasDerivedFrom(e2, e1, -, -, u1) wasDerivedFrom(e2, e1, -, -, -) wasDerivedFrom(d, e2, e1, a, g2, u1) wasDerivedFrom(-, e2, e1, a, g2, u1)
wasRevisionOf(tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -) wasRevisionOf(tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, w3:Consortium) wasRevisionOf(id,tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, w3:Consortium) wasRevisionOf(tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -) wasRevisionOf(id,tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -) wasRevisionOf(-,tr:WD-prov-dm-20111215, tr:WD-prov-dm-20111018, -)
A quotation expression's text matches the quotationExpression production of the grammar.
wasQuotedFrom(ex:blockQuote,ex:blog) wasQuotedFrom(ex:blockQuote,ex:blog,ex:Luc,ex:Paul) wasQuotedFrom(ex:blockQuote,ex:blog,-,ex:Paul) wasQuotedFrom(ex:blockQuote,ex:blog,ex:Luc,ex:Paul,[]) wasQuotedFrom(ex:blockQuote,ex:blog, -, -) wasQuotedFrom(id,ex:blockQuote,ex:blog,ex:Luc,ex:Paul) wasQuotedFrom(-,ex:blockQuote,ex:blog,ex:Luc,-)
An original source record's text matches the originalSourceExpression production of the grammar.
hadOriginalSource(ex:e1, ex:e2) hadOriginalSource(ex:e1, ex:e2,[ex:param="a"]) hadOriginalSource(-,ex:e1, ex:e2,[ex:param="a"]) hadOriginalSource(-,ex:e1, ex:e2)
A traceability expression's text matches the traceabilityExpression production of the grammar.
tracedTo(e2,e1) tracedTo(e2,e1,[ex:param="a"]) tracedTo(id,e2,e1,[ex:param="a"]) tracedTo(-,e2,e1)
An alternate relation's text matches the alternateExpression production.
alternateOf(tr:WD-prov-dm-20111215,ex:alternate-20111215)
A specialization relation's text matches the specializationExpression production.
specializationOf(tr:WD-prov-dm-20111215,tr:prov-dm)
derivedByInsertionFrom(id, c1, c, "k1", v1) derivedByInsertionFrom(id, c1, c, "k1", v1, [])
derivedByRemovalFrom(id, c1, c, "k1") derivedByRemovalFrom(id, c1, c, "k1", [])
contained(id, c, "k", v) contained(id, c, "k", v,[])
derivedByBulkInsertionFrom(c1, c, {("k1", v1), ("k2", v2)}) derivedByBulkInsertionFrom(c1, c, {("k1", v1), ("k2", v2)}), []
A Derivation-by-Bulk-Removal relation's text matches the derivationByBulkRemovalFromExpression production.
derivedByBulkRemovalFrom(c3, c1, {"k1", "k3"}) derivedByBulkRemovalFrom(c3, c1, {"k1", "k3"}, [])
A Bulk-Containment relation's text matches the containedBulkExpression production.
containedBulk(c3, {("k4", v4), ("k5", v5)}) containedBulk(c3, {("k4", v4), ("k5", v5)},[])
A note's text matches the noteExpression production.
note(ann1,[ex:color="blue", ex:screenX=20, ex:screenY=30])
A note's text matches the noteExpression production.
hasAnnotation(tr:WD-prov-dm-20111215,ex2:n1)
In PROV-N, the prefix prov is reserved and denotes the PROV namespace.
An attribute's text matches the attribute production.
The reserved attributes in the PROV namespace are the following.
A Literal's text matches the Literal production.
The non terminals stringLiteral and intLiteral are syntactic sugar for quoted strings with datatype xsd:string and xsd:int, respectively.
In particular, a PROV-DM Literal may be an IRI-typed string (with datatype xsd:anyURI); such IRI has no specific interpretation in the context of PROV-DM.
The reserved type values in the PROV namespace are the following.
Time instants are defined according to xsd:dateTime [[!XMLSCHEMA-2]].
An expression container is a house-keeping construct of PROV-N capable of packaging up PROV-N expressions and namespace declarations. An expression container forms a self-contained package of provenance descriptions for the purpose of exchanging them. An expression container may be used to package up PROV-N expressions in response to a request for the provenance of something ([[PROV-AQ]]).
Given its status of house keeping construct for the purpose of exchanging provenance expressions, an expression container is not defined as a PROV-N expression (production expression).
An expression container, written container decls exprs endContainer in PROV-N, contains:
An expression container's text matches the expressionContainer production.
The following container contains expressions related to the provenance of entity e2.
container prefix ex: http://example.org/, entity(e2, [ prov:type="File", ex:path="/shared/crime.txt", ex:creator="Alice", ex:content="There was a lot of crime in London last month."]) activity(a1, 2011-11-16T16:05:00,,[prov:type="edit"]) wasGeneratedBy(e2, a1, [ex:fct="save"]) wasAssociatedWith(a1, ag2, [prov:role="author"]) agent(ag2, [ prov:type="prov:Person" %% xsd:QName, ex:name="Bob" ]) endContainer
This container could for instance be returned as the result of a query to a provenance store for the provenance of entity e2 [[PROV-AQ]].
PROV-DM has introduced a notion of account by which a set of provenance descriptions can be bundled up and named. PROV-DM assumes the existence of mechanisms to implement accounts, but such mechanisms remain outside its scope. It is suggested that specific serializations may offer solutions to name bundles of descriptions.
Given that the primary motivation for PROV-N is to provide a notation aimed at human consumption, it is therefore appropriate to introduce a notation for accounts, which would include an account name and a bundle of expressions.
An account, written account(id, exprs) in PROV-N, contains:
In PROV-N, an account's text matches the accountExpression production of the grammar.
It is also useful to package up one or more account expressions in an expression container, for interchange purpose. Hence, expressionContainer is revised as follows.
The following container
container prefix ex: http://example.org/, account(ex:acc1,...) account(ex:acc2,...) endContainer
illustrates how two accounts with identifiers ex:acc1 and ex:acc2 can be returned in a PROV-N serialization of the provenance of something.
The following container
container prefix ex: http://example.org/, ... account(ex:acc1, entity(tr:WD-prov-dm-20111018, [ prov:type="pr:RecsWD" %% xsd:QName ]) entity(tr:WD-prov-dm-20111215, [ prov:type="pr:RecsWD" %% xsd:QName ]) ... wasAssociatedWith(ex:pub2, w3:Consortium @ pr:rec-advance)) account(ex:acc2, entity(ex:acc1, [prov:type="prov:AccountEntity" %% xsd:QName ]) wasAttributedTo(ex1:acc1,w3:Consortium)) endContainer
illustrates a first account, with identifier ex:acc1, containing expressions describing the provenance of the technical report tr:WD-prov-dm-20111215, and a second account ex:acc2, describing the provenance of the first. In account ex:acc2, ex:acc1 is the identifier of an entity of type prov:AccountEntity.