mapss.dif.csdf.sdf.sched
Class Procedure

java.lang.Object
  extended by mapss.dif.csdf.sdf.sched.Procedure

public class Procedure
extends java.lang.Object

A class modeling procedure instantiation in software synthesis.

Version:
$Id: Procedure.java 406 2007-05-10 14:27:07Z plishker $
Author:
Mingyung Ko

Constructor Summary
Procedure()
          Constructor without any argument.
 
Method Summary
 void addCallee(int index, Procedure callee, int iterations)
          Add a callee with a loop iteration at the specific call index.
 void addCallee(Procedure callee, int iterations)
          Add (append) a callee with a loop iteration.
 void addCaller(Procedure caller)
          Add the caller.
 int calleeCount()
          Get the number of callees.
 int callerCount()
          Get the number of callers.
 Procedure getCallee(int index)
          Get the callee given an index.
 int getCalleeIndex(Procedure callee)
          Get index of the callee.
 int getCalleeIterations(int index)
          Get the number of iterations of a callee.
 int getCalleeIterations(Procedure callee)
          Get the number of iterations of a callee.
 java.util.List getCallees()
          Get the callees.
 java.util.Collection getCallers()
          Get the callers.
 mocgraph.sched.ScheduleElement getSchedule()
          Get the corresponding schedule.
 void removeCallee(Procedure callee)
          Remove the given callee.
 void removeCaller(Procedure caller)
          Remove the given caller.
 void setSchedule(mocgraph.sched.ScheduleElement schedule)
          Set the corresponding schedule.
 java.lang.String toString()
          Display the program structure, including calles with iterations, in text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Procedure

public Procedure()
Constructor without any argument.

Method Detail

addCallee

public void addCallee(Procedure callee,
                      int iterations)
Add (append) a callee with a loop iteration. Since callees are appended, users should be aware and responsible for the adding sequence.

Parameters:
callee - The callee.
iterations - Loop iterations of the callee.

addCallee

public void addCallee(int index,
                      Procedure callee,
                      int iterations)
Add a callee with a loop iteration at the specific call index.

Parameters:
index - The call index.
callee - The callee.
iterations - Loop iterations of the callee.

addCaller

public void addCaller(Procedure caller)
Add the caller.

Parameters:
caller - The caller.

calleeCount

public int calleeCount()
Get the number of callees.

Returns:
The number of callees.

callerCount

public int callerCount()
Get the number of callers.

Returns:
The number of callers.

getCallee

public Procedure getCallee(int index)
Get the callee given an index.

Parameters:
index - The callee index.
Returns:
The callee.

getCallees

public java.util.List getCallees()
Get the callees.

Returns:
The callees in unmodifiable List.

getCallers

public java.util.Collection getCallers()
Get the callers. Order of callers does not matter.

Returns:
The callers in unmodifiable Collection.

getCalleeIndex

public int getCalleeIndex(Procedure callee)
Get index of the callee.

Parameters:
The - callee.
Returns:
The callee index.

getCalleeIterations

public int getCalleeIterations(Procedure callee)
Get the number of iterations of a callee.

Parameters:
callee - The callee.
Returns:
Loop iterations of the callee.

getCalleeIterations

public int getCalleeIterations(int index)
Get the number of iterations of a callee.

Parameters:
index - The callee index.
Returns:
Loop iterations of the callee.

getSchedule

public mocgraph.sched.ScheduleElement getSchedule()
Get the corresponding schedule.

Returns:
The schedule.

removeCallee

public void removeCallee(Procedure callee)
Remove the given callee.

Parameters:
callee - The callee.

removeCaller

public void removeCaller(Procedure caller)
Remove the given caller.

Parameters:
callee - The caller.

setSchedule

public void setSchedule(mocgraph.sched.ScheduleElement schedule)
Set the corresponding schedule.

Parameters:
schedule - The schedule.

toString

public java.lang.String toString()
Display the program structure, including calles with iterations, in text.

Overrides:
toString in class java.lang.Object
Returns:
A text string of the call structure.