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

Arrays as a built-in type (was SPARQL-friendly lists) #74

Open
dbooth-boston opened this issue May 18, 2020 · 2 comments
Open

Arrays as a built-in type (was SPARQL-friendly lists) #74

dbooth-boston opened this issue May 18, 2020 · 2 comments

Comments

@dbooth-boston
Copy link
Collaborator

The SPARQL 1.2 work has an issue for SPARQL-friendly lists, so please consult that issue before posting here.

I'm creating this issue here for collecting ideas on adding an array data structure to RDF.

Some comments copied from https://lists.w3.org/Archives/Public/semantic-web/2020May/0069.html

On 5/17/20 5:20 PM, Patrick J Hayes wrote:

On May 17, 2020, at 1:02 PM, David Booth david@dbooth.org wrote:

On 5/17/20 5:40 AM, thomas lörtsch wrote:
I'd like lists to be integrated into RDF first class because they are > such an important and ubiquitous datastructure.

+1

And we should call them "arrays", not "lists", as in most other data representations. We got in the habit of calling them lists in RDF because historically they were represented as linked lists. But there is no need for continuing that historical glitch if we add arrays as first-class objects in RDF.

Piecing them together as sets of triples using logic is really trying to use the wrong tool for the job. They need to be first-class syntactic objects, so if one is malformed it is a syntax error -- not a logic problem.

I agree. But it would require (1) defining the exact syntax and semantics (or deliberate lack of semantics) (2) writing a standard document defining this extension (3) getting it through the W3C process (3) re-tooling every RDF parser, and possibly every RDF inference engine, in existence.

Regarding #1, consider a triple using such a list/array/sequence in the object position:

:S :R [:o1, :o2, :o3] .

Does this mean that R holds between S and the list? Or that it holds between S and all the elements of the list (so this is just a handy abbreviation for three triples with IRI objects) or something else? Or can it be used in all these ways and also perhaps others? In this latter ‘flexible’ option, arrays have no built-in RDF semantics, but then we need a way to tell readers (including inference engines) how a particular case is intended to be understood. For example, we might have special classes of properties telling us how they are supposed to behave when applied to arrays.

What would this mean:

[:s1, :s2, :s3] :R :O .

? What if both subject and object are arrays?

Related question: if arrays are first-class entities, they can have names. If an IRI refers to – identifies, is the name of – an array, how do we understand a triple which uses that name to mention (instead of use) an array?

Can an array contain blank nodes? Can one substitute an array for a blank node in the RDF instantiation process? How does this affect the basic entailment results (such as the RDF interpolation lemma)?

It would be very helpful if people who want these things could tell us what they want to use them for. I suspect we will find a large variety of potential uses, so it will be impossible to standardize. This is what happened with RDF datasets: by the time they were considered for standardization, they were already in use in incompatible ways by people with skin in the game who were not willing to re-tool their committments, so agreement on a clean semantics was already out of reach.

@rat10
Copy link

rat10 commented Jul 14, 2020

In May and June 2020 we had an extensive discussion on semantic-web@w3.org, starting here - https://lists.w3.org/Archives/Public/semantic-web/2020May/0057.html - about lists in RDF. I tried to summarize the outcomes in a long mail archived here:
https://lists.w3.org/Archives/Public/semantic-web/2020Jun/0071.html
Lists as a proper datatype, arrays in your nomenclatura, as you propose, are one aspect covered there. I think they would be useful but as I sum up in that mail I'd hope for additional steps w.r.t. Containers and Collections. I thought I'd mention it here so it doesn't get forgotten.

@namedgraph
Copy link

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

No branches or pull requests

3 participants