[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

*Subject*: **Associativity of XDI $has statements**

*From*:**Drummond Reed <drummond.reed@xdi.org>***To*: OASIS - XDI TC <xdi@lists.oasis-open.org>*Date*: Sun, 15 Nov 2009 23:15:50 -0800

After our discussion on last Thursday’s telecon I wanted to post a note about the $has predicate and the XDI expressions it produces.

The rule we established last spring that is that any XDI $has statement can be simplified into two other XDI statements:

1) A single XRI cross-reference (an XRI in parentheses) containing exactly two XRI segments—the first being the subject of the original $has statement and the second segment being the object of the original $has statement.

+a/$has/+b <==> (+a/+b)

2) A single XRI segment by directly concatenating the subject of the original $has statement and the object of the original $has statement.

+a/$has/+b <==> +a+b

All three express the same underlying semantics, i.e.:

+a/$has/+b <==> (+a/+b) <==> +a+b

This example is straightforward because the XDI statement +a+b represents only one $has statement and therefore has only one expansion. XDI statements consisting of more than two XRI subsegments represent multiple $has statements and so the number of expansions increases. Let’s take the example:

+a+b+c+d

My understanding is the semantics we want for $has statements is associativity (http://en.wikipedia.org/wiki/Associativity). By that I mean that sequence matters, but not the placement of the $has operation between multiple XRI subsegments that have been associated with $has statements. If so, this means our example +a+b+c+d expands into all of the following XDI statements:

+a+b+c/$has/+d <==> (+a+b+c/+d) <==> +a+b+c+d

+a+b/$has/+c+d <==> (+a+b/+c+d) <==> +a+b+c+d

+a/$has/+b+c+d <==> (+a/+b+c+d) <==> +a+b+c+d

Note that this rule does NOT constrain the use of cross-references to perform explicit grouping (reification) of XDI statements. For example:

+a+b(+c+d)

…is different from +a+b+c+d because +a+b(+c+d) is a three-subsegment XRI that has two expansions outside the cross-reference…

+a/$has/+b(+c+d) <==> (+a/+b(+c+d)) <==> +a+b(+c+d)

+a+b/$has/(+c+d) <==> (+a+b/(+c+d)) <==> +a+b(+c+d)

…and two variants on these if you also expand inside the cross-reference:

+a/$has/+b(+c/$has/+d) <==> (+a/+b((+c/+d))) <==> +a+b(+c+d)

+a+b/$has/(+c/$has/+d) <==> (+a+b/((+c/+d))) <==> +a+b(+c+d)

Again, my interpretation is that this is exactly what we want—the same associativity between $has statements that we have with left-to-right sequences of English adjectives before a noun:

Boeing plane engine cowling color

Boeing plane engine cowling color

Boeing plane engine cowling color

Boeing plane engine cowling color

Boeing plane engine cowling color

In these five examples, the final word in each column (left and right) is a noun, and all the words before it are adjectives. If you then take any combination from the left and then concatenate it with the right (without changing the sequence), the result is that all but the last word is turned into an adjective, and “color” is the noun they all describe.

I hope this clears up any confusion about $has statements. I definitely see the need to include some additional clarification about this in the XDI RDF Graph Model spec.

=Drummond

**Follow-Ups**:**Re: [xdi] Associativity of XDI $has statements***From:*"Giovanni Bartolomeo" <giovanni.bartolomeo@uniroma2.it>

**RE: [xdi] Associativity of XDI $has statements***From:*"Barnhill, William [USA]" <barnhill_william@bah.com>

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]