Questions regarding Bind/Unicity and intermediate results

Hi,

I have some questions regarding the implementation of LD Patch.

First, for clarification, it is not possible to bind multiple RDF Terms to a variable, i.e. a patch can not perform bulk updates, right?

Given the example graph:
```
@prefix ex: <http://example.org/vocab#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

ex:Alice a ex:Person .
ex:Bob a ex:Person .
```

and the LD Patch document
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.org/vocab#> .

Bind ?person ex:Person / ^rdf:type .
Add { ?person ex:livesIn ex:Berlin } .
```

Since the Bind statement fails to match exactly one node (it matches ex:Alice and ex:Bob) this MUST result in an error!?
I conclude that the bang (unicity constraint) in the example
```Bind ?ted <http://conferences.ted.com/TED2009/> / ^schema:url ! .```
is redundant (and not necessary), since the bang refers to the final node set, which needs to be exactly one node for the Bind. Could you provide an example where it is helpful then?



Secondly I was wondering, what is the base for executing subsequent LD Patch operations, the original graph or intermediate results of the graph. This is not clearly stated.

If the operations are executed in a subsequent order on the intermediate result, i.e. the Bind is executed on the intermediate result, the problem I see is that intermediate results might be pathological graphs, even though the original graph is not.

Original graph:
```
@prefix ex: <http://example.org/vocab#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

_:b1 ex:livesIn ex:Berlin .
_:b2 ex:livesIn ex:Bremen .
```

and the LD Patch document
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.org/vocab#> .

Bind ?berliner ex:Berlin / ^ex:livesIn .
Delete { ?berliner ex:livesIn ex:Berlin } .
Add { ?berliner ex:livesIn ex:Bremen } .

Bind ?bremer ex:Bremen / ^ex:livesIn .
Delete { ?bremer ex:livesIn ex:Bremen } .
Add { ?bremer ex:livesIn ex:Leipzig } .
```

The intermediate graph (after `Add { ?berliner ex:livesIn ex:Bremen } .` would be:
```
_:b1 ex:livesIn ex:Bremen .
_:b2 ex:livesIn ex:Bremen .
```
resulting in a error (the Bind statement fails to match exactly one node). Workaround would be to place and execute the second Bind before doing any modifications.

Kind regards
Magnus

-- 
Magnus Knuth

Hasso-Plattner-Institut für Softwaresystemtechnik GmbH
Prof.-Dr.-Helmert-Str. 2-3
14482 Potsdam

Amtsgericht Potsdam, HRB 12184
Geschäftsführung: Prof. Dr. Christoph Meinel

tel:     +49 331 5509 547
email:   magnus.knuth@hpi.de
web:     http://www.hpi.de/
webID:   http://magnus.13mm.de/

Received on Wednesday, 11 May 2016 13:04:51 UTC