|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.brics.xact.analysis.xmlgraph.ForwardsXGAnalyzer<T>
T
- lattice type. Requires a working Object.equals(Object)
.public abstract class ForwardsXGAnalyzer<T>
Base class for performing forwards dataflow analysis on XML graphs.
Subclasses should call doAnalysis()
when the analysis should be
performed, which by convention should be at the end of its constructor.
Only reachable nodes are analyzed – requesting the lattice point for an unreachable node will always return null.
Constructor Summary | |
---|---|
ForwardsXGAnalyzer(XMLGraph xg)
|
Method Summary | |
---|---|
protected abstract T |
bottom()
Returns BOTTOM element. |
protected void |
doAnalysis()
|
T |
get(int index)
Returns the lattice data associated with the given node; or null if the node is unreachable. |
T |
get(Node node)
Returns the lattice data associated with the given node; or null if the node is unreachable. |
XMLGraph |
getXmlGraph()
|
protected abstract T |
initial(Node node)
Returns initial value for the specified node. |
protected abstract Set<Integer> |
initialNodes()
Returns the initial nodes. |
protected void |
put(int index,
T newValue)
Changes the lattice point for the specified node. |
protected abstract void |
transfer(T src,
Node node)
Transfer data from the specified node to its children. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForwardsXGAnalyzer(XMLGraph xg)
Method Detail |
---|
protected abstract T bottom()
protected void doAnalysis()
public T get(int index)
index
- index of a node
public T get(Node node)
node
- a node
public XMLGraph getXmlGraph()
protected abstract T initial(Node node)
node
- one of the nodes whose index was returned by initialNodes()
protected abstract Set<Integer> initialNodes()
protected void put(int index, T newValue)
Note that this method does not perform any least upper bound
computation – you often want to merge with the existing value
before calling put
.
index
- newValue
- protected abstract void transfer(T src, Node node)
put(int, Object)
.
src
- lattice point for the specified node, provided for conveniencenode
- the node to transfer from
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |