Skip to content

Adds quoted triples and asserted triples from RDF-star CG report #32

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

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

gkellogg
Copy link
Member

@gkellogg gkellogg commented Apr 10, 2023

  • Add quoted and asserted triple definitions.
  • Add "classic" and "full" conformance levels.

Some license taken to make terminology more native to RDF, rather than a modification of RDF.

Fixes #23.
References #34 for potentially adding additional terminology.
Relates to w3c/rdf-star-wg#33 and w3c/rdf-star-wg#23


Preview | Diff

@gkellogg gkellogg added needs discussion Proposed for discussion in an upcoming meeting spec:substantive Change in the spec affecting its normative content (class 3) –see also spec:bug, spec:new-feature labels Apr 10, 2023
@gkellogg gkellogg requested review from afs, pchampin and hartig April 10, 2023 20:52
gkellogg added a commit to w3c/rdf-n-triples that referenced this pull request Apr 11, 2023
Note, this updates the raw EBNF to remove production numbers, and auto-generate the production numbers in the HTML serialization.

It is dependent on w3c/rdf-concepts#32.
@afs
Copy link
Contributor

afs commented Apr 13, 2023

This is prejudging and splitting the discussion of w3c/rdf-star-wg#33. There are changes out for other specs.

"triple" is the defined term. Concepts has "generalized triple" which is an extension, not a restriction so the terminology "triple" in the semantics works. But if there are triples that are restrictions, the reader may reasonably ask "what happens for X ro Y triples?". "complex triple" means nothing to me. The use of special case terminology on RDF concepts detracts from the foundational nature of a triple.

As a triple (an item with three parts, etc etc) this is not any more "complex" that any other variation.

We don't have special names for triple-with-literal or triple-with-subject-blankNode.

rdf-canon is already explaining it is URDNA2015 which is RDF 1.1 timeframe.

Regardless of this PR, it will note the situation which makes it the better place to explain that it, quite reasonably, targets RDF 1.1 while taking the canonicalized N-Quads syntax.

spec/index.html Outdated
Comment on lines 502 to 506
<li><dfn class="no-export lint-ignore">Full</dfn> conformance
supports <a>complex graphs</a> or <a>complex datasets</a>,
and allows the use of <a>quoted triples</a>.
Such input syntaxes include
[[RDF12-N-TRIPLES]], [[RDF12-N-QUADS]], [[RDF12-TURTLE]], and [[RDF12-TRIG]].</li>
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed - it is "conformance". "complex" is a judgement.

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'm gong to add a note in SOTD that explains that these terms are tentative placeholders, some of which may not continue going forward.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to "containing quoted triples".

@gkellogg
Copy link
Member Author

I added something to the SOTD; at this point I'd rather not remove terminology until there is more discussion. We can create some new sections, possibly informative, to move around definitions as a next step. It also needs to be rebased on recent commits to main, which may make some existing comments obsolete requiring them to be re-considered, but we can wait on that until we're closer to concensus.

@afs
Copy link
Contributor

afs commented Apr 16, 2023

at this point I'd rather not remove terminology until there is more discussion.

(referring to plain/complex)

The introduced of this terminology, which is not in the CG report, is of significant size, does not reflect the discussion and concerns of the telecon (2023-04-13). The terminology is described as "adapted from the CG report" - that's misleading.

I'd rather not put terminology into the drafts that is highlighting one position over another. In this case, another possibility is not having top-level terminology or having terminology to describe one situation.

