Re: toward a minimal datatypes spec: hmm...

[...]

> I make heavy use of the "local idiom"
> and depend completely on tidy literals.

similar use and dependency

> Then I spent a while boiling it down to
> a specification of datatypes in N3...
>   http://www.w3.org/2000/10/swap/util/datatypes.n3

wow!
$Id: datatypes.n3,v 1.1 2002/08/02 06:52:08 connolly Exp $
(just wonder how late that was in your timezone...)

> I tried various levels of specification,
> trying to find one that was _just_ expressive
> enough to meet the requirements I see.
>
> I think it's worthwhile to have some support
> for the "global idiom". The design I came
> up with is:
>
> ---
> :rangeSyntax a r:Property;
>   s:range :Datatype.
>
> @prefix log: <http://www.w3.org/2000/10/swap/log#> .
>
> this log:forAll :P, :L, :DT.
>
> { [] :P :L.
>   :P :rangeSyntax :DT.
> } log:implies { [] :DT :L }.

is that a comprehension :-)
seems close to what we tested
{ <http://www.agfa.com/w3c/euler/rdfd-rules#rule2> . 
  ?p rdfd:dcrange ?d .
  ?o rdfd:lex ?l . ?s ?p ?o
} log:implies { ?o ?d ?l } .

> :rangeSyntax s:comment { # example...
>   { ex:age :rangeSyntax dt:integer.
>     ex:jenny ex:age "10" }
>     log:implies { [] dt:integer "10" } }.
> ---
>
> But to actually specify even just the
> "local idiom" raises some issues...
>
> I have come to the conclusion that the minimum
> spec depends on two things:
>   - UnambiguousProperty (aka InverseFunctionalProperty)

right, owl:InverseFunctionalProperty

>   - regular expressions

that's indeed an interesting new element

> i.e. it ensures that from
>
> _:x dt:date "2001-07-01".
> _:x ex:weather ex:sunny.
> _:y dt:date "2001-07-01".
> _:y ex:winningTeam ex:tigers.
>
> we can conclude
>
> _:z ex:weather ex:sunny.
> _:z ex:winningTeam ex:tigers.

indeed

> This involves a notion of unambiguous property
> and equality in the model theory
> for datatypes... which would be silly to do without
> giving them names, i.e. ont:UnambiguosProperty
> and ont:equivalentTo.

that's right (or value is a function term???)

> So I'm starting to wonder if it makes more sense
> to specify datatypes in terms of some of the WebOnt
> features... or move some WebOnt features
> into RDFS or something...
>
> And re regular expressions, any sane datatypes
> spec should ensure...
>
>  dt:integer rdfs:range _:numerals.
>  _:numerals :stringsThatMatch "([+-])?\\d+(\\.\\d*)?".
>  _:x dt:integer "not a numeral".
>
> is a contradiction.
>
> Maybe we could expect RDF datatypes implementation
> to do more than check strings against regular expressions
> that we give them, but I'm not sure how much more
> we'll get... I'm not sure if I see sufficient
> motivation to check that "2002-02-29" isn't
> a good lexical form for a date. Hmm... maybe I would
> check that one, but I'm not sure about
> all the constraints on duration syntax.
> Or... hmm... maybe they have test materials that
> we could import in bulk.
>
> But we can't just wave our hands and say
> "when DT is in the XML Schema namespace,
>  VVV DT LLL means whatever their spec says it
> means" because their spec includes some
> datatypes that are ambiguous: QName
> and union types; I just reported this
> as a bug.

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

Received on Friday, 2 August 2002 09:12:31 UTC