Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an informative definition for "reifying triple". #98

Merged
merged 6 commits into from
Aug 22, 2024

Conversation

gkellogg
Copy link
Member

@gkellogg gkellogg commented Aug 12, 2024

The term is referenced from Turtle, and likely will be from other specifications with a concrete syntax.


Preview | Diff

@gkellogg gkellogg added the spec:editorial Minor change in the specification (markup, typo, informative text; class 1 or 2) label Aug 12, 2024
spec/index.html Outdated
Comment on lines 189 to 190
<p>A <a>triple term</a> can be used as the object of a <a>triple</a> with the predicate <code>rdf:reifies</code>,
called a <dfn>reified triple</dfn>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear from this text what exactly it is that is called a reified triple. Is it any triple term that is used as the object of a triple with the predicate rdf:reifies? Or is it any triple term, no matter where it is used? Or is it a triple with the predicate rdf:reifies and a triple term in its object position?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence begins "A triple term can be used as the object of a triple with the predicate rdf:reifies. It is such a triple which is called a "reified triple". Maybe the following makes it more clear:

Suggested change
<p>A <a>triple term</a> can be used as the object of a <a>triple</a> with the predicate <code>rdf:reifies</code>,
called a <dfn>reified triple</dfn>.
<p>A <a>triple term</a> can be used as the object of a <a>triple</a> with the predicate <code>rdf:reifies</code>,
such a triple is called a <dfn>reified triple</dfn>.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also struggling with this. If what I think it's saying is what it's saying, I think we've got to change some things.

Is this meant to say that the "reified triple" is the triple that could be inserted if the triple term were deconstructed, or that the "reified triple" is the triple that has rdf:reifies for a predicate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it pretty plainly says that a triple with predicate rdf:reifies and a triple term object is a "reified triple". This is consistent with the reifiedTriple production in Turtle, and is how we encourage people to actually use triple terms. If you have a suggested improvement to the wording, then please suggest away.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkellogg thanks for the clarification about the target of the definition! In this case, calling such a triple (that has the predicate rdf:reifies and a triple term object) a "reified triple" does not sound right. More specifically, I wouldn't use the adjective "reified" for such a triple because that triple is not reified. Instead, that triple establishes/expresses the reification. Therefore, calling it "reifying triple" or "reification triple" sounds better to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've been using the term "reified triple" for a while, but I'm happy to bikeshed it. The Turtle grammar rule is reifiedTriple, so we'll want to coordinate updating terminology.

A reified triple is represented using the reifiedTriple production starting with <<, followed by either a subject or reifiedTriple, a predicate, and a ttObject, followed by an optional reifier, composed of a ~ followed by an optional iri production or BlankNode production, and ending with >>. For example, << :subject :predicate :object ~ :IRIREF >>. If no reifiers are present, or a reifier is not immediately followed by an iri or BlankNode, a fresh RDF blank node is allocated, as with << :subject :predicate :object >>, or << :subject :predicate :object ~ >>.

reifiedTriple would have been short for reifiedTripleTerm, as the construct that relates a "reifier" with a "triple term". We should probably discuss on a call to get consensus on such terminology.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkellogg now you are confusing me completely :-/

According to your earlier comment above, "a triple with predicate rdf:reifies and a triple term object is a "reified triple"." So, I thought I had understood that the notion you are calling a "reified triple" is every RDF triple (s, p, o) such that p is the IRI rdf:reifies and o is a triple term.

Yet, now you have merged @TallTed's recent edit suggestion, according to which the word "reified triple" is meant to refer to a triple term o if o is the object of an RDF triple (s, p, o) with p=rdf:reifies. So, it is just the triple term that is called "reified triple"?

Your previous comment with the quote from Sec.2.10 of the new version of the Turtle doc increases the confusion by introducing yet another possible (and different!) meaning of the word "reified triple". Here, the word "reified triple" is introduced to refer to a particular form of notation/subexpressions to be used (at specific positions) within a Turtle file; namely, the subexpressions that are accepted by the reifiedTriple production. If that is indeed the intended meaning of the word "reified triple", then I wonder why this notion needs to be introduced in RDF Concepts, as it is something specific to a particular serialization format (or perhaps to a class of such formats). In this case, I also notice that the very first sentence of the aforementioned Sec.2.10 of TURTLE-12 is completely wrong in itself.

Which of these three concepts is it that you are calling a "reified triple".

  1. Is it an RDF triple (s, p, o) for which it holds that p is the IRI rdf:reifies and o is a triple term?
  2. Or is it a triple term that occurs as the object of an RDF triple that has rdf:reifies as it predicate?
  3. Or is it an expression that is accepted by the reifiedTriple production?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my mind,

  • The following are all reifications of the same reified triple, identifying it as :iri in the last, and as a blank node in the other three:

    • << :subject :predicate :object >>
    • << :subject :predicate :object ~ >>
    • << :subject :predicate :object ~ _:bn1 >>
    • << :subject :predicate :object ~ :iri >>

    The first two omit an identifier, and the latter two include an explicit identifier. All of these may appear in subject or object position (in at least some serializations); however, only the identifier gets written as a subject to the graph, always with a predicate of rdf:reifies and an object of the first form written in this bullet.

  • :a rdf:reifies << :subject :predicate :object >> is a reifying triple.

