Class DDF

  • All Implemented Interfaces:
    Executable, Initializable, DDI

    public class DDF
    extends DataflowWithRates
    A plugin for the DDF domain. In DDF, a CAL actor is valid if:

    1. The guards of each action do not depend on the inputs.
    2. The rates of each action do not depend on the inputs.
    This plugin also adds attributes containing rate information to the ports of the actor.
    Since:
    Ptolemy II 5.2
    Version:
    $Id$
    Author:
    Steve Neuendorffer
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Detail

      • DDF

        public DDF​(TypedAtomicActor ptActor,
                   caltrop.interpreter.ast.Actor actor,
                   caltrop.interpreter.Context context,
                   caltrop.interpreter.environment.Environment env)
        Create an new DDF 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.
    • Method Detail

      • isLegalActor

        public boolean isLegalActor()
        In DDF, an actor is legal if:
        1. The guards of each action do not depend on the inputs.
        2. The rates of each action do not depend on the inputs.
        Specified by:
        isLegalActor in interface DDI
        Overrides:
        isLegalActor in class Dataflow
        Returns:
        True if the actor associated with this DDI is a legal DDF 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:
        "DDF".
      • 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
      • _hasInputDependentGuard

        protected boolean _hasInputDependentGuard()