(referring to w3c/rdf-star-wg#19, w3c/rdf-star-wg#23)

Put in issue markers without opinion or direction.

@gkellogg
Copy link
Member Author

I think an issue marker for everything other than “quoted triple” is a reasonable interim solution.

@gkellogg gkellogg changed the title Adds quoted triples and related terminology from RDF-star CG report Adds quoted triples and asserted triples from RDF-star CG report Apr 16, 2023
@gkellogg gkellogg requested a review from afs April 16, 2023 21:14
gkellogg added a commit to w3c/rdf-n-triples that referenced this pull request Apr 16, 2023
Note, this updates the raw EBNF to remove production numbers, and auto-generate the production numbers in the HTML serialization.

It is dependent on w3c/rdf-concepts#32.
as the subject.</p>

<figure id="fig-quoted-triple">
<a href="quoted-triple.svg">
Copy link
Contributor

Choose a reason for hiding this comment

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

(There is an access problem seeing this diagram in the preview.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, a shortcoming of PR Preview. But, you can either see it in the file view, or using the Google drawing referenced in the comment: https://docs.google.com/drawings/d/1I_QxbUgnQXumXzb8c0WNJHIQ-mtRs2S80dDG6i9aOD8.

@@ -427,14 +498,26 @@ <h2>RDF Documents and Syntaxes</h2>
<em>RDF 1.2 Concepts and Abstract Syntax</em>,
but can conform to such other specifications that normatively
reference terms defined here.</p>

<p>This specification establishes two conformance levels:</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

The WG has not agreed that nor the words used. It's WIP.

"Profiles" has also been mentioned.

Also - "This specification" would be the semantics.

At a minimum this text needs a note that it is tentative.
As concepts does not need this language, and the dfn's are unstable, removing it for now would be better.

Copy link
Member Author

Choose a reason for hiding this comment

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

See note added below. My opinion is that if it relates to the data model/abstract syntax, it should be described in Concepts rather than Semantics. I suggested elsewhere that the text could just be removed from this PR and taken up another time. But, the notion that there may be some variation allowed or supported is probably worth signaling sooner rather than later.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm note sure this diagram works. The two lines are different things.

@gkellogg gkellogg removed the needs discussion Proposed for discussion in an upcoming meeting label Apr 20, 2023
gkellogg added a commit to w3c/rdf-n-triples that referenced this pull request Apr 20, 2023
Note, this updates the raw EBNF to remove production numbers, and auto-generate the production numbers in the HTML serialization.

It is dependent on w3c/rdf-concepts#32.
* Add issue marker for #14 related to potential additional terminology.
* Add "classic" and "full" conformance levels.
* Add quoted and asserted triple definitions.
@gkellogg
Copy link
Member Author

Squashed and rebased to address conflicts and simplify history.

Co-authored-by: Olaf Hartig <[email protected]>
Co-authored-by: Ted Thibodeau Jr <[email protected]>
@pfps
Copy link
Contributor

pfps commented Apr 21, 2023

Here are the relevant definitions for RDF graphs and triples from the PR.

An RDF graph is a set of RDF triples.
An RDF triple consists of three components:

  • the subject, which is an IRI, a blank node, or a quoted triple
  • the predicate, which is an IRI
  • the object, which is an IRI, a literal, a blank node, or a quoted triple

An asserted triple is an RDF triple that is an element of an RDF graph.
A quoted triple is an RDF triple that is used as the subject or object of another triple.
In an RDF graph, a triple may occur as either a quoted triple, an asserted triple, or both.

The above definitions do not forbid triples that contain themselves.

Neither cycles of quoted triples nor creation is defined so the statement below is meaningless.

However, by this definition, cycles of quoted triples cannot be created.

@afs
Copy link
Contributor

afs commented Apr 21, 2023

The above definitions do not forbid triples that contain themselves.

We ought to clarify to make sure this isn't a possible reading.

@pfps - do you have a suggestion?

A temporary measure, for FPWG, is to say (informally) "Cycles are not permitted".
Or (temporary) note that all RDF syntaxes can not describe RDF data with cycles.

@pchampin
Copy link
Contributor

I agree that the current definition of 'RDF triple' leaves the door open for "self-containing" triples, and that the notion of "cycles of quoted triples" is confusing...

It seems to me that the definition in the CG report is a better way to avoid "self-containing" triples (@pfps do you agree?), but it relies on the distinction between "RDF triple" and "RDF-star triple"... so in order to reuse this phrasing, we would need a distinction between "simple/complex" triples... :-/

@pfps
Copy link
Contributor

pfps commented Apr 21, 2023

@pchampin Yes the CG definition rules out triples that contain themselves, so it is different than the definition in this PR. Whether this is better depends on whether one wants to allow such triples.

@gkellogg gkellogg requested a review from hartig April 21, 2023 20:41
@hartig
Copy link
Contributor

hartig commented Apr 21, 2023

It is possible to adapt the definition of the CG report as follows.

An RDF triple is a 3-tuple defined recursively as follows:

  • if s is an IRI or a blank node, p is an IRI, o is an IRI, a blank node or a literal, then (s, p, o) is an RDF triple;
  • if t and t' are RDF triples, s is an IRI or a blank node, p is an IRI, o is an IRI, a blank node or a literal, then (t, p, o), (s, p, t) and (t, p, t') are RDF triples.

(Since I am just writing this on my phone, I am posting this just as text rather than as a directly commit-able suggestion. However, I can create such a suggestion comment later (tomorrow) if you agree with this direction for the definition.)

@hartig
Copy link
Contributor

hartig commented Apr 22, 2023

@gkellogg I have my proposed change properly written in my local copy of the branch now. However, I cannot put it here as a directly commit-able suggestion because it also changes line 440 ("<p>An <dfn data-local-lt="triple">RDF t...") which is too many lines away from the changes in this PR and, thus, I cannot include it when selecting lines in the "Files changed" tab of this PR. As an alternative, I could simply push a commit with the change to the branch of this PR. Would that be okay with you? Another option is to merge this PR now (in which case I would approve it), and then I create another PR with the change. Which one do you prefer?

@gkellogg
Copy link
Member Author

Yes, I would just commit to the branch. You can always clarify with a comment after the fact, if it seems necessary.

@hartig
Copy link
Contributor

hartig commented Apr 22, 2023

Thanks @gkellogg! I have pushed the commit (f24e320).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:substantive Change in the spec affecting its normative content (class 3) –see also spec:bug, spec:new-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quoted Triples
6 participants