W3C home > Mailing lists > Public > public-sws-ig@w3.org > March 2004

Re: IF-THEN-ELSE statement and conditions in OWL-S

From: Drew McDermott <drew.mcdermott@yale.edu>
Date: Wed, 3 Mar 2004 16:54:40 -0500 (EST)
Message-Id: <200403032154.i23LseA03897@pantheon-po02.its.yale.edu>
To: public-sws-ig@w3.org


> [Mike Sibler]
> For a project I'm working on I try to express the following scenario
> as = a composite process. An atomic process A produces an boolean
> output, = saying the output property is either "true" or
> "false". Depending on the value = of that output I want to start
> either atomic process B or atomic process C.

> I don't know if I'm on the right track but according
> http://www.daml.org/services/owl-s/1.0/owl-s.html I can use the =
> IF-THEN-ELSE statement provided in OWL-S v.1.0 to model
> that. Unfortunately I wasn't = able so far to find an example
> implementation of it. What I'm really = concerned about expressing
> the condition since I've no glue how to express the condition
> mentioned above and I know that there is not yet on official
> standard for expressing conditions in OWL-S.

We (the OWL-S conspiracy) are still hammering out the details of how
to combine parameter notation with condition notation.  I'll sketch
one way to fit things together, but in what follows I'm speaking for
myself, not the OWL-S people in general.

A composite process is a structure of activities (simple processes and
composite subprocesses).  A _step_ of such a composite is an
invocation of (i.e., a request to "perform") a named process.  The
named process will have output parameters, and we have to have a way
to specify how those get bound in the composite process that invoked
the named process.  

In your scenario, suppose we have an invocation followed by an
IF-THEN-ELSE: 

   Sequence
     components
      (A
       If-then-else
	 ifCondition ???
	 then B
	 else C)

(Translation into RDF/XML left as execise for readers not suffering from
repetitive-motion stress disorder).

The problem is how to make A communicate with the "???".  Suppose A is
an invocation of a named process with output parameter 'res'.  Then we
need a way to refer to the "res output of that occurrence of A."  We
introduce a tagging mechanism for that purpose:

   Sequence
     components
      (Tagged
	 tag S
	 action
	   Invoke A
       If-then-else
	 ifCondition (= (res S) true)
	 then B
	 else C)

For instance, A might be "check credit card," with a boolean result
'res'.  

This way of passing data around works fine, but for If-then-else's I
think it would be better if the ifCondition were a real condition
rather than just a check that some output has a value.  Somewhere in
either this process or the definition of A it needs to say "If the
result is true, then person P has a good credit card, otherwise P does
not."  One possibility is:

   Sequence
     components
      (Tagged
	 tag S
	 action
	   Invoke A
	      input-binding
		 parameter credit-card
		 value ...
	      input-binding
		 parameter cc-owner
		 value P
	      effect-in-context
		 Conditional effect
		    condition (res S)
		    effect (good-credit-card P))
	      effect-in-context
		 Conditional effect
		    condition (not (res S))
		    effect (bad-credit-card P)
       If-then-else
	 ifCondition (good-credit-card P)
	 then B
	 else C)

"effect-in-context" (which I just made up) allows us to specify
effects of a step that occur here, but might not occur every time the
process is invoked.  (It also allows me to avoid spelling out the
details of process A.)

I've left conditions parenthesized, but they can be encoded in RDF by
writing stuff like

   classMembership
      individual P
      class Good-credit-cards

(a rough parady of OWL Rules.)

I hope this is useful.


-- 
                                             -- Drew McDermott
                                                Yale University CS Dept.
Received on Wednesday, 3 March 2004 16:54:42 GMT

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