Re: Proposed extensions to OWL?

Roger, using Cwm, you can write

//////
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix : <#>.

<> log:forAll :X, :Y, :Z.
{:X :length-in :Y. (:Y 2.54) math:product :Z} => {:X :length-cm :Z}.
\\\\\\


as

//////
<!-- Processed by Id: cwm.py,v 1.129 2003/04/08 16:12:43 timbl Exp -->
<!--     using base file:/temp/length.n3-->


<rdf:RDF xmlns="file:/temp/length.n3#"
    xmlns:log="http://www.w3.org/2000/10/swap/log#"
    xmlns:math="http://www.w3.org/2000/10/swap/math#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

    <rdf:Description rdf:about="">
        <log:forAll rdf:resource="#X"/>
        <log:forAll rdf:resource="#Y"/>
        <log:forAll rdf:resource="#Z"/>
    </rdf:Description>

    <rdf:Description>
        <log:is rdf:parseType="Quote">
            <rdf:Description rdf:about="#X">
                <length-in rdf:resource="#Y"/>
            </rdf:Description>
            <rdf:Description>
                <first xmlns="http://www.daml.org/2001/03/daml+oil#"
                    rdf:resource="#Y"/>
                <rest xmlns="http://www.daml.org/2001/03/daml+oil#"
                    rdf:parseType="Resource">
                    <first rdf:datatype
="http://www.w3.org/2001/XMLSchema#double">2.54</first>
                    <rest rdf:resource
="http://www.daml.org/2001/03/daml+oil#nil"/>
                </rest>
            </rdf:Description>                   <------o
            <rdf:Description rdf:about="#_g1">   <------o
                <math:product rdf:resource="#Z"/>       |
            </rdf:Description>                          |
        </log:is>                                       |
        <log:implies rdf:parseType="Quote">             |
            <rdf:Description rdf:about="#X">            |
                <length-cm rdf:resource="#Z"/>          |
            </rdf:Description>                          |
        </log:implies>                                  |
    </rdf:Description>                                  |
</rdf:RDF>                                              |
\\\\\\                                                  |
                                                        |
                                                        |
but I think that it is not needed to have lines  -------o

Let's stay with RDF graphs...

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


                                                                                                                          
                    "Roger L. Costello"                                                                                   
                    <costello@mitre.org>        To:     www-rdf-interest@w3.org                                           
                    Sent by:                    cc:     "Costello,Roger L." <costello@mitre.org>                          
                    www-rdf-interest-requ       Subject:     Re: Proposed extensions to OWL?                              
                    est@w3.org                                                                                            
                                                                                                                          
                                                                                                                          
                    2003-06-15 12:27 PM                                                                                   
                                                                                                                          
                                                                                                                          





Jos De_Roo wrote:
>
> we tend to use RDF interpretation properties for that
> and math: properties and N3 conversion rules such as eg
>
> {?X eg:length-in ?Y} => {?X eg:length-cm (?Y 2.54).math:product}.
> {?X eg:length-cm ?Y} => {?X eg:length-in (?Y 2.54).math:quotient}.

[snip]

Hi Jos,

Does this have an XML syntax?  My interest is in how to express the
mathematical relationships using an XML syntax.  /Roger



>                     "Roger L. Costello"
>                     <costello@mitre.org>        To:
www-rdf-interest@w3.org
>                     Sent by:                    cc:
robin.berjon@expway.fr, "Costello,Roger L." <costello@mitre.org>
>                     www-rdf-interest-requ       Subject:     Proposed
extensions to OWL?
>                     est@w3.org
>
>
>                     2003-06-14 01:20 PM
>
>
>
> Hi Folks,
>
> Yesterday I sent out a message asking about technologies to express
> mathematical relationships.  Robin Berjon responded with a very
> interesting idea.  I would like to get your thoughts on it, and see if
> collectively we can come up with something cool.
>
> First I will show you a slightly modified version of Robin's proposal,
> then I will show Robin's original proposal.
>
> Robin's Idea Slightly Modified
>
> The idea is to extend OWL and base the solution on xPath.
>
> Suppose that I would like to state that these two properties are
> equivalent via a conversion factor:
>
>      length-in, length-cm
>
> i.e., length in inches, and length in centimeters
>
> The conversion factor is:
>
>     length-in = length-cm / 2.54
>     length-cm = length-in * 2.54
>
> With today's OWL here is how you would define these properties:
>
>    <owl:DatatypeProperty rdf:ID="length-in">
>       <rdfs:range rdf:resourse="&xsd;decimal"/>
>    </owl:DatatypeProperty>
>
>    <owl:DatatypeProperty rdf:ID="length-cm">
>       <rdfs:range rdf:resourse="&xsd;decimal"/>
>    </owl:DatatypeProperty>
>
> The proposal is to extend OWL to allow you to assert that these two
> properties are equivalent by the above conversion factor.  Here's how it
> might look:
>
>    <owl:DatatypeProperty rdf:ID="length-in">
>       <owl:equivalentProperty rdf:resource="#length-cm"
>                         owl-x:conversionFactor="current() * 2.54"/>
>       <rdfs:range rdf:resourse="&xsd;decimal"/>
>    </owl:DatatypeProperty>
>
>    <owl:DatatypeProperty rdf:ID="length-cm">
>       <owl:equivalentProperty rdf:resource="#length-in"
>                         owl-x:conversionFactor="current() / 2.54"/>
>       <rdfs:range rdf:resourse="&xsd;decimal"/>
>    </owl:DatatypeProperty>
>
> where:
>    owl-x is an OWL eXtension namespace,
>    current() is the xPath function referring to the current node.
>
> Now let me show you Robin's idea:
>
> Robin's idea is also to base the solution on xPath. Here's what Robin
> said:
>
> "For instance:
>
> <foo:PropertyEquivalence from='measure:inch'
>                           to='measure:cm'
>                           convert='$in_1 * 2.54'/>
>
> <foo:PropertyEquivalence from='measure:cm'
>                           to='measure:in'
>                           convert='$in_1 div 2.54'/>
>
> would allow you to declare that the following are equivalent:
>
> <geo:Distance>
>    <measure:inch>2</measure:inch>
> </geo:Distance>
>
> <geo:Distance>
>    <measure:cm>5.08</measure:cm>
> </geo:Distance>
>
> You could allow for multiple inputs to your binding:
>
> <foo:PropertyEquivalence
>                   from='size:width/measure:meter
> size:length/measure:meter'
>                   to='size:surface/measure:squareMeter'
>                   convert='$in_1 * $in_2'/>
>
> and perhaps equivalentize, depending on whether it makes sense in that
> context:
>
> <flat:Bedroom>
>    <size:width><measure:meter>4</measure:meter></size:width>
>    <size:length><measure:meter>5</measure:meter></size:length>
> </flat:Bedroom>
>
> <flat:Bedroom>
>    <size:surface>
>      <measure:squareMeter>20</measure:squareMeter>
>    </size:surface>
> </flat:Bedroom>
>
> so that given the first you could still query for flat:Bedrooms that
> are larger than 20sqm.
>
> You may need to throw in stuff from EXSLT Math if you want more than
> XPath provides."
>
> ....
>
> Okay, those are the two ideas thus far.  What do you think?  Feel free
> to add your own ideas.  If this whole approach is bad, feel free to say
> so. The intent here is to brainstorm.  If these conversion rules are
> better stated using another technology (e.g., RuleML) please say so.
> /Roger

Received on Sunday, 15 June 2003 08:21:52 UTC