uk.ac.ucl.cs.uml.jmi.BehavioralElements.Actions.CollectionActions
Interface IterateAction

All Superinterfaces:
Action, CollectionAction, Element, ExtObject, ModelElement, javax.jmi.reflect.RefBaseObject, javax.jmi.reflect.RefFeatured, javax.jmi.reflect.RefObject
All Known Implementing Classes:
IterateAction_Impl

public interface IterateAction
extends CollectionAction

The iterate action applies an action repeatedly, once for each input slice. A bank of loop variables accumulates the result of the iteration and is eventually passed to the output of the iterate action. This action is a special case of a loop in which the number of iterations is equal to the number of elements in a collection and the elements of the collection are made available to the loop body on successive iterations. The iterate action executes a subaction once for each input slice. The slices are presented from first to last in the scan order for the collection. When the order of computation does not affect the result, for example if the input collection is a set, or if the isUnordered attribute is true, then the slices are presented in an indeterminate (and not necessarily repeatable) order. Like a loop, an iterate action has loop variables that accumulate the effects of the iteration. The subaction accesses the previous values of the loop variables and computes new values for the next execution. The initial values of the loop variables are supplied by inputs to the iterate action, and the final values of the loop variables become the results of the iterate action. If there are no loop variables, the action can have an effect only by writing memory values. An iterate action has two kinds of input pins: the input collections, and scalar values used to initialize the loop variables. The iterate action has one kind of output pins, whose number and types match the loop variable input pins. The iterate action owns internal OutputPins, matching the loop variable output pins. On the initial execution of the subaction, these pins get the values from the loop variable input pins. The iterate action also owns a bank (labeled subinput) of internal OutputPins, equal in number to the collection input pins. The type of each subinput pin matches the type of element containing in the corresponding collection input pin. During each execution of the subaction, these pins hold one slice. The iterate action also designates (as suboutput) a bank of OutputPins owned by the subaction. At the conclusion of the execution of the subaction, the values on these pins become the new values of the loop variable pins. The subaction has access to the subinput values and the loop variable values that change during each execution of the subaction. It may also access available OutputPins in the containing scope. Such values are fixed during the executions of the subactions for any one execution of the iterate action. During one execution, the subaction computes values for the suboutput pins. The values on the suboutput pins become the new values of the loop variable pins on the next iteration of the subaction. When all slices of the collections have been processed, the final values of the loop variables become the values on the result output pins of the overall iterate action. No outputs of the subaction are available outside of it, except for the explicit suboutput pins designated by the iterate action, which are available only to the iterate action itself. The isUnordered attribute states that the order of execution of slices is irrelevant, even though the ordering of elements in each collection is still used to match corresponding elements into slices. The purpose of this attribute would be to remove overspecification of ordering and permit optimization within an implementation, especially if values are not all computed at the same time (such as lazy evaluation). If the input collection shape is a set, then the slices are processed in an indeterminate order.


Method Summary
 List getCollectionInput()
           
 boolean getIsUnordered()
           
 List getLoopVariable()
           
 List getLoopVariableInput()
           
 List getResult()
           
 Collection getSubinput()
           
 List getSuboutput()
           
 void setIsUnordered(boolean isUnordered)
          Setter for atomic property isUnordered)
 
Methods inherited from interface uk.ac.ucl.cs.uml.jmi.BehavioralElements.Actions.CollectionActions.CollectionAction
getSubaction, setSubaction
 
Methods inherited from interface uk.ac.ucl.cs.uml.jmi.BehavioralElements.Actions.ActionFoundation.Action
getAntecedent, getAvailableInput, getAvailableOutput, getConsequent, getGroup, getInputPin, getIsReadOnly, getJumpHandler, getOutputPin, setGroup, setIsReadOnly
 
Methods inherited from interface uk.ac.ucl.cs.uml.jmi.Foundation.Core.ModelElement
getAsArgument, getBehavior, getClientDependency, getComment, getConstraint, getContainer, getDefaultElement, getIsSpecification, getName, getNamespace, getPackage, getPresentation, getReferenceTag, getSourceFlow, getStereotype, getSupplierDependency, getTaggedValue, getTargetFlow, getTemplate, getTemplateArgument, getTemplateParameter, getVisibility, setDefaultElement, setIsSpecification, setName, setNamespace, setTemplate, setVisibility
 
Methods inherited from interface uk.ac.ucl.cs.emofocl.jmi.reflect.extended.ExtObject
extAddObjectListener, extDeepCopy, extDeepCopy, extEquals, extRemoveObjectListener, extValueHash, extVisit
 
Methods inherited from interface javax.jmi.reflect.RefObject
refClass, refDelete, refImmediateComposite, refIsInstanceOf, refOutermostComposite
 
Methods inherited from interface javax.jmi.reflect.RefFeatured
refGetValue, refGetValue, refInvokeOperation, refInvokeOperation, refSetValue, refSetValue
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
 

Method Detail

getIsUnordered

boolean getIsUnordered()
                       throws javax.jmi.reflect.JmiException
Throws:
javax.jmi.reflect.JmiException

setIsUnordered

void setIsUnordered(boolean isUnordered)
                    throws javax.jmi.reflect.JmiException
Setter for atomic property isUnordered)

Throws:
javax.jmi.reflect.JmiException

getSubinput

Collection getSubinput()
                       throws javax.jmi.reflect.JmiException
Throws:
javax.jmi.reflect.JmiException

getSuboutput

List getSuboutput()
                  throws javax.jmi.reflect.JmiException
Throws:
javax.jmi.reflect.JmiException

getLoopVariable

List getLoopVariable()
                     throws javax.jmi.reflect.JmiException
Throws:
javax.jmi.reflect.JmiException

getResult

List getResult()
               throws javax.jmi.reflect.JmiException
Throws:
javax.jmi.reflect.JmiException

getCollectionInput

List getCollectionInput()
                        throws javax.jmi.reflect.JmiException
Throws:
javax.jmi.reflect.JmiException

getLoopVariableInput

List getLoopVariableInput()
                          throws javax.jmi.reflect.JmiException
Throws:
javax.jmi.reflect.JmiException