No, I agree we don’t want them as “dumb as
that” ;-) We’ve talked for a long time that an XDI endpoint should resolve any
cross-references in the same context. Perhaps you’re suggesting that we should
apply the same rule to $mod, i.e., a $mod with a literal as the object, when
applied to an XDI statement where the existing object is a cross-reference, should
automatically update the cross-reference ***if it is within the same
context***?
That could work. As you suggest, it would
just be the mirror of the “same context” rule for $get.
=Drummond
From:
[mailto:] On Behalf Of Markus Sabadello
Sent: Tuesday, April 29, 2008
12:15 AM
To: Drummond Reed
Cc: Giovanni Bartolomeo;
Subject: Re: [xdi] XDI dictionary,
reasoner...
Yes, for me this is fine since it doesn't require any special behavior. But
following this logic, a $get on =giovanni/+phone+home would also just get the
cross-reference, not the referenced value. Do we really want our endpoints to
be as dumb as that?
Markus
On Tue, Apr 29, 2008 at 1:18 AM, Drummond Reed <>
wrote:
See [=Drummond] inline.
From:
[mailto:]
On Behalf Of Markus Sabadello
Sent: Monday, April 28, 2008 10:18
AM
To: Drummond Reed
Cc: Giovanni Bartolomeo;
Subject: Re: [xdi] XDI dictionary,
reasoner...
Ok thanks it all makes sense now.
Still I am wondering what such an XDI reasoner would actually DO. What's its
logical input and output? What's an application that uses it?
- Given an XDI graph and a dictionary, the reasoner tells you if the graph is
consistent with the dictionary or not?
[=Drummond] Yes – in that
sense it works just like XML schema validation, just smarter.
- Given an XDI graph and a dictionary, the reasoner constructs new statements
that are equivalent to existing statements in the graph?
[=Drummond] Yes again –
this is one of the ways it can be smarter.
Also, another question is, if $mod on a cross-reference modifies the referenced
value, how do you modify the cross-reference itself? You probably would have to
$del and $add it again?
[=Drummond] As usual,
Markus, you bring up a great point. Let's take an example using the same set of
example addresses we have been discussing:
#1
=giovanni+phone+home
$a$xsd$string
"+39 06 4451843"
#2
=giovanni
+phone+home
(=giovanni+phone+home/$a$xsd$string) <--xref to
#1-->
#3
=giovanni+phone
+home
(=giovanni+phone+home/$a$xsd$string) <--xref to #1-->
If you then sent the
following XDI $mod message…
=giovanni
$mod
/
=giovanni
+phone+home
"+40 12345678"
…the normal behavior
would be to change the value of =giovanni/+phone+home the new literal value. So
we would go from…
BEFORE THE $MOD
=giovanni
+phone+home
(=giovanni+phone+home/$a$xsd$string) <--xref to #1
above-->
AFTER THE $MOD
=giovanni
+phone+home
"+40
12345678" <--literal-->
Since you have to be able
to make such a change, i.e., take a subject/predicate XDI address who object is
current a cross-reference and change it so it's object is now a literal, my
conclusion is that I should rescind my earlier suggestion that a $mod to either
of the three addresses (#1, #2, or #3) should result in changing the
cross-referenced literal. Instead, only a $mod to #1 should change the literal.
There should be no reason then to change #2 or #3 since they cross-reference #1
anyway.
So if we go down that
track, the conclusion is that a $mod to an XDI statement whose object is a
literal modifies the literal, but a $mod to an XDI statement whose object is a
cross-reference (XRI) changes the cross-reference itself (not the target of the
cross-reference).
Markus, do you agree?
=Drummond
On Mon,
Apr 28, 2008 at 6:47 PM, Drummond Reed <>
wrote:
Markus' graph is a such a wonderful visual illustration of
the question being discussed here that I attached it again so I could reference
it in this reply.
My personal view is that there are subtle yet vital
distinctions between the two graphs and sets of XDI statements they represent.
Markus' first graph (upper left corner) represents the
following 3 XDI statements:
#1
=giovanni+phone+home
$a$xsd$string
"+39 06 4451843"
#2
=giovanni
+phone+home
"+39 06 4451843"
#3
=giovanni+phone
+home
"+39 06 4451843"
These statements identify three DIFFERENT literals. With the
right accompanying dictionary, an XDI reasoner could prove the values of each
these literals SHOULD be the same. However, I agree with Markus that, because
each of these literals is a separate instance of a literal in the graph, it
SHOULD require three separate $mod operations to change all three. (Whether an
"intelligent" XDI endpoint could use the dictionary to determine that
a single $mod to one of them SHOULD result in changes to the other two is a
different point. From a strict graph view, the three literals are separate
values.)
In Markus' second graph (lower right corner) represents the
following three 3 XDI statements:
#1
=giovanni+phone+home
$a$xsd$string
"+39 06 4451843"
#2
=giovanni
+phone+home
(=giovanni+phone+home/$a$xsd$string) <--xref to
#1-->
#3
=giovanni+phone
+home
(=giovanni+phone+home/$a$xsd$string) <--xref to #1-->
From a best practices standpoint, this is MUCH cleaner, since
it eliminates the need to have to rely on a reasoner to compare the logical
equivalence of literals. It also follows the general rule of "one
authoritative source, many pointers to that source". Furthermore, a $mod
to any of the following XDI addresses…
=giovanni+phone+home/$a$xsd$string
=giovanni/+phone+home
=giovanni+phone/+home
…would unambiguously result in a modify to the literal
"+39 06 4451843".
Markus, Giovanni, do you agree?
=Drummond
From:
[mailto:]
On Behalf Of Markus Sabadello
Sent: Monday, April 28, 2008 7:20
AM
To: Giovanni Bartolomeo
Cc: Drummond Reed;
Subject: Re: [xdi] XDI dictionary,
reasoner...
Hmm my
current understanding is that literals can not be shared in the graph,
therefore a $mod would only modify one of them.
But let's wait for Drummond to clarify.
Markus
On Sun,
Apr 27, 2008 at 8:13 PM, Giovanni Bartolomeo <>
wrote:
Hello
Markus,
to my understanding, the underlying idea is that there may be one node (literal
in this case) which can be accessed with different XDI RDF statements provided that, through a reasoner, all the statements
are expressing exactly the same concept. Let's consider them
synonyms. A "mod" message simply changes the node's value, so that
all three statements are automatically modified. I think this is a good
feature, I see that e.g. any object oriented programming language allows you to
define more than one pointer to the same object, and the benefits are huge.
What do you think?
Giovanni
At 05.44 26/04/2008, Markus Sabadello wrote:
Sorry for
having been quiet about this so far, but I don't understand it. What does it
mean to say that the three statements "identify the same literal":
#1
=giovanni+phone+home
$type$xsd$string
"+39 06 4451843"
#2
=giovanni
+phone+home
"+39 06 4451843"
#3
=giovanni+phone
+home
"+39 06 4451843"
Assuming they do "identify the same literal", does that mean that
there is just one literal node in the graph, which is shared by three
predicates? If I apply a $mod message to one of the statements, will they all
change?
And is this what you are trying to prove with the dictionary?
Also, the obvious question I have to ask, what would an application look like
that demonstrates this functionality? What problems would you expect an XDI
library to solve here?
Markus
On Thu, Apr 24, 2008 at 12:09 PM, Giovanni Bartolomeo <
> wrote:
Hello Drummond, All,
as for last week's request, I'm reintroducing this issue. After
receiving your answer, I tried to figure out how to prove that two XDI RDF
statements
=giovanni+home+phone/$type$xsd$string/
=giovanni/+home+phone/
does identify the same node. In order to recall the whole issue,
which is now also on the wiki thanks to Drummond, http://wiki.oasis-open.org/xdi/XdiReasoners
I report hereafter the whole message, at the end my elaborations:
********** Drummond replies **********
I am so glad someone finally asked this
question in black and white – I have been thinking about this issue of
"XDI expressivity" for months now given the fundamental capabilities
of XDI RDF. Forgive me for providing an extended answer, but I think the question
can be so revealing about the power of XDI RDF.
First, to answer your question right up
front, "Do those three XDI addresses identify the same literal
node?", my answer is: "You cannot know deterministically without
reference to the XDI dictionaries used by the statements."
The reason is that the three statements
represent three different paths through the XDI RDF graph, and as you pointed
out, each path represents different semantics. So you you really have to drill
all the way down into the graphs, and the statements represented by each graph,
in order to answer your question.
To do this, let's start by looking at the
three graphs visually in X3 Simple (one reason I love X3 Simple is that it lets
you see the visual pattern of the graph while at the same time seeing the
addresses).
#1
=giovanni+phone+home
$type$xsd$string
"+39 06 4451843"
#2
=giovanni
+phone+home
"+39 06 4451843"
#3
=giovanni+phone
+home
"+39 06 4451843"
Now, let's "fully explode" each
of these into ALL the XDI statements they represent.
#1 (5 statements)
=giovanni
$has
+phone
=giovanni+phone
$has
+home
$type
$has
$xsd
$type$xsd
$has
$string
=giovanni+phone+home
$type$xsd$string
"+39 06 4451843"
#2 (3 statements)
=giovanni
$has
+phone+home
+phone
$has
+home
=giovanni
+phone+home
"+39 06 4451843"
#3 (2 statements)
=giovanni
$has
+phone
=giovanni+phone
+home
"+39 06 4451843"
Isn't it fascinating that the first graph
represents five statements, the second three, and the final one only two?
In any case, all three options here (plus
more - see below) appear to be completely valid chains of XDI statements
between the XDI subject =giovanni and the XDI literal "+39 06
4451843". But none of them asserts exactly the same semantics (the only
way to do that would be to use XDI synonyms, i.e., $is statements). However
using an XDI reasoner and an XDI dictionary (which itself is just a set of XDI
statements comprising definitions), you could verify that according to that
dictionary, all these statements identify the same literal node.
In fact the dictionary is pretty short.
Here it is:
+phone
$is$a
<--1-->
+
$type$xsd$string
$has
<--2-->
+home
$a$has
<--3-->
+home
$has$a
<--4-->
+home
$a$has$a
<--5-->
+home
+home
$is$a
<--6-->
+
$has
<--7-->
+phone
$a$has
<--8-->
+phone
$has$a
<--9-->
+phone
$a$has$a
<--10-->
+phone
$type
$has
$xsd
$type$xsd
$has
$string
As short as it is, the semantics
represented by those statements – while crystal clear from a pure XDI semantics
point-of-view – represent a surprising range of grammatical relationships a
human POV. Roughly translated to English, the first ten statements say:
1) A phone is both a subject (noun) and a
label for a type of data (typically called a "phone number", but
often abbreviated in English as just "phone").
2) A phone can have a home, i.e., as a
noun, it can have a possessive relationship with another noun, home.
3) A phone is something a home can have
(possessive relationship).
4) A phone has an attribute of home.
5) Phone is an attribute of a home.
6) Home is a subject.
7) A home can have a phone (possessive
relationship – inverse of #3).
8) A home is something a phone can have
(possessive relationship – inverse of #2).
9) A home has an attribute of phone
(inverse of #5).
10) Home is an attribute of a phone
(inverse of #4).
Armed with that dictionary, an XDI reasoner
can quickly prove that all the following XDI statements identify the same
literal:
=giovanni+phone+home/$type$xsd$string/
=giovanni+home+phone/$type$xsd$string/
=giovanni/+home+phone/
=giovanni/+phone+home/
=giovanni+phone/+home/
=giovanni+home/+phone/
However, if you remove any of those XDI
dictionary statements, some of the above are no longer provably true. For
example, if you remove the statements:
+phone
$has
$home
+home
$a$has
+phone
Then you could no longer prove that the
following two statements identify the same XDI object as the rest:
=giovanni+phone+home/$type$xsd$string/
=giovanni/+phone+home/
They MIGHT identify the same literal as the
rest, but now you have nothing you can prove that with.
There's much more I'd like to say about
this simple dictionary, but I'm out of time. However I encourage everyone who
is interested to study it closely. To test your knowledge, here's a quiz
question:
"Given the dictionary above, how can you prove that it is valid for the
XDI object of all six statements to be a literal string?"
=Drummond
Now, I think the most important part to understand is related to the
semantics underlying the dictionary sentences:
+phone
$has
<--2-->
+home
$has$a
<--4-->
+home
which in English means
2) A phone can have a home, i.e., as a noun,
it can have a possessive relationship with another noun, home.
4) A phone has an attribute of home.
$has, according to XDI RDF model v9, is aggregation,
meaning that
Any two XDI subjects with a $has relationship can be
concatenated into a single XRI representing this relationship.
Thus +phone+home is the way how aggregation is
expressed.
Whereas $has$a is defined as a composition. The object
in the RDF statement is therefore an "attribute" belonging to the
subject.
Example similar to the one in XDI RDF v9:
=giovanni/$has$a/+hair+color; thus =giovanni/+hair+color/+black should be
a valid XDI RDF statement, expressing composition.
Quoting from wikipedia, difference between aggregation and composition:
Aggregation differs from ordinary composition in that it does not imply
ownership. In composition, when the owning object is destroyed, so are the
contained objects. In aggregation, this is not necessarily true. For example, a
university owns various departments (e.g., chemistry), and each department has
a number of professors. If the university closes, the departments will no
longer exist, but the professors in those departments will continue to exist.
Therefore, a University can be seen as a composition of departments, whereas
departments have an aggregation of professors. In addition, a Professor could
work in more than one department, but a department could not be part of more
than one university.
Now, I tried to work out a formal proof using the
assertions 1)-10) but I failed in proving
that all the following XDI statements
identify the same literal:
...
=giovanni+home+phone/$type$xsd$string/
=giovanni/+home+phone/
...
Probably I'm missing something (probably some underlying semantics), however,
can you give some hints? Maybe we can work out the prove once for all and
report this in the wiki/deliverable, as reference?
Thanks,
Giovanni
At 01.32 24/04/2008, Drummond Reed wrote:
4) TECH TOPIC: XDI DICTIONARY AND XDI REASONER
On last week's call Giovanni requested that our tech
topic this week be the
XDI dictionary and XDI reasoner discussion we started
on the list. Wikipedia
has a good article on semantic reasoners:
http://en.wikipedia.org/wiki/Semantic_Reasoner
Drummond created a wiki page to capture the email
thread for further
discussion:
http://wiki.oasis-open.org/xdi/XdiReasoners