shexSpec / shape-map

ShapeMap structure and language specification
MIT License
1 stars 3 forks source link

conversion to fixed ShapeMap can easily fail #14

Open pfps opened 6 years ago

pfps commented 6 years ago

... because two different triple patterns can produce the same node, potentially resulting in multiple shape associations with the same nodeSelector and shapeLabel.

ericprud commented 6 years ago

I read

No two shape associations in a ShapeMap may have the same combination of node and shape.

as prohibiting that so it's up to implementations to de-duplicate. The ShapeMap usage section only makes sure that association are in a fixed ShapeMap:

If A.node is an RDF node, A is in the fixed ShapeMap.

For each triple T in G which matches P, the fixed ShapeMap has a shape association F ...

For instance, with data:

<s> <p1> 1 .

QueryMap:

<s>@<S>,
{FOCUS <p1> _}@<S>

the fixed map should be:

<s>@<S>

demo

pfps commented 6 years ago

So implementations are supposed to violate what the document says in one place to abide by what it says in another?  Who is to say which place is correct?

peter

On 3/14/18 11:32 AM, ericprud wrote:

I read

No two shape associations in a ShapeMap may have the same
combination of node and shape.

as prohibiting that so it's up to implementations to de-duplicate.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shexSpec/shape-map/issues/14#issuecomment-373064481, or mute the thread https://github.com/notifications/unsubscribe-auth/AGT8e1JdzJj1m6JHaUh0NmWmu72ARLvYks5teTgpgaJpZM4SosyK.

ericprud commented 6 years ago

Where's the violation?

pfps commented 6 years ago
In Section 4, I thought, reading that as operational, i.e., where it says "the fixed ShapeMap has a shape association http://shex.io/shape-map/#dfn-shape-association F" as an instruction to add a shape association.
It is possible to read Section 4 as descriptive, which then does allow tools to deduplicate.  However, then there is nothing saying what is not in the fixed ShapeMap, which would need to be fixed up.

|peter|

On 3/14/18 11:44 AM, ericprud wrote:

Where's the violation?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shexSpec/shape-map/issues/14#issuecomment-373068874, or mute the thread https://github.com/notifications/unsubscribe-auth/AGT8ezqU-Zat6hovjY6EntDyADO9FfEUks5teTrbgaJpZM4SosyK.

ericprud commented 6 years ago

I added a note so as to not imply this was a new constraint. This is the first 2119 keyword in the document.

Note that though <a>shape associations</a> with triple patterns may imply redundant fixed ShapeMap associations, the combination of node and shape in the fixed map MUST be unique.

If that address this issue, feel free to close it.

pfps commented 6 years ago

Better would be something that clears up whether Section 4 is operational.  If operational it should say something about "add" instead of "has" and explictly not add if that would cause a duplicate.  If not operational it should say that the fixed ShapeMap has only the shape associations sanctioned by the section.

Right now the section is neither fish nor fowl.  One could easily read the note as saying that if a duplicate is produced then the query ShapeMap cannot be converted to a fixed ShapeMap for the graph in question.

peter

On 3/14/18 1:24 PM, ericprud wrote:

I added a note http://shexspec.github.io/shape-map/#query-to-fixed-set so as to not imply this was a new constraint. This is the first 2119 keyword in the document.

Note that though shape associations with triple patterns may imply redundant fixed ShapeMap associations, the combination of node and shape in the fixed map MUST be unique.

If that address this issue, feel free to close it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shexSpec/shape-map/issues/14#issuecomment-373105904, or mute the thread https://github.com/notifications/unsubscribe-auth/AGT8e1t_NESM1Yoe9PGZoYiVN67fudLMks5teVI_gaJpZM4SosyK.

ericprud commented 6 years ago

Can you propose some text, maybe in the form of a pull request, which gracefully asserts that a fixed ShapeMap is composed of e.g. the unique set of node/shape associations implied by the bullet points?

pfps commented 6 years ago

Well perhaps a patch to the current wording that says something like "add ... unless there already is a member(?) with the same ...".

peter

On 3/14/18 3:34 PM, ericprud wrote:

Can you propose some text, maybe in the form of a pull request, which gracefully asserts that a fixed ShapeMap is composed of e.g. the unique set of node/shape associations implied by the bullet points?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shexSpec/shape-map/issues/14#issuecomment-373148023, or mute the thread https://github.com/notifications/unsubscribe-auth/AGT8e6Tmq6Ao8A4WWRLpX3k12EMGc3fRks5teXDPgaJpZM4SosyK.