Re: n3 progress

Dan Connolly wrote:
> On Dec 13, 2006, at 8:28 PM, jos.deroo@agfa.com wrote:
>> I'm finding an issue with euler n3->yap interpretation
>> for the http://www.w3.org/2002/12/cal/calAx.n3 rule
>>
>> { ?P a :DateProperty.
>>   ?E ?P ?WHEN.
>>   # we skip the dtlit step of splitting ?WHEN apart
>>   (?WHEN "(\\d\\d\\d\\d)-" ) str:search (?YYYY).
>>   (?YYYY 0) math:sum ?YEARNUM. # sum coerces strings to int
>> } => { [ is k:YearFn of ?YEARNUM ] }.
>>
>> it actually gives a wrong intermediate N3 translation
>>
>> {?P a p0:DateProperty. ?E ?P ?WHEN. (?WHEN "(\\d\\d\\d\\d)-") 
>> str:search
>> (?YYYY). (?YYYY 0) math:sum ?YEARNUM} =>
>> {?YEARNUM!k:YearFn }.
>
> That does look like a different way to say the same thing. Does
> ?YEARNUM!k:YearFn not result in a new bnode/skolem constant?

Haven't fixed that yet, but one indeed needs Skolem functions
and for euler (at this moment) it should be done explicitly in
the antecedent of a rule, like e.g.

{ ?E cal:attendee ?WHO.
  ?E cal:location ?WHERE.
  ?WHERE far ?HOME .
  ?WHO foaf:based_near ?HOME.
  ?SKF e:tuple (:skf2 ?WHO ?E ?HOME ?WHERE).
} =>
{
  ?SKF a k:Translation-RoundTrip;
    k:passengers ?WHO;
    k:temporallyIntersects ?E;
    k:origin-RoundTrip ?HOME;
    k:destination-RoundTrip ?WHERE.
}.

Besides that I have found more things in euler that
could be improved... (now seems like 5 major issues..)


When I run

bash .cwm http://www.w3.org/2000/10/swap/test/one_trip_per_month.n3
  http://www.w3.org/2002/12/cal/calAx.n3
  http://www.w3.org/People/Connolly/home-smart.rdf
  --think 
--filter=http://localhost/.context+%40prefix+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E.+%7B%3FX+owl%3AdifferentFrom+%3FY%7D+%3D%3E+%7B%3FX+owl%3AdifferentFrom+%3FY%7D.

cwm gives

    "2006-11-12"^^dt:date     :differentFrom dwc:_5069_rif4 .

    "2006-12-14"^^dt:date     :differentFrom dwc:_5099_tag200612 .

    "2007-01-20"^^dt:date     :differentFrom dwc:_5320_ts .

    "2007-04-22"^^dt:date     :differentFrom dwc:_5453_hastac .

    "2007-05-13"^^dt:date     :differentFrom dwc:_5055_www2007 .

    "2007-05-18"^^dt:date     :differentFrom trav:XTech .

    "2007-06-05"^^dt:date     :differentFrom dwc:eswc07 .

    "2007-07-27"^^dt:date     :differentFrom dwc:aaai2007 .

    <#_g0>     :differentFrom <#_g0>,
                <#_g1> .

    <#_g1>     :differentFrom <#_g0>,
                <#_g1> .


and when I run

bash .cwm http://www.w3.org/2000/10/swap/test/one_trip_per_month.n3
  http://www.w3.org/2002/12/cal/calAx.n3
  http://www.w3.org/People/Connolly/home-smart.rdf
  --think 
--filter=http://localhost/.context+%40prefix+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E.+%7B%3FX+owl%3AdifferentFrom+%3FX%7D+%3D%3E+%7B%3FX+owl%3AdifferentFrom+%3FX%7D.

it doesn't give the contradictions??
(the difference is asking for ?X owl:differentFrom ?X
instead of ?X owl:differentFrom ?Y)


That is what we also get from euler5 i.e. no derived contradictions
(after some local tweaking to work around our issues)

...
  r:gives {
    @forSome var:e0. @forSome var:e1. var:e0 owl:differentFrom var:e1.
    @forSome var:e1. @forSome var:e0. var:e1 owl:differentFrom var:e0.
    "2007-05-18"^^xsd:date owl:differentFrom :XTech.
    "2006-12-14"^^xsd:date owl:differentFrom dwc:_5099_tag200612.
    "2007-01-20"^^xsd:date owl:differentFrom dwc:_5320_ts.
    "2007-05-13"^^xsd:date owl:differentFrom dwc:_5055_www2007.
    "2006-11-12"^^xsd:date owl:differentFrom dwc:_5069_rif4.
    "2007-07-27"^^xsd:date owl:differentFrom dwc:aaai2007.
    "2007-04-22"^^xsd:date owl:differentFrom dwc:_5453_hastac.
    "2007-06-05"^^xsd:date owl:differentFrom dwc:eswc07.}].



-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Thursday, 14 December 2006 23:46:53 UTC