Package com.ibm.wala.fixedpoint.impl
Class DefaultFixedPointSystem<T extends IVariable<T>>
- java.lang.Object
-
- com.ibm.wala.fixedpoint.impl.DefaultFixedPointSystem<T>
-
- All Implemented Interfaces:
IFixedPointSystem<T>
public class DefaultFixedPointSystem<T extends IVariable<T>> extends Object implements IFixedPointSystem<T>
Default implementation of a dataflow graph
-
-
Constructor Summary
Constructors Constructor Description DefaultFixedPointSystem()default constructor ...DefaultFixedPointSystem(int expectedOut)
-
Method Summary
-
-
-
Constructor Detail
-
DefaultFixedPointSystem
public DefaultFixedPointSystem(int expectedOut)
- Parameters:
expectedOut- number of expected out edges in the "usual" case for constraints .. used to tune graph representation
-
DefaultFixedPointSystem
public DefaultFixedPointSystem()
default constructor ... tuned for one use for each def in dataflow graph.
-
-
Method Detail
-
removeStatement
public void removeStatement(IFixedPointStatement<T> s)
Description copied from interface:IFixedPointSystemremoves a given statement- Specified by:
removeStatementin interfaceIFixedPointSystem<T extends IVariable<T>>
-
getStatements
public Iterator<AbstractStatement> getStatements()
Description copied from interface:IFixedPointSystemReturn an Iterator of theIFixedPointStatements in this system- Specified by:
getStatementsin interfaceIFixedPointSystem<T extends IVariable<T>>- Returns:
Iterator<Constraint>
-
addStatement
public void addStatement(IFixedPointStatement statement) throws IllegalArgumentException, UnimplementedError
Description copied from interface:IFixedPointSystemAdd a statement to the system- Specified by:
addStatementin interfaceIFixedPointSystem<T extends IVariable<T>>- Throws:
IllegalArgumentExceptionUnimplementedError
-
addStatement
public void addStatement(GeneralStatement<?> s)
-
addStatement
public void addStatement(UnaryStatement<?> s)
-
addStatement
public void addStatement(NullaryStatement<?> s)
-
addVariable
public void addVariable(T v)
-
getStep
public AbstractStatement<?,?> getStep(int number)
-
reorder
public void reorder()
Description copied from interface:IFixedPointSystemreorder the statements in this system- Specified by:
reorderin interfaceIFixedPointSystem<T extends IVariable<T>>
-
getStatementsThatUse
public Iterator<? extends INodeWithNumber> getStatementsThatUse(T v)
- Specified by:
getStatementsThatUsein interfaceIFixedPointSystem<T extends IVariable<T>>- Returns:
Iterator<statement>, the statements that use the variable
-
getStatementsThatDef
public Iterator<? extends INodeWithNumber> getStatementsThatDef(T v)
- Specified by:
getStatementsThatDefin interfaceIFixedPointSystem<T extends IVariable<T>>- Returns:
Iterator<statement>, the statements that def the variable
-
getVariable
public T getVariable(int n)
-
getNumberOfStatementsThatUse
public int getNumberOfStatementsThatUse(T v)
- Specified by:
getNumberOfStatementsThatUsein interfaceIFixedPointSystem<T extends IVariable<T>>
-
getNumberOfStatementsThatDef
public int getNumberOfStatementsThatDef(T v)
- Specified by:
getNumberOfStatementsThatDefin interfaceIFixedPointSystem<T extends IVariable<T>>
-
getVariables
public Iterator<? extends INodeWithNumber> getVariables()
Description copied from interface:IFixedPointSystemReturn an Iterator of the variables in this graph- Specified by:
getVariablesin interfaceIFixedPointSystem<T extends IVariable<T>>- Returns:
Iterator<IVariable>
-
getNumberOfNodes
public int getNumberOfNodes()
-
getPredNodes
public Iterator<? extends INodeWithNumber> getPredNodes(INodeWithNumber n)
-
getPredNodeCount
public int getPredNodeCount(INodeWithNumber n)
-
containsStatement
public boolean containsStatement(IFixedPointStatement<T> s)
- Specified by:
containsStatementin interfaceIFixedPointSystem<T extends IVariable<T>>- Returns:
- true iff this system already contains an equation that is equal() to s
-
containsVariable
public boolean containsVariable(T v)
- Specified by:
containsVariablein interfaceIFixedPointSystem<T extends IVariable<T>>- Returns:
- true iff this system already contains a variable that is equal() to v.
-
-