Re: 2 simple proposals for refining OWL-S iteration

First a small comment about the renaming. Maybe we should use the name 
"iterateBody" instead of "iterateProcess" because the loop body can 
contain any control construct not just process perfroms.

Second, my long overdue action item about a proposal far a new loop 
construct to support iterating over lists. An example use case is when 
one service outputs a list we may want to call another service for each 
element of the list. Right now it is not possible to achive this with 
the current iterate constructs. My initial proposal is to add the 
following definition:

For-Each (subclass of Iterate) with properties
  theList (with range ValueOf)
  theLoopVar (with range Variable)

The semantics would be at each iteration of the loop, the loop variable 
would be bound to the next element of the list until all the items have 
been iterated. One problem is we cannot put a restriction on "theList" 
property to say that we will only allow instances of objList:List.

An example usage of this class is as follows:

<For-Each>
     <theList>
          <ValueOf>
                 <fromProcess rdf:resource="#someProcess"/>
                 <theVar rdf:resource="#someOutput"/>
          </ValueOf>
     </theList>
     <theLoopVar>
          <Variable rdf:ID="aVar"/>
     </theLoopVar>
     <iterateBody>
          <process:Perform>
              <process:process rdf:resource="#anotherProcess"/>
              <process:hasDataFrom>
                <process:InputBinding>
                  <process:toParam rdf:resource="#someInput"/>
                  <process:valueSource>
                    <process:ValueOf>
                      <process:theVar rdf:resource="#aVar"/>
                      <process:fromProcess 
rdf:resource="&process;#TheParentPerform"/>
                    </process:ValueOf>
                  </process:valueSource>
                </process:InputBinding>
              </process:hasDataFrom>
          </process:Perform>
     </iterateBody>
</For-Each>

For this example to work we also need to change the range of the 
"theVar" property in ValueOf class from "Parameter" to "Variable" whihc 
would also let us to use local variables as arguments to "Perform"s.

Any comments and suggestions are welcome,
Evren.

David Martin wrote:

>
> 2 simple proposals regarding iteration in OWL-S (proposals for version 
> 1.2) -
>
> Currently we have this:
>
> Iterate (subclass of ControlConstruct)
>   with no properties (sort of an "abstract class")
>
> Repeat-While (subclass of Iterate) with properties
>   whileCondition
>   whileProcess
>
> Repeat-Until (subclass of Iterate) with properties
>   untilCondition
>   untilProcess
>
> -----
>
> Proposal (1)
>
> Delete properties whileProcess and untilProcess, and replace them with 
> iterateProcess, a property with domain Iterate
>
> -----
>
> Proposal (2)
>
> Create a new subclass of Iterate, called "Iterate-N", with a
> property called "numberOfIterations" that's an integer.
>
> (When instantiated, this property could be given a constant value or 
> bound to some process parameter using (I think) existing dataflow 
> mechanisms.)
>
> Comments, anyone?
>
> Thanks,
> - David
>
>
>
>

Received on Tuesday, 8 February 2005 18:13:51 UTC