W3C home > Mailing lists > Public > www-ws@w3.org > November 2003

Re: Attempt to use Owl rule language to express preconditions in Congo

From: Drew McDermott <drew.mcdermott@yale.edu>
Date: Tue, 4 Nov 2003 10:54:20 -0500 (EST)
Message-Id: <200311041554.hA4FsKw26881@pantheon-po01.its.yale.edu>
To: monika@dmu.ac.uk
Cc: daml-process@bbn.com, www-ws@w3.org


   [Monika Solanki]
   I am not sure, if this should be sent on www-ws, hence I am sending this 
   only to the private list. David, pls let me know further.]

I think it should be on www-ws, and am sending it there.

   ***** I have been trying to use the OWL Rule language,

   http://www.cs.man.ac.uk/~horrocks/DAML/Rules/

   for expressing the semantics of preconditions and effects in OWL-S.

   ***** This is the first attempt at expressing preconditions as rules for 
   the Congo Example.
   ***** Feedbacks highly solicited.
   ***** IN ORL (Owl Rule language), rules can be expressed as implications 
   consisting of an antecedent and consequent.

   The preconditions that we have for Congo Example are
    ** Account Exists
    ** Credit Exists

   Semantically, the rule can be defined as, if a buyer has a valid Account 
   and a valid Credit Card, he can buy a book from Congo.
   So, we have as inputs to the book buying service, the following variables
   1. Acct ID
   2. Password
   3. Creditcard Number
   4. ISBN Number

   Corresponding Input Classes,

   <process:Input rdf:ID="AcctID"/>
   <process:Input rdf:ID="Password"/>
   <process:Input rdf:ID="CreditCardNumber"/>
   <process:Input rdf:ID="ISBNNumber"/>

   In ORL, we have to define "Variable" to be used in Rules.

   <owl:Variable rdf:ID="AcctID"/>
   <owl:Variable rdf:ID="Password"/>
   <owl:Variable rdf:ID="CreditCardNumber"/>
   <owl:Variable rdf:ID="ISBNNumber"/>

   In our case the Input Classes are themselves variables. So we can write 
   something like this,

   <owl:sameIndividualAtom>   
       <process:Input rdf:ID="AcctID"/>     
       <process:Input rdf:ID="Password"/>
       <process:Input rdf:ID="CreditCardNumber"/>
       <process:Input rdf:ID="ISBNNumber"/>
       <owl:Variable rdf:ID="AcctID"/>
       <owl:Variable rdf:ID="Password"/>
       <owl:Variable rdf:ID="CreditCardNumber"/>
       <owl:Variable rdf:ID="ISBNNumber"/>
   </owl:sameIndividualAtom>   

   Now, we can define the rule as,

   <!-- here the namespace congoUserProfile, holds the definition of 
   classes and properties pertaining to a user of Congo -->
   <owl:Rule>
       <owl:antecedent rdf:parseType="Collection">
	   <owl:individualPropertyAtom>
	       <owl:propertyPredicate 
   rdf:resource="&congoUserProfile;accountExists/>
		   <owl:argument1 rdf:about="#AcctID" />
		   <owl:argument2 rdf:about="#Password" />
	   </owl:individualPropertyAtom>   
	   <owl:individualPropertyAtom>
	       <owl:propertyPredicate 
   rdf:resource="&congoUserProfile;creditExists/>
		   <owl:argument1 rdf:about="#AcctID" />
		   <owl:argument2 rdf:about="#CreditCardNumber" />
	   </owl:individualPropertyAtom>   
       </owl:antecedent>
       <owl:consequent rdf:parseType="Collection">
       <owl:individualPropertyAtom>
	   <owl:propertyPredicate 
   rdf:resource="&congoUserProfile;allowedToBuy/>
		   <owl:argument1 rdf:about="#AcctID" />
		   <owl:argument2 rdf:about="#ISBNNumber" />
	   </owl:individualPropertyAtom>   
       <owl:Rule>

   ***** Does this make sense ?

The last bit does.  I don't know what the "sameIndividualAtom" stuff is.

   ***** I would also like to discuss, if using rules in this way, helps in 
   avoiding the use of rdf notations (DRS) for expressing logical formulae

I don't understand.  The OWL Rule language _is_ RDF, at least
syntactically.  It appears to use exactly the same tricks as DRS.  OWL
Rule Language's "IndividualPropertyAtom" has precisely the same syntax
and semantics as DRS's "Atomic_formula."  The only differences between
DRS and ORL are (a) the way variables are handled; (b) the restriction
in OWL Rules to unary or binary predicates.

My assumption is that OWL-S should use ORL if at all possible
simply because it is going to be the standard.  There may be a slight
problem using ORL for preconditions and effects, because the former
is like a rule with no consequent, and the latter like a rule with no
antecedent; but we can use some ad hoc extension of ORL until the
gods invent a notational variant of it and declare it to be elegant.

-- 
                                   -- Drew McDermott
                                      Yale Computer Science Department
Received on Tuesday, 4 November 2003 10:54:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 July 2007 12:25:44 GMT