|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.analyses.IntraFSMAnalysis<L>
public abstract class IntraFSMAnalysis<L>
An implemenation of the Monotone Data-flow Framework.
Nested Class Summary | |
---|---|
protected static interface |
IntraFSMAnalysis.SetContainmentOperator<T>
|
protected static interface |
IntraFSMAnalysis.SetFactory<T>
|
protected static interface |
IntraFSMAnalysis.SetMergeOperator<T>
|
protected static class |
IntraFSMAnalysis.WorkListEntry
|
Field Summary | |
---|---|
protected IntObjectTable<Set<L>> |
analysisTable
Mapping of a label (CFG location) to the working set of the "thing" being calculated (live variables, available expressions, etc). |
protected Set<L> |
bottom
First working set to give to labels which are not in the "extremal" labels set, E . |
protected CFG |
cfg
Flow graph. |
protected IntraFSMAnalysis.SetContainmentOperator<L> |
containmentTest
Abstract set containment operator used in MDF algorithm. |
protected Set<L> |
init
First working set to give to labels which are in the "extremal" labels set, E . |
protected boolean |
isForwardAnalysis
Flag to indicate whether transitions in cfg should be read
in reverse or forwards. |
protected IntraFSMAnalysis.SetMergeOperator<L> |
mergeOperation
Abstract set combination operator used in MDF algorithm. |
protected IntraFSMAnalysis.SetFactory<L> |
setFactory
Factory object to create set implementations appropriate for the particular analysis "plugged into" the MDF. |
protected LinkedList<IntraFSMAnalysis.WorkListEntry> |
workList
Pending-work queue. |
Constructor Summary | |
---|---|
IntraFSMAnalysis(CFG cfg,
boolean isForwardAnalysis,
IntraFSMAnalysis.SetContainmentOperator<L> subsetTest,
IntraFSMAnalysis.SetMergeOperator<L> mergeOp,
IntraFSMAnalysis.SetFactory<L> setFactory,
Set<L> init,
Set<L> bottom)
Build an instance of the Monotone Data-flow Framework. |
Method Summary | |
---|---|
protected void |
addToWorkList(IntraFSMAnalysis.WorkListEntry newEntry)
|
protected void |
analyze()
Perform Phase II of the MDF algorithm. |
protected abstract Set<L> |
analyzeLocation(int locDesc,
Set<L> s)
Compute an analysis-specific "active" set of variables given a known active input set and a program location. |
void |
dispose()
|
protected Set<L> |
getEntry(int locDesc)
Find the working set for a location. |
protected void |
init()
Perform Phase I of the MDF algorithm. |
protected IntraFSMAnalysis.WorkListEntry |
removeNextInWorkList()
|
protected void |
setEntry(int locDesc,
Set<L> entry)
Update working set for a location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CFG cfg
protected boolean isForwardAnalysis
cfg
should be read
in reverse or forwards.
protected IntraFSMAnalysis.SetContainmentOperator<L> containmentTest
protected IntraFSMAnalysis.SetMergeOperator<L> mergeOperation
protected IntraFSMAnalysis.SetFactory<L> setFactory
protected Set<L> init
protected Set<L> bottom
protected LinkedList<IntraFSMAnalysis.WorkListEntry> workList
protected IntObjectTable<Set<L>> analysisTable
Constructor Detail |
---|
public IntraFSMAnalysis(CFG cfg, boolean isForwardAnalysis, IntraFSMAnalysis.SetContainmentOperator<L> subsetTest, IntraFSMAnalysis.SetMergeOperator<L> mergeOp, IntraFSMAnalysis.SetFactory<L> setFactory, Set<L> init, Set<L> bottom)
cfg
- program control flow graph giving predecessor, successors, and
entry/exit pointsisForwardAnalysis
- whether the MDF should use flow or reverse(flow)
for the next-states relationsubsetTest
- set relation tester functormergeOp
- set combinator functorsetFactory
- source of new set implementations compatible with the specific
MDF being used. For instance, some may use TreeSet
,
others HashSet
.init
- the initial working set to assign to labels which are in the
extremal set, E .bottom
- the initial working set to assign to labels not in the
extermal set, E Method Detail |
---|
public void dispose()
protected void setEntry(int locDesc, Set<L> entry)
protected Set<L> getEntry(int locDesc)
protected void addToWorkList(IntraFSMAnalysis.WorkListEntry newEntry)
protected void analyze()
protected abstract Set<L> analyzeLocation(int locDesc, Set<L> s)
protected void init()
protected IntraFSMAnalysis.WorkListEntry removeNextInWorkList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |