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

Fixing the definition of instance of a graph to consider triple terms #71

Closed
franconi opened this issue Jan 22, 2025 · 9 comments
Closed
Labels
spec:substantive Change in the spec affecting its normative content (class 3) –see also spec:bug, spec:new-feature

Comments

@franconi
Copy link
Contributor

The definition of instance of a graph should be fixed to include triple terms as follows:

Suppose that M is a functional mapping from a set of blank nodes to some set of RDF terms. Any graph obtained from a graph G by replacing some or all of the blank nodes N in G by M(N) is an instance of G.

@franconi franconi added the spec:substantive Change in the spec affecting its normative content (class 3) –see also spec:bug, spec:new-feature label Jan 22, 2025
@pfps
Copy link
Contributor

pfps commented Jan 22, 2025

What is the definition of "in" here?

@franconi
Copy link
Contributor Author

N in G if N appears in the parse tree of G.
I guess that the same sort of ambiguity happens also in the RDF 1.1 spec.

@pfps
Copy link
Contributor

pfps commented Jan 22, 2025

And what is the "parse tree"?

@franconi
Copy link
Contributor Author

Ok, so your issue is not about the change introduced by the new formulation, but about part of the formulation which was present before already; fair enough.

We could either mention the grammar (e.g., it appears as a RDF term in the graph) or explicitly write the inductive definition of "appears in", which is used elsewhere in the semantics document. Maybe this latter approach would be better.

@franconi
Copy link
Contributor Author

Definition of "in" (sometimes written as "appears in"), with A, B triples or terms and G graph:

A is in a graph G if A is in a triple B of G.
A is in B if either A is equal to B or A is in the subject or predicate or object of B if B is a triple or triple term.

@franconi
Copy link
Contributor Author

Using the above definition, we should replace the text "if the triple structure appears in S" (used to define entailment patterns) with "if the triple or the triple term is in S".

@doerthe
Copy link
Contributor

doerthe commented Jan 23, 2025

I would be OK with keeping the "in" but I think an issue is that this notion got more complicated because we now have nested terms which were not present in RDF 1.1. I am not happy with the definition though, mainly because you use "in" to define "in".

Definition of "in" (sometimes written as "appears in"), with A, B triples or terms and G graph:

A is in a graph G if A is in a triple B of G. A is in B if either A is equal to B or A is in the subject or predicate or object of B if B is a triple or triple term.

Maybe:

Given a graph G, we define the set T(G) of terms of G recursively as follows:
for each triple (s p o)\in G, s,p,o\in T(G)
for each (s,p,o) \in T(G), s,p,o\in T(G)

We say that A is in G if A\in T(G)

Of course we need to make it more "RDF spec style".

@franconi
Copy link
Contributor Author

Given a graph G, we define the set T(G) of terms of G recursively as follows:
for each triple (s p o)\in G, s,p,o\in T(G)
for each triple term (s,p,o) \in T(G), s,p,o\in T(G)

@franconi
Copy link
Contributor Author

Added to PR #74.

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

No branches or pull requests

3 participants