That seems to me to be what is said in the quoted block above, but it is not what is said by —

    <p>A <a>triple term</a> can be used as the object of a <a>triple</a> with the predicate <code>rdf:reifies</code>,
      called a <dfn>reified triple</dfn>.
Suggested change
<p>A <a>triple term</a> can be used as the object of a <a>triple</a> with the predicate <code>rdf:reifies</code>,
called a <dfn>reified triple</dfn>.
<p>A <a>triple term</a> can be used as the object of a <a>triple</a> with the predicate <code>rdf:reifies</code>,
upon which use the <a>triple term</a> may be called a <dfn>reified triple</dfn>.

I think the quoted block above must change, mostly as below, with the problem that reifier is now triply defined as

  • ~ {iri|blanknode|''}, i.e., including the tilde — when it's used within the << >> construct
  • {iri|blanknode|''} — when it's used as an identifier in subject or object position
  • [~](https://www.w3.org/TR/rdf12-turtle/#cp-tilde) — when it's not immediately followed by an iri production or a BlankNode production

I think the ~ must become a reifier delimiter when it's used to separate an object from a reifier (which must be either a uri production or BlankNode production), something like what I've tweaked the block to say:

A reified triple is represented using the reifiedTriple production starting with <<, followed by a subject, a predicate, and a ttObject, followed by an optional reifier, composed of a ~ followed by an optional iri production or BlankNode production, and ending with >>. For example, << :subject :predicate :object ~ :IRIREF >>. If no reifiers are present, or a reifier delimiter (tilde, ~) is not immediately followed by an iri or BlankNode, a fresh RDF blank node is allocated, as with << :subject :predicate :object >> or << :subject :predicate :object ~ >>.

(I've taken a couple days to write this, and I'm not sure I carried all my thoughts through to completion. Please ask, if anything seems unclear.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hartig wrote:

Yet, now you have merged @TallTed's recent edit suggestion, according to which the word "reified triple" is meant to refer to a triple term o if o is the object of an RDF triple (s, p, o) with p=rdf:reifies. So, it is just the triple term that is called "reified triple"?

Yes, that merge was too hasty, and is incorrect.

Your previous comment with the quote from Sec.2.10 of the new version of the Turtle doc increases the confusion by introducing yet another possible (and different!) meaning of the word "reified triple". Here, the word "reified triple" is introduced to refer to a particular form of notation/subexpressions to be used (at specific positions) within a Turtle file; namely, the subexpressions that are accepted by the reifiedTriple production. If that is indeed the intended meaning of the word "reified triple", then I wonder why this notion needs to be introduced in RDF Concepts, as it is something specific to a particular serialization format (or perhaps to a class of such formats). In this case, I also notice that the very first sentence of the aforementioned Sec.2.10 of TURTLE-12 is completely wrong in itself.

I expect most concrete syntaxes (RDF and SPARQL) to support a construct such as Turtle's reifiedTriple. I think it's an important concept, as is reifier, that may not have a direct impact on the abstract syntax, but is never-the-less an important RDF-star concept. We expect people to use reified triples to write statements about triples rather than using triple terms directly.

Which of these three concepts is it that you are calling a "reified triple".

  1. Is it an RDF triple (s, p, o) for which it holds that p is the IRI rdf:reifies and o is a triple term?
  2. Or is it a triple term that occurs as the object of an RDF triple that has rdf:reifies as it predicate?
  3. Or is it an expression that is accepted by the reifiedTriple production?

For RDF Concepts, it should be the first. The reifiedTriple production is Turtle's way of expressing that in syntax. Of course, the WG may ultimately decide to broaden this to rdf:reifies or a sub-property.

@TallTed wrote:

In my mind,

  • The following are all reifications of the same reified triple, identifying it as :iri in the last, and as a blank node in the other three:

    • << :subject :predicate :object >>
    • << :subject :predicate :object ~ >>
    • << :subject :predicate :object ~ _:bn1 >>
    • << :subject :predicate :object ~ :iri >>

    The first two omit an identifier, and the latter two include an explicit identifier. All of these may appear in subject or object position (in at least some serializations); however, only the identifier gets written as a subject to the graph, always with a predicate of rdf:reifies and an object of the first form written in this bullet.

Yes, that is correct for Turtle.

  • :a rdf:reifies << :subject :predicate :object >> is a reifying triple.

Not quite, as a triple term is written with <<( )>>, so it would rather be:

  • :a rdf:reifies <<( :subject :predicate :object )>> is a reifying triple.

Your suggested change above is not what I had in mind. My intention is that a "reified triple" is a triple using rdf:reifies where the object is a "triple term". It is not that triple term which is a reified triple.

I think the quoted block above must change, mostly as below, with the problem that reifier is now triply defined as

  • ~ {iri|blanknode|''}, i.e., including the tilde — when it's used within the << >> construct
  • {iri|blanknode|''} — when it's used as an identifier in subject or object position
  • [~](https://www.w3.org/TR/rdf12-turtle/#cp-tilde) — when it's not immediately followed by an iri production or a BlankNode production

These are syntactic constructs, much as an IRIREF in Turtle uses < and >, but is not part of the IRI itself, the reifier production defines a reifier for which the tilde is a syntactic component.

I think the ~ must become a reifier delimiter when it's used to separate an object from a reifier (which must be either a uri production or BlankNode production), something like what I've tweaked the block to say:

The really belongs in the Turtle repo, not Concepts, but I don't see why we would explicitly name tilde as a reifier delimiter any more than we would name < and > as IRI delimiters.

spec/index.html Outdated Show resolved Hide resolved
Copy link
Member

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

spec/index.html Outdated Show resolved Hide resolved
gkellogg and others added 2 commits August 12, 2024 13:24
Co-authored-by: Olaf Hartig <olaf.hartig@liu.se>
@gkellogg gkellogg added the needs discussion Proposed for discussion in an upcoming meeting label Aug 13, 2024
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@TallTed
Copy link
Member

TallTed commented Aug 14, 2024

Given that we're using English words to construct our predicates, we should use the English meanings of those words.

On that basis, a reified triple is a triple which has been reified; a reified triple is NOT a triple which reifies another triple. The latter is a reifying triple, i.e., a triple which reifies, using the rdf:reifies predicate.

Not quite, as a triple term is written with <<( )>>

Much text has fallen out of sync. I quoted a triple term which had been written as << >>, not <<( )>>, as well as the detailed description of constructing that triple term which ended with the full example, << :subject :predicate :object ~ :IRIREF >>. Yes, the detailed description (which I did not author though I'm sure I commented on it) needs the parentheses characters ( ) to be added within the double-angle-brackets << >>, whether or not the other changes I've suggested are applied.

The really belongs in the Turtle repo, not Concepts, but I don't see why we would explicitly name tilde as a reifier delimiter any more than we would name < and > as IRI delimiters.

When talking about reifiers in text, we must distinguish between the "optional iri production or BlankNode production" and the tilde that precedes them, because when we later want to talk about the reifier, we will mean the iri production or the BlankNode production; we will not mean the ~ plus the iri production or BlankNode production.

...And we should distinguish between the angle brackets < > or parentheses ( ) or even just spaces in which we wrap an IRI, and the IRI itself; i.e., <http://example.com/> is not an IRI — it's an < >-wrapped (or < >-delimited) IRI — the IRI is just http://example.com/, around which we often put some (optional!) wrapper (or delimiter) to make it more human-friendly, as it is thus more visibly distinct from the text in which it appears. This is entirely distinct from and unlike the required ~ in triple reification, which is as much (if not more) for the machine as it is for the human, as we have made it a mandatory separator between the object and the reifier.

@gkellogg
Copy link
Member Author

I've updated the terminology to use "reffing triple", which will require a corresponding change in w3c/rdf-turtle#62.

When talking about reifiers in text, we must distinguish between the "optional iri production or BlankNode production" and the tilde that precedes them, because when we later want to talk about the reifier, we will mean the iri production or the BlankNode production; we will not mean the ~ plus the iri production or BlankNode production.

...And we should distinguish between the angle brackets < > or parentheses ( ) or even just spaces in which we wrap an IRI, and the IRI itself; i.e., <http://example.com/> is not an IRI — it's an < >-wrapped (or < >-delimited) IRI — the IRI is just http://example.com/, around which we often put some (optional!) wrapper (or delimiter) to make it more human-friendly, as it is thus more visibly distinct from the text in which it appears. This is entirely distinct from and unlike the required ~ in triple reification, which is as much (if not more) for the machine as it is for the human, as we have made it a mandatory separator between the object and the reifier.

Please consider creating an issue on Turtle for these points. I don't think I agree with your reasoning, as other productions such as IRIREF and LANG_DIR (and many others) include delimiters which are not part of the semantic entity.

spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@gkellogg gkellogg changed the title Add an informative definition for "reified triple". Add an informative definition for "reifying triple". Aug 14, 2024
@gkellogg gkellogg changed the title Add an informative definition for "reifying triple". Add an informative definition for "reified triple". Aug 14, 2024
@TallTed
Copy link
Member

TallTed commented Aug 15, 2024

The informative definition is of "reifying triple", not "reified triple" (which string does not exist in the PR). I would re-change the title accordingly, if I had that power.

@gkellogg gkellogg changed the title Add an informative definition for "reified triple". Add an informative definition for "reifying triple". Aug 15, 2024
@gkellogg gkellogg requested a review from hartig August 15, 2024 16:55
Copy link
Contributor

@hartig hartig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with the PR in its current form.

@gkellogg gkellogg merged commit eefa2a6 into main Aug 22, 2024
2 checks passed
@gkellogg gkellogg deleted the define-reified-triple branch August 22, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Proposed for discussion in an upcoming meeting spec:editorial Minor change in the specification (markup, typo, informative text; class 1 or 2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants