W3C home > Mailing lists > Public > public-sws-ig@w3.org > December 2003

RE: a simple question

From: Rubén Lara <Ruben.Lara@uibk.ac.at>
Date: Tue, 2 Dec 2003 15:00:37 +0100
To: "'titi roman'" <dumitru.roman@deri.ie>, <public-sws-ig@w3.org>
Message-ID: <000e01c3b8dc$ad127610$1c0110ac@nwg.local>
In my opinion, here two problems are mixed:
1)       How to describe predicates such as “nearest”
2)       The way to describe preconditions and effects
 
In 1), using rules seems to be a natural approach. But, is it realistic
to expect that a requester (a human user or a business process) will
define “nearest” to specify his goal in this way?
In 2), the semantics of preconditions and effects doesn’t change if you
specify them using a rule. Therefore, probably depending on the
reasoning mechanism you want to use to reason about the service
functionality, one description will be more appropriate than the other.
For example, if you intend to apply AI planning techniques (as I think
is the approach of OWL-S), using preconditions and effects and not rules
might be the most natural way to do it.
So defining the rule “_if a buyer has a valid Account and a valid Credit
Card, then he can buy the book_” might not be more comfortable than
saying that valid(Account) and valid(CreditCard) are preconditions and
buy(Book) and effect.
 
Best regards
 
Rubén Lara Hernández
 
Digital Enterprise Research Institute (DERI) Innsbruck
 <http://deri.semanticweb.org/> http://deri.semanticweb.org/
Institut für Informatik (IFI)
Universität Innsbruck
Technikerstrasse 13, 6020 Innsbruck
Austria
 
Phone: +43 512 507 6489
Fax:     +43 512 507 9872
E-mail: Ruben.Lara@uibk.ac.at
http://homepage.uibk.ac.at/~c703225/
-----Original Message-----
From: public-sws-ig-request@w3.org [mailto:public-sws-ig-request@w3.org]
On Behalf Of titi roman
Sent: Dienstag, 02. Dezember 2003 10:27
To: public-sws-ig@w3.org; www-rdf-rules@w3.org
Subject: a simple question
 
Hi,
 
 
Suppose we have a simple service having as input the current location of
a user and as output the nearest airport.
I suppose that the web service should describe what "nearest" means. A
way to describe this, I think, is by using rules. 
Probably the definition of "nearest" could be:
 
nearest(current_location, X):- airport(X),
                               airport(Y),
                               X =\= Y,
                               (location(X) - current_location) <
(location(Y) - current_location). 
 
Could anybody explain me how I can use OWL Rule Language [1] in
specifying such a rule, taking 
into account that in OWL Rule Language only variables that occur in the
antecedent of a rule may occur in the consequent.
And one more thing: in OWL-S, a rule language should be deployed only
for the reason that it may help in describing 
preconditions and effects in a more comfortable way(i.e. not having to
use for example in OWL-S Profile the definitions of 
"preconditions" and "effect", but rather considering the rule:
 
_if a buyer has a valid Account and a valid Credit Card, then he can buy
the book_
 
<!-- inputs to the service -->
<profile:Input rdf:ID="AcctID"/>
<profile:Input rdf:ID="Password"/>
<profile:Input rdf:ID="CreditCardNumber"/>
<profile:Input rdf:ID="ISBNNumber"/>
 
<!-- we need to define “Variables”  to be used in rules-->
<owlr:Variable rdf:ID="_AcctID"/>
<owlr:Variable rdf:ID="_Password"/>
<owlr:Variable rdf:ID="_CreditCardNumber"/>
<owlr:Variable rdf:ID="_ISBNNumber"/>
 
<!-- specification that the inputs are the actual variables of the
rule-->
<owlr:sameIndividualAtom>
    <owlr:Variable rdf:ID="_AcctID"/>
    <owlr:Variable rdf:ID="_Password"/>
    <owlr:Variable rdf:ID="_CreditCardNumber"/>
    <owlr:Variable rdf:ID="_ISBNNumber"/>
    <profile:Input rdf:ID="AcctID"/>
    <profile:Input rdf:ID="Password"/>
    <profile:Input rdf:ID="CreditCardNumber"/>
    <profile:Input rdf:ID="ISBNNumber"/>
</owlr:sameIndividualAtom> 
 
<!-- the rule is defined-->
<owlr:Rule>
    <!—the antecedent of the rule  is defined-->
    <owlr:antecedent rdf:parseType="Collection">
 <owlr:individualPropertyAtom>
     <owlr:propertyPredicate rdf:resource=accountExists/>
  <owlr:argument1 rdf:about="_AcctID" />
  <owlr:argument2 rdf:about="_Password" />
 </owlr:individualPropertyAtom>
 <owlr:individualPropertyAtom>
     <owlr:propertyPredicate rdf:resource=creditExists/>
  <owlr:argument1 rdf:about="_AcctID" />
  <owlr:argument2 rdf:about="_CreditCardNumber" />
 </owlr:individualPropertyAtom>   
    </owlr:antecedent>
    <!—the consequent  of the rule  is defined-->
    <owlr:consequent rdf:parseType="Collection">
       <owlr:individualPropertyAtom>
    <owlr:propertyPredicate rdf:resource=allowedToBuy/>
  <owlr:argument1 rdf:about="_AcctID" />
  <owlr:argument2 rdf:about="_ISBNNumber" />
 </owlr:individualPropertyAtom>
    </owlr:consequent>
<owlr:Rule>
 
) or for the reason that it gives more expressivity (if yes, please
explain what this expressivity 
means and how it is achieved or can be achieved). 
 
Thank you,
Titi Roman 
 
[1] http://www.daml.org/rules/proposal/rules-all.html
Received on Tuesday, 2 December 2003 09:01:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 16 March 2008 00:10:53 GMT