It seems that there is a problem with the sequencing of
FSMDirector.prefire()  and FSMDirector.fire() methods. The
FSMDirector.prefire() method calls the prefire() method of the refining
actor (of the current FSM state) BEFORE transferInputs() has been called by
the CompositeActor containing the FSMDirector.  If the refining actor is an
SDF domain, prefire() returns false if any input port has no token available
(which will be true in this case).

The following example illustrates this: The top level SDF source generates a
sequence of 10 tokens and passes it through a trivial FSM CompositeActor to
an SDF-domain refinement. The SDF refinement is a homogeneus actor
(consumes/generates 1 token / iteration).

We think the problem stems from the use of the _fireRefinement
boolean-valued field of FSMDirector which is set during prefire() and
subsequently checked in fire() and postfire().  When we look at the design
document Figures 8.14-15, we would have expected to see the refinement
actor's prefire(), fire() and postfire() methods to be called from
FSMDirector.fire().

We surmise that the intent of the current implementation is motivated by CT
domain issues related to multiple firings to reach a fixed point, but it has
this unexpected side effect.

Sean Simmons
Zoltan Kemenczy


 <<SDF-FSMComposite.xml>> 

SDF-FSMComposite.xml

Reply via email to