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

Define an interpretation of Triple Terms #49

Open
niklasl opened this issue Sep 25, 2024 · 6 comments
Open

Define an interpretation of Triple Terms #49

niklasl opened this issue Sep 25, 2024 · 6 comments
Labels
needs discussion Proposed for discussion in an upcoming meeting

Comments

@niklasl
Copy link

niklasl commented Sep 25, 2024

Triple terms are new in RDF 1.2. Both formally, and in order to leverage implementations adhering to the existing RDFS and OWL 2 standards, an interpretation of triple terms that entails relations to its constituent terms appears to be needed.

An example of this need is illustrated in w3c/rdf-ucr#27.

I think a suitable interpretation been proposed before by @Antoine-Zimmermann as "RDF-reification interpretations". That also defines how the constituents act as a key for the triple term resource. (This proposal was also referenced in the "Seeking Consensus" table from 2024-01 in the row for the agreed upon Option 3, as an interpretation variant.)

This interpretation is not needed in the basic RDF semantics, but would be useful as an extension to be used together with OWL.

Looking at the RDF entailment section, I'm thinking this may be a start:

Triple Term Entailment

If graph S contains:

 xxx aaa <<( sss ppp ooo )>> .

then S RDF-entails:

 xxx aaa _:nnn .
 _:nnn rdf:type rdf:TripleTerm .
 _:nnn rdf:tripleTermSubject sss .
 _:nnn rdf:tripleTermPredicate ppp .
 _:nnn rdf:tripleTermObject ooo .

(A note on triple term denotation similar to the one about literals appears to be valuable too.)

With such an interpretation in place, it seems valuable to define "unstarring" using the chosen rdf:type and predicates for the entailed triple term resource description.

