|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmapss.dif.DIFScheduleStrategy
mapss.dif.csdf.sdf.sched.APGANStrategy
public class APGANStrategy
Acyclic Pair-wise Grouping of Adjacent Nodes (APGAN) scheduler for SDF graphs. It is described in the book "Software Synthesis from Dataflow Graphs" by Shuvra S. Bhattacharyya, Praveen K. Murthy, and Edward A. Lee, chapter 7.
This program provides a basic APGAN and can be accommodated to
arbitrary clustering priority or tie-breaking rules.
For the accommodation, #_candidates()
or #_tieBreak()
are the methods to be overrided.
Constructor Summary | |
---|---|
APGANStrategy(SDFGraph graph)
Constructor of APGAN. |
Method Summary | |
---|---|
protected java.util.List |
_ascendentEdges()
Sort the edges in ascendent orders. |
protected java.util.List |
_descendentEdges()
Sort the edges in descendent orders. |
protected java.util.List |
_prioritizedEdges()
A prioritized list of edges. |
protected boolean |
_testAcyclicClustering(mocgraph.Edge edge)
Test acyclic clustering of the adjacent nodes represented by the given edge. |
protected int |
_tieBreak(mocgraph.Edge edge1,
mocgraph.Edge edge2)
Impose priorities on edges with same values. |
protected int |
_valueOf(mocgraph.Edge edge)
Value definition for an edge. |
mocgraph.sched.Schedule |
gdppoSchedule()
Get a GDPPO schedule (see GDPPOStrategy ) with a lexical
order derived by APGAN. |
mocgraph.sched.Schedule |
schedule()
Run APGAN clustering and then expand it to a schedule. |
Methods inherited from class mapss.dif.DIFScheduleStrategy |
---|
getClusterManager, graph, toString, valid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public APGANStrategy(SDFGraph graph)
graph
- The given SDF graphMethod Detail |
---|
public mocgraph.sched.Schedule gdppoSchedule()
GDPPOStrategy
) with a lexical
order derived by APGAN. In usual, GDPPO is called to post optimize
APGAN result. This method provides the integrated function.
public mocgraph.sched.Schedule schedule()
#_candidates()
schedule
in interface mocgraph.sched.ScheduleAnalyzer
schedule
in class DIFScheduleStrategy
java.lang.RuntimeException
- No valid nodes to cluster: error
with candidate/tie-break lawprotected final java.util.List _ascendentEdges()
protected final java.util.List _descendentEdges()
protected java.util.List _prioritizedEdges()
protected boolean _testAcyclicClustering(mocgraph.Edge edge)
The
- edge whose ending nodes are to be clustered.
protected int _tieBreak(mocgraph.Edge edge1, mocgraph.Edge edge2)
_valueOf(Edge)
.
In exploring candidate nodes to cluster, these edges
sometimes exist. They cause edge sorting ambiguous.
A tie breaking rule is usually necessary to evaluate
an exact order.
It's positivity or negativity of the returned value that
matters. If edge1
is preferrable to
edge2
, than a negative number is returned.
Otherwise, a positive number is returned. By default,
the less label number the more preferrable an edge is.
edge1
- The first edge.edge2
- The second edge.
protected int _valueOf(mocgraph.Edge edge)
edge
- The edge to get value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |