ptolemy.domains.psdf.kernel
Class PSDFScheduler.SymbolicSchedule

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

private class PSDFScheduler.SymbolicSchedule
extends Schedule
implements PSDFScheduler.SymbolicScheduleElement

A schedule whose iteration count is given by an expression.


Field Summary
private  java.lang.String _expression
           
private  ASTPtRootNode _parseTree
           
 
Fields inherited from class ptolemy.actor.sched.Schedule
_schedule
 
Fields inherited from class ptolemy.actor.sched.ScheduleElement
_parent
 
Constructor Summary
PSDFScheduler.SymbolicSchedule(java.lang.String expression)
          Construct a symbolic schedule with 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 symbolic schedule.
 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()
          Return a string representation of this symbolic schedule.
 
Methods inherited from class ptolemy.actor.sched.Schedule
actorIterator, add, add, firingIterator, get, iterator, remove, size
 
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.SymbolicSchedule

public PSDFScheduler.SymbolicSchedule(java.lang.String expression)
Construct a symbolic schedule with the given expression. This schedule is assumed to fire the number of times determined by evaluating the given expression.

Parameters:
expression - A string expression representing the number of times to execute the schedule.
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 symbolic schedule.

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()
Return a string representation of this symbolic schedule.

Overrides:
toString in class Schedule
Returns:
The string representation.