(See also w3c/rdf-star-wg#127, which is of relevance to aaa in the above pattern.)

Note

Edits to proposal:

  • Note that this is not necessary in the core RDF semantics.
  • Uses distinct terms (see comment).

The exact name of the class of triple terms (here, rdf:Triple) is to be debated. If the "classic reification" properties (rdf:subject, rdf:predicate, rdf:object) are chosen, then rdf:Triple is reasonably a subclass of rdf:Statement, since that is their defined domain.

(Note: While it is not necessary to reuse those properties, it seems frugal to do so. But if there are reasons for minting new properties, that would also work.)

@niklasl niklasl added discuss-f2f Proposed for discussion during the next face-to-face meeting needs discussion Proposed for discussion in an upcoming meeting labels Sep 25, 2024
@niklasl
Copy link
Author

niklasl commented Sep 26, 2024

For the linked use case, this may not be necessary to define in RDF semantics.

The use case does rely on OWL, so it arguably belongs in a semantic extension in that layer. OWL does have its own reification of sorts (using owl:annotatedSource, owl:annotatedProperty, owl:annotatedTarget), and in some ways it may make more sense there. But there would be a gap between RDF 1.2 and the current OWL 2 tooling until there was something normative (which could take years, and there is no future OWL WG planned today).

As an alternative, this interpretation could be added to the semantic extension defined in RDF Schema 1.2 instead. A connection to unstarring appears valuable; and so unstarring could be based on such RDFS terms instead. Having that would be enough to be able to use unstarred forms with existing tooling, and then later on upgrade an OWL2 reasoner to support RDF Schema 1.2.

(As a minimum aid for interoperability, an informative section about the semantic extension might do. Or even more minimum, a separate Note. I volunteer to make a PR for anything we agree upon.)

@niklasl
Copy link
Author

niklasl commented Sep 26, 2024

This interpretation entails a blank node which denotes the same resource as the triple term (would be _:nnn owl:sameAs <<( sss ppp ooo )>> in OWL). This node relates to the constituent parts (using whichever properties are chosen), and has value for rdf:type as what is to be defined as the range of rdf:reifies.

That is what is currently discussed for unstarring, and fully represents multiple triples for the same reifier (aaa above would in practice be rdf:reifies).

The semantics in the agreed transparent baseline says:

  • ⏩ metamodelling characterising reification ⏪️ and
  • ⏩ axiomatic triples characterising reification ⏪️

which may allow this interpretation? If not, then maybe an extension (perhaps in RDFS) is still acceptable?

@pchampin
Copy link
Contributor

This was discussed during the rdf-star meeting on 26 September 2024.

View the transcript

Define an interpretation of Triple Terms 5

niklasl: I propose to use the rdf:subject/predicate/object properties for the interpetation

niklasl: This might not good to entail old reification from triple terms

<Zakim> pfps, you wanted to ask how this relates to the semantics from Enrico?

<niklasl> w3c/rdf-ucr#27

<gb> Issue 27 Integrating different ontology designs through entailment upon triple terms (by niklasl) [use case]

<pfps> Where are the semantics from Enrico, by the way?

ora: If we need some clarification on this, does it means we differ this one until Enrico shows up?

pchampin: Does this point to a specific use case or is this a nice to have,

<niklasl> https://gist.github.com/niklasl/69428b043be6f1d33fd45f89cbe52632#file-statement-entailment-ttl

niklasl: there are use cases I defined previously

AndyS: This seems to relate to the discussion around unstar

AndyS: Done this way I don't see how we can add multiple triples to the same reifier

tl: I have developed in a github issue multiple variants and they are all many-to-many

one is RDF-vocabulary based

<niklasl> Here is a comment on the unstarring issue I made yesterday w3c/rdf-star-wg#114 (comment) which relates to this issue about interpretation.

<gb> Issue 114 Un-star operation to support RDF Dataset Canonicalization? (by niklasl) [needs discussion] [discuss-f2f]

ora: I don't think we can reach a concensus here, is it a good discussion topic for next week after voting?

<Zakim> tl, you wanted to ask about when rdfs:states will be discussed

<gkellogg> JSON-LD-star slides – https://json-ld.github.io/w3c-tpac-2024-presentations/json-ld-star/

<AndyS> +1 to having the JSON-LD presentation in a focused meeting.

ora: Thank you everybody


@rat10
Copy link

rat10 commented Sep 27, 2024

@niklasl
It seems to me that things are getting mixed up between abstract triple terms and reifiers.

Your linked use case is concerned with reifiers: occurrences of an abstract triple, and their attributes. I agree that the conversion you describe is an important use case, but isn't this in essence the same issue both as the unstar operation and the desire to refer to individual nodes in a reified term? It seems to me like all these use cases that in one way or another need to refer to the individual parts of a reified triple term can be addressed with the RDF standard reification vocabulary. I'm waiting for @franconi to confirm, or comment (because he seemed to see an issue about reusing that vocab, but maybe I misunderstood).

However, describing an abstract triple term itself is a different use case (and I have yet to see a compelling example). I'm reluctant to re-use the RDF reification vocabulary also to describe abstract triple terms, but if this as niche a use case as it currently seems, then maybe there is not much harm to be expected.

However, defining the rdf:Triple(why not TripleTermas that is the name we use everywhere else?) as a subclass of rdf:Statement seems odd: the abstract triple term describes a type of statement, whereas rdf:Statement describes occurrences of such a type. Wouldn't it be more correct to define an rdf:Triple and its subclasses rdf:TripleTerm and rdf:Statement?

@niklasl
Copy link
Author

niklasl commented Oct 18, 2024

As discussed in the Semantic TF meeting on 2024-10-18, using new terms is likely necessary. I'll update the issue text with such (provisional) terms, to be aligned with what is possibly defined for w3c/rdf-star-wg#114.

@gkellogg gkellogg removed the discuss-f2f Proposed for discussion during the next face-to-face meeting label Oct 24, 2024
@afs
Copy link

afs commented Dec 12, 2024

1::
https://www.w3.org/TR/rdf12-semantics/#notation

The word denotes is used here for the relationship between an IRI or literal and what it refers to in a given interpretation, itself called the referent.

This needs to be updated to include triple terms.

2::
Similar to
https://www.w3.org/TR/rdf12-semantics/#datatypes

A literal with datatype d denotes the value ...

it would be useful to have text in RDF Semantics saying "A triple term denotes ..."

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
Projects
None yet
Development

No branches or pull requests

5 participants