ptolemy.domains.psdf.kernel
Class PSDFScheduler.SymbolicFiring

java.lang.Object
  extended by ptolemy.actor.sched.ScheduleElement
      extended by ptolemy.actor.sched.Firing
          extended by ptolemy.domains.psdf.kernel.PSDFScheduler.SymbolicFiring
All Implemented Interfaces:
PSDFScheduler.SymbolicScheduleElement
Enclosing class:
PSDFScheduler

private class PSDFScheduler.SymbolicFiring
extends Firing
implements PSDFScheduler.SymbolicScheduleElement

An actor firing with an iteration count that is determined by a symbolic expression.


Field Summary
private  java.lang.String _expression
           
private  ASTPtRootNode _parseTree
           
 
Fields inherited from class ptolemy.actor.sched.ScheduleElement
_parent
 
Constructor Summary
PSDFScheduler.SymbolicFiring(Actor actor, java.lang.String expression)
          Construct a firing with the given actor and the given expression.
 
Method Summary
 java.lang.String expression()
          Return the most recent expression that was used to set the iteration count of this symbolic firing.
 int getIterationCount()
          Return the current iteration count of this firing.
 ASTPtRootNode parseTree()
          Get the parse tree of the iteration expression.
 void setIterationCount(java.lang.String expression)
          Set the expression associated with the iteration count.
 java.lang.String toString()
          Output a string representation of this symbolic firing.
 
Methods inherited from class ptolemy.actor.sched.Firing
actorIterator, firingIterator, getActor, setActor
 
Methods inherited from class ptolemy.actor.sched.ScheduleElement
_getVersion, _incrementVersion, setIterationCount, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_expression

private java.lang.String _expression

_parseTree

private ASTPtRootNode _parseTree
Constructor Detail

PSDFScheduler.SymbolicFiring

public PSDFScheduler.SymbolicFiring(Actor actor,
                                    java.lang.String expression)
Construct a firing with the given actor and the given expression. The given actor is assumed to fire the number of times determined by evaluating the given expression.

Parameters:
actor - The actor in the firing.
expression - A string expression representing the number of times to fire the actor.
Method Detail

expression

public java.lang.String expression()
Return the most recent expression that was used to set the iteration count of this symbolic firing.

Specified by:
expression in interface PSDFScheduler.SymbolicScheduleElement
Returns:
The most recent expression.
See Also:
setIterationCount(String).

getIterationCount

public int getIterationCount()
Return the current iteration count of this firing.

Overrides:
getIterationCount in class ScheduleElement
Returns:
The iteration count for this schedule.
See Also:
ScheduleElement.setIterationCount(int)

parseTree

public ASTPtRootNode parseTree()
Get the parse tree of the iteration expression.

Specified by:
parseTree in interface PSDFScheduler.SymbolicScheduleElement
Returns:
The parse tree.

setIterationCount

public void setIterationCount(java.lang.String expression)
Set the expression associated with the iteration count. The expression will probably be something like "a2::in::tokenConsumptionRate/gcd(a2::in::tokenConsumptionRate, a::out::tokenProductionRate)."

Specified by:
setIterationCount in interface PSDFScheduler.SymbolicScheduleElement
Parameters:
expression - The expression to be associated with the iteration count.

toString

public java.lang.String toString()
Output a string representation of this symbolic firing.

Overrides:
toString in class Firing