OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

# xdi message

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

Subject: More on the distinction between \$has and \$has\$a

• From: "Drummond Reed" <drummond.reed@cordance.net>
• To: "'Barnhill, William [USA]'" <barnhill_william@bah.com>,"'OASIS - XDI TC'" <xdi@lists.oasis-open.org>
• Date: Mon, 19 Jan 2009 02:13:32 -0800

 In a message to the list on Friday about \$has statements, I said:               +x/\$has/+y does in fact translate into two base graph statements:  +x/+y/+x+y and    +x+y   In reply Bill asked two questions. The first one was:               But what do you mean by translate? Do you mean (a) that the presence of the first (+x/\$has/+y) in the graph implies the other two (+x/+y/+x+y and +x+y) ; (b) that the presence of the other two in the graph implies the first, or (c) both?   What I meant by “translate” should more accurately have been “infer”, i.e., +x/\$has/+y in the metagraph infers both +x/+y/+x+y and +x+y . The opposite applies as well. In fact, any one of the following three statements infers the other:               +x/\$has/+y             +x/+y/+x+y             +x+y   Nick and I also noted that the second statement above infers a fourth statement:               +x+y/\$is\$a/+y   Bill then posed a second question:               I agree with (c) for the +x+y part, but am having trouble with the other. If you say (c) for both then +x/+y/+x+y <=> +x+y. So the subject +ball, predicate +color has the object +ball+color as well as +red? That would mean that a query of +ball/+color would return two answers: +ball+color and +color*red?   My answer is that the subject +ball with predicate +color COULD produce both the objects +ball+color and +red. But the semantics of both answers are clear if we follow the statements and inferences all the way though.   I found it quite instructive to do this, so I offer the following writeup:   Start by substituating +ball for +x and +color for +y in the three statements above. This yields:               +ball/\$has/+color             +ball/+color/+ball+color             +ball+color   So far these are all metagraph statements (T-box statements to use the terminology Bill suggests) about classes. There are no base graph (A-box) statements about instances yet. To do that we would need a fourth statement:               +ball/+color/+red   That’s an A-box statement that says in English “a ball has a color of type red”. Note the “has a” in that sentence. The object of an A-box statement is an instance (yes, +red is also a class, but in this context it is an instance of the class +color). That means that the A-box statement +ball/+color/+red is described by the following two T-box statements (or their inverses):               +ball/\$has\$a/+color             +red/\$is\$a/+color   But neither of those is a \$has statement. That’s because \$has can only be used to describe an arc whose object is a restricted class of that type of arc. In other words, +ball/\$has/+color can only be used to create a restricted subclass of +color – specifically the type of color that a ball has. XDI RDF assigns this restricted subclass the XRI +ball+color. About the subclass +ball+color we can infer the following two T-box statements:               +ball+color/\$is\$a/+color             +ball+color/\$is\$has/+ball   The opposite is true for \$has\$a. \$has\$a can only be used to describe an arc whose object is an instance of that type of arc. For example, if we say +ball/\$has\$a/+color, then we actually can’t infer any other T-box statement. All we can do is say that the XDI address +ball/+color is valid and then make A-box statements against an XDI dictionary defining instances of the class +color:   XDI DICTIONARY (T-BOX)             +ball/\$has\$a/+color             +color/\$a/+red             +color/\$a/+blue             +color/\$a/+yellow   XDI INSTANCES (A-BOX)             +ball/+color/+red             +ball/+color/+blue             +ball/+color/+yellow   But we can’t say               +ball/+color/+small   because +small not an instance of +color.   So, to get back to Bill’s question, say we had an XDI document with the following statements in it:               +ball/\$has\$a/+color             +color/\$a/+red             +color/\$a/+blue             +color/\$a/+yellow             +ball/\$has/+color                       <== same as the statement below             +ball/+color/+ball+color              <== same as the statement above             +ball/+color/+red             +ball+color/+color/+red   This would be a little strange since the two marked statements mean the same thing, but it would still be valid.   If we then did a \$get on +ball/+color, we’d get two answers:               +ball/+color/+ball+color             +ball/+color/+red   But the metagraph semantics of this answer are clear. +ball+color is not in the dictionary as an instance of +color. So if you did a \$get on +ball+color from the same XDI document, you would get:               +ball+color/+color/+red   In other words, for this XDI subject – +ball – there are two ways of expressing that it has the color +red. The first way is direct:               +ball/+color/+red   The second way is to subclass +color into +ball+color and then give its value:               +ball/\$has/+color             +ball+color/+color/+red   Both are valid. Both could appear in the same XDI document, though that would be somewhat redundant. Though the first way is simpler, but there can be good reasons to use the second, i.e., create a restricted subclass. One of them is that you want to express different predicates on the subclass. For example:               +ball/\$has/+color             +ball+color/+color/+red             +ball+color/+density/+high   Note that +ball+color/+density/+high is very different that +ball/+density/+high   For me, this analysis helps make the distinction between \$has and \$has\$a much clearer. The former asserts a restricted subclass as a new XDI subject. Its object is always a new class. The latter asserts a predicate on the existing XDI subject. Its object is always an instance.   What \$has and \$has\$a have in common, as Nick observed, is that both describe outgoing arcs on an XDI subject, i.e., both are rooted in \$has, which is the metagraph predicate representing an outgoing arc. However this brings up a one more very interesting point that Nick and I discussed last Thursday: at first glance it might appear that if an XDI subject has a \$has\$a, it implies it has a \$has. For example, if you saw               +ball/\$has\$a/+color   then it looks like it implies               +ball/\$has/+color   However the analysis above – and specifically the inferences between +x+y and +x/+y/+x+y – show why that’s not true. +ball/\$has\$a/+color only means you can make XDI statements about +ball/+color. It does not infer that the XDI subject +ball+color exists because it doesn’t infer that the statement +ball/+color/+ball+color exists. That’s a separate statement.   Hope this helps.   =Drummond

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