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

unify terminology for triples #158

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

unify terminology for triples #158

wants to merge 7 commits into from

Conversation

pchampin
Copy link
Contributor

@pchampin pchampin commented Feb 13, 2025

redefine "RDF triple" so that "triple term" and "asserted triple" are two different roles for triples,
rather than objects of different nature, per my action w3c/rdf-star-wg#145.

This also induced some changes in Section 1 "Introduction", but the rest of the text works well with this change.


Preview | Diff

redefine "RDF triple" so that "triple term" and "asserted triple"
are two different roles for triples,
rather than objects of different nature.

This also induced some changes in Section 1 "Introduction",
but the rest of the text works well with this change.
@pchampin pchampin changed the title address w3c/rdf-star-wg#145 unify terminology for triples Feb 13, 2025
@pchampin
Copy link
Contributor Author

@franconi @pfps @doerthe I took the initiative to redefine "appears in" in RDF-concepts, while defining triple terms.
It seems that this is the natural "home" for this definition (also, because 'unstar' will need it, eventually).

https://pr-preview.s3.amazonaws.com/w3c/rdf-concepts/pull/158.html#dfn-appear

There is one change compared to the one that his currently in RDF-Semantics:
it first defines "term appears in triple", then extends it to "term appears in graph", and "triple appears in graph" (as asserted or triple-term).

WDYT?

@franconi
Copy link

The terminology defined in issue #87 and PR #91 (In Semantics) should be used to support the unification of the terminology of triples.

@franconi
Copy link

@franconi @pfps @doerthe I took the initiative to redefine "appears in" in RDF-concepts, while defining triple terms. It seems that this is the natural "home" for this definition (also, because 'unstar' will need it, eventually).

https://pr-preview.s3.amazonaws.com/w3c/rdf-concepts/pull/158.html#dfn-appear

There is one change compared to the one that his currently in RDF-Semantics: it first defines "term appears in triple", then extends it to "term appears in graph", and "triple appears in graph" (as asserted or triple-term).

WDYT?

I'd use "inductively" instead of "recursively".

Copy link
Member

@gkellogg gkellogg left a comment

Choose a reason for hiding this comment

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

LGTM

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

@afs afs left a comment

Choose a reason for hiding this comment

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

@pchampin
Copy link
Contributor Author

@franconi

The terminology defined in issue #87 and PR #91 (In Semantics) should be used to support the unification of the terminology of triples.

This was partially done: Section 1.8 now states that "An RDF triple encodes a proposition" (it used to say "statement").

I didn't introduce the term "fact", partly because I was under the impression that it was still disputed, partly because I didn't find any natural place to introduce it.

@afs
Copy link
Contributor

afs commented Feb 14, 2025

"fact" would work for me. "facts" can be disputed etc.

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.

Small things.

spec/index.html Outdated Show resolved Hide resolved
spec/index.html Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
Co-authored-by: Ted Thibodeau Jr <[email protected]>
@TallTed
Copy link
Member

TallTed commented Feb 17, 2025

I will live with "facts". It still doesn't make me happy, and I have hopes that someone will have a brilliant better idea, some day. But I won't block on that basis.

@afs
Copy link
Contributor

afs commented Feb 18, 2025

The new "triples" section is doing a lot of work. Because triples-as-objects are new to RDF 1.2, the all-in-one triples section
makes it look like a bigger change than it is. The core idea of triples hasn't changed.

"triple term" and "asserted triple" are two different roles for triples,

There could still be a section on "Triple terms", starting

"""
An RDF triple used as the object of another triple is called a triple term.
"""

