w3c / rdf-tests

Repository for the RDF Tests Community Group
w3c.github.io/rdf-tests
Other
45 stars 23 forks source link

Tests for generalized RDF #149

Open rubensworks opened 1 day ago

rubensworks commented 1 day ago

As suggested by @niklasl in https://github.com/w3c/rdf-tests/pull/144#pullrequestreview-2331155073, we could consider adding SPARQL and RDF (syntax) tests for generalized RDF.

AFAIK, there are no such tests yet for previous versions.

Since generalized RDF is non-normative, I don't see a big need for adding such tests. But I think this deserves some discussion at least.

afs commented 18 hours ago

@niklasl - do you mean full generalized RDF or just that SPARQL allows the same range of RDF terms in subject and object positions because of reverse paths.

Generalized RDF includes literals as properties. SPARQL query does not cover that.

https://www.w3.org/TR/sparql12-query/#sparqlTriplePatterns

niklasl commented 13 hours ago

@afs The latter, what SPARQL allows.

As you've noted before, a name and definition for that "lesser generalized RDF" may be useful. "Symmetric RDF"? :thinking:

(Apart from reverse paths (like "2024" ^:published ?x ), a theoretical case is using SPARQL as a "poor man's reasoner", to manifest e.g. "2024"^^xsd:gYear rdf:type xsd:gYear, if supported by the implementation. Granted, that case might require more of the generalized form, e.g. blank nodes as predicates. But to be clear, I am only suggesting noting what SPARQL already allows for.)