Re: Datatypes: unhappy of Bristol

[...]

> The S-B style says that in the triple
>   <Jenny> <ageB> "10".
> Jenny's age is a string (range constraints do not change this).
> The triplet approach (aka S-A) permits us to say something like:
>
> <Tommy> <ageA> _:b .
> _:b <integer> "10" .
>
> and Tommy's age is the integer 10.
>
> Whatever we do to the range constraints, or however clever we are with
the
> age properti(es) I do not believe we can get the entailment:
>
> <Jenny> <age> _:x .
> <Tommy> <age> _:x .

Jeremy, I can feel that you are unhappy now,
but I think that graph ***can be entailed***
(wether we want to do that now is a different matter,
but it can be entailed)

so we start given

==== j1.nt
<http://example.org/dt#Jenny> <http://example.org/dt#ageB> "10".

<http://example.org/dt#Tommy> <http://example.org/dt#age> _:b .
_:b <http://www.w3.org/2001/XMLSchema#integer> "10" .
====

and try to entail

==== j2.nt
<http://example.org/dt#Jenny> <http://example.org/dt#age> _:x .
<http://example.org/dt#Tommy> <http://example.org/dt#age> _:x .
====

we have to use a bit of owl for that
and also some (for the moment) dedicated implications
(which make use of skolem functions btw)
and age and ageB are of course different properties

=== jdt.n3
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix owl: <http://www.w3.org/2001/10/daml+oil#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <dt-rules#> .

xsd:integer a owl:UnambiguousProperty .
{ ?o1 owl:sameIndividualAs ?o2 . ?s1 ?p ?o1 . ?s2 ?p ?o2 } log:implies { ?s2 ?p ?o1 } .

{ ?s <http://example.org/dt#ageB> ?o } log:implies { ?s <http://example.org/dt#age> [ :skf ?s, ?o ] } .
{ ?s <http://example.org/dt#ageB> ?o } log:implies { [ :skf ?s, ?o ] xsd:integer ?o } .
====

and we then get

====
C:\www.agfa.com\w3c\n3>java Euler j1.nt jdt.n3 owl-rules.n3 j2.nt
# Generated with http://www.agfa.com/w3c/euler/#R29053 on Sat Feb 23 18:44:57 CET 2002
# for query file:/www.agfa.com/w3c/n3/j2.nt
# given [file:/www.agfa.com/w3c/n3/j1.nt, file:/www.agfa.com/w3c/n3/jdt.n3, file:/www.agfa.com/w3c/n
3/owl-rules.n3]

@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix ns: <file:/www.agfa.com/w3c/n3/owl-rules#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <file:/www.agfa.com/w3c/n3/dt-rules#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix owl: <http://www.w3.org/2001/10/daml+oil#>.

 {{?o2 owl:sameIndividualAs ?o2} log:forSome ?o2.
   {<http://example.org/dt#Jenny> <http://example.org/dt#ageB> "10"} log:implies
  {<http://example.org/dt#Jenny> <http://example.org/dt#age> [ :skf <http://example.org/dt#Jenny>; :
skf
      "10"]}.
   {<http://example.org/dt#Jenny> <http://example.org/dt#ageB> "10"} log:implies
  {<http://example.org/dt#Jenny> <http://example.org/dt#age> [ :skf <http://example.org/dt#Jenny>; :
skf
      "10"]}} log:implies
{<http://example.org/dt#Jenny> <http://example.org/dt#age> [ :skf <http://example.org/dt#Jenny>; :sk
f
      "10"]}.
 {{xsd:integer a owl:UnambiguousProperty.
     {{?o2 owl:sameIndividualAs ?o2} log:forSome ?o2.
      _:b_66696c653a2f7777772e616766612e636f6d2f7733632f6e332f6a312e6e74 xsd:integer "10".
       {<http://example.org/dt#Jenny> <http://example.org/dt#ageB> "10"} log:implies
      {[ :skf
  <http://example.org/dt#Jenny>; :skf "10"] xsd:integer
      "10"}} log:implies
    {[ :skf
  <http://example.org/dt#Jenny>; :skf "10"] xsd:integer
      "10"}.
    _:b_66696c653a2f7777772e616766612e636f6d2f7733632f6e332f6a312e6e74 xsd:integer "10"} log:implies

  {[ :skf
  <http://example.org/dt#Jenny>; :skf "10"] owl:sameIndividualAs
      _:b_66696c653a2f7777772e616766612e636f6d2f7733632f6e332f6a312e6e74}.
   {<http://example.org/dt#Jenny> <http://example.org/dt#ageB> "10"} log:implies
  {<http://example.org/dt#Jenny> <http://example.org/dt#age> [ :skf <http://example.org/dt#Jenny>; :
skf
      "10"]}.
  <http://example.org/dt#Tommy> <http://example.org/dt#age> _:b_66696c653a2f7777772e616766612e636f6d
2f7733632f6e332f6a312e6e74} log:implies
{<http://example.org/dt#Tommy> <http://example.org/dt#age> [ :skf <http://example.org/dt#Jenny>; :sk
f
      "10"]}.

# Proof found for file:/www.agfa.com/w3c/n3/j2.nt in 161 steps (5469 steps/sec)
====

that can definitely be improved, it is just to get an idea...

--
Jos

Received on Saturday, 23 February 2002 12:56:42 UTC