ptolemy.caltrop.ddi
Class SDF
java.lang.Object
ptolemy.caltrop.ddi.AbstractDDI
ptolemy.caltrop.ddi.Dataflow
ptolemy.caltrop.ddi.DataflowWithRates
ptolemy.caltrop.ddi.SDF
- All Implemented Interfaces:
- Executable, Initializable, DDI
public class SDF
- extends DataflowWithRates
A plugin for the SDF domain. In SDF, a CAL actor is valid if:
- The rates of each action are statically computable, and these
rates are the same for each action.
- There is at least one unguarded action.
This plugin also adds attributes containing rate information to the
ports of the actor.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: SDF.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Christopher Chang, Steve Neuendorffer
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.caltrop.ddi.Dataflow |
_actions, _actor, _actorInterpreter, _context, _currentStateSet, _currentTransitions, _env, _inputPorts, _lastFiredAction, _outputPorts, _ptActor |
Constructor Summary |
SDF(TypedAtomicActor ptActor,
caltrop.interpreter.ast.Actor actor,
caltrop.interpreter.Context context,
caltrop.interpreter.environment.Environment env)
Create an new SDF DDI. |
Method Summary |
java.lang.String |
getName()
Get the name of this DDI. |
boolean |
isLegalActor()
In SDF, an actor is legal if:
The rates of each action are statically computable, and
these rates are the same for each action. |
void |
setupActor()
Setup the actor associated with this DDI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_actionRates
private DataflowWithRates.ActionRateSignature[] _actionRates
_initializerRates
private DataflowWithRates.ActionRateSignature[] _initializerRates
SDF
public SDF(TypedAtomicActor ptActor,
caltrop.interpreter.ast.Actor actor,
caltrop.interpreter.Context context,
caltrop.interpreter.environment.Environment env)
- Create an new SDF DDI.
- Parameters:
ptActor
- The instance of ptolemy.actor.Actor
that the plugin will be associated with.actor
- The abstract syntax tree of the CAL source.context
- The context that the plugin will use.env
- The environment that the plugin will use.
isLegalActor
public boolean isLegalActor()
- In SDF, an actor is legal if:
- The rates of each action are statically computable, and
these rates are the same for each action.
- There is at least one unguarded action.
- The rates and guards of the initializers are statically computable.
- Specified by:
isLegalActor
in interface DDI
- Overrides:
isLegalActor
in class Dataflow
- Returns:
- True if the actor associated with this DDI is
a legal SDF actor.
getName
public java.lang.String getName()
- Get the name of this DDI.
- Specified by:
getName
in interface DDI
- Overrides:
getName
in class Dataflow
- Returns:
- "SDF".
setupActor
public void setupActor()
- Setup the actor associated with this DDI. Assumes that
isLegalActor()
is called first.
Setup involves attaching attributes with token
consumption/production rates to the input and output ports of
the actor associated with this DDI.
- Specified by:
setupActor
in interface DDI
- Overrides:
setupActor
in class Dataflow