W3C home > Mailing lists > Public > public-prov-wg@w3.org > October 2011

PROV-ISSUE-138 (collection-collision): Collection does not describe multiple additions/replacements [Data Model]

From: Provenance Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Sat, 29 Oct 2011 23:46:08 +0000
To: public-prov-wg@w3.org
Message-Id: <E1RKIbI-0002J6-8u@lowblow.w3.org>

PROV-ISSUE-138 (collection-collision): Collection does not describe multiple additions/replacements [Data Model]


Raised by: Stian Soiland-Reyes
On product: Data Model

http://www.w3.org/TR/prov-dm/#expression-Collection introduces relations for expressing collection modifications:

Expression: wasAddedTo_Key(c,k) (resp. wasRemovedFrom_Key(c,k)) denotes that collection c had a new value with key k added to (resp. removed from) it.

It is not clear what would happen if a second addition added a value with the same key.




It is clear that c3 contains (k1, e2). Does it also contain (k1, e1)?

I understand this is meant as a general collection, and the interpretation of this might as well depend on the specific type of collection. However that means that without knowing the type of collection you can't tell if e1 is contained in c3 or not.

I believe we should not allow automatic replacement, and neither allow multiple values for the same key.  So if asserting:


c1 does *not* contain k1, but *might* have e1 under a different key.

wasAddedTo_Coll(c2,c1); wasAddedTo_Key(c2,k1) asserts that c2 now contains the key k1 - but the collection c2 is derived from, c1, did not contain the key k1. 

A second addition of the same key without an intermediate removal is not valid in PROV. If the specific type of collection is performing replacement by key, such as a dictionary/map/hashtable, then the asserter will need to model an intermediate wasRemovedFrom_Coll(intermediate, original) and  wasAddedTo_Coll(new, intermediate). If the specific type of collection contains multiple values per key, then the value should instead be asserted as a new nested collection of those values.
Received on Saturday, 29 October 2011 23:46:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:51:03 UTC