then that section includes term equality for triple terms (#154) and the second ("rdf:reifies") notes.

Should there be a subsection "Graphs"?

At the moment there is intro one line. A graph subsection would include "set of nodes" and "appears" and "graph comparison".

The "3. Graphs" text would be introducing the section, and maybe the place define "RDF term".

@pchampin
Copy link
Contributor Author

@afs I like your suggestions, but do we agree that they should not hold this PR? (given that you have approved the PR, I assume we agree on this, but just checking)

@doerthe
Copy link

doerthe commented Feb 18, 2025

I am fine with the changes, only wonder whether that means that we need to extend the definition for symmetric RDF as we use it in RDF semantics. Or should we do that here?

Copy link
Contributor

@afs afs left a comment

Choose a reason for hiding this comment

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

@afs I like your suggestions, but do we agree that they should not hold this PR? (given that you have approved the PR, I assume we agree on this, but just checking)

That was before I saw the impact of triple term equality - part of what makes the "triples" section bigger.

I'm not blocking this merging. If it is only as an intermediate, and removes the "triple term" section, which goes back in again, it might be easier to sketch the final form here first.

@afs
Copy link
Contributor

afs commented Feb 18, 2025

I am fine with the changes, only wonder whether that means that we need to extend the definition for symmetric RDF as we use it in RDF semantics. Or should we do that here?

We should take that discussion to a separate issue.

At
https://www.w3.org/TR/rdf12-semantics/#:~:text=ex%3Ad%20_%3Ab%20ex%3Ac%20.%20by%20rdfs7
(Appendix A - non-normative) there is a blank node in the predicate position which isn't symmetric RDF (as it is today).

https://www.w3.org/TR/rdf12-semantics/#notation talks about generalized RDF.

@pchampin
Copy link
Contributor Author

I am fine with the changes, only wonder whether that means that we need to extend the definition for symmetric RDF as we use it in RDF semantics. Or should we do that here?

In my opinion the definitions of symmetric/generalized RDF do not need to be changed. They still "work" with the new perspective on triples/triple terms/asserted triples.

This also creates a new 'RDF Terms' section,
preceding the IRIs, Literals, Blank nodes and Triple terms sections,
containing some general definitions about terms.
@pchampin
Copy link
Contributor Author

If it is only as an intermediate, and removes the "triple term" section, which goes back in again, it might be easier to sketch the final form here first.

Fair enough. I just pushed a change, which is exclusively moving text, without changing it (with one exception, see below).

The text that was before in the 'Triples' section is now moved as follows:

  • the definition of 'asserted triple' is now introduced just after the definition of RDF graph
  • the generic notions about terms ('RDF term', 'nodes', terms are distinguishable) are now in a new 'RDF Terms' section, before the 'IRI' section
  • the definition of 'triple term' and 'appears', as well as the note recommending to only use triple terms with rdf:reifies, are now in the resurrected 'Triple terms' section

The only change in the text is in the note about recursive triples not allowing cycles: it was talking about "triple terms", now talks about "triples" (in fact, I should have done this change before).

Re-requesting reviews.

@pchampin pchampin requested review from afs, hartig and gkellogg February 18, 2025 12:01
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 moving things around as done in the last commit.

I have only two minor issues that are easily fixed.

spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
@doerthe
Copy link

doerthe commented Feb 18, 2025

I am fine with the changes, only wonder whether that means that we need to extend the definition for symmetric RDF as we use it in RDF semantics. Or should we do that here?

In my opinion the definitions of symmetric/generalized RDF do not need to be changed. They still "work" with the new perspective on triples/triple terms/asserted triples.

I agree, my concern was different: we defined the notion of "appears in" to deal with the entailment patterns which assume symmetric RDF. Now, after we moved that definition to RDF concepts, it does not cover the case that triple terms could occur in subject position. My question was now: how do we best deal with that detail?

@pchampin
Copy link
Contributor Author

pchampin commented Feb 18, 2025

we defined the notion of "appears in" to deal with the entailment patterns which assume symmetric RDF. Now, after we moved that definition to RDF concepts, it does not cover the case that triple terms could occur in subject position. My question was now: how do we best deal with that detail?

oh! Now I get it. 🫤
The way I see it, either we extend the definition of "appears in" in Section 7, or RDF-Semantics extends the definition of appears in for its own purpose. I slightly prefer the latter option. (edited: I found a third option that I like even more, see my next comment)

@pchampin
Copy link
Contributor Author

pchampin commented Feb 18, 2025

The way I see it, either we extend the definition of "appears in" in Section 7, or RDF-Semantics extends the definition of appears in for its own purpose. I slightly prefer the latter option.

In fact, another option is to make the definition of "appears" more general (which is how it is defined in RDF-Semantics), i.e. replacing

If the object o of t is a triple term, any RDF term appearing in o also appears in t.

with

If a triple term t2 appear in t, then any RDF term appearing in t2 also appears in t.

This is maybe a little less legible, but generalizes nicely to symmetric and generalized RDF.

@doerthe
Copy link

doerthe commented Feb 18, 2025

I like that option.

@hartig
Copy link
Contributor

hartig commented Feb 18, 2025

I am happy with that option as well.

@pchampin
Copy link
Contributor Author

pchampin commented Feb 18, 2025

I like that option.

I am happy with that option as well.

Done :) (in the commit just below)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants