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 java.lang.Object implements IFixedPointSystem<T>
Default implementation of a dataflow graph
-
-
Constructor Summary
Constructors Constructor Description DefaultFixedPointSystem()
default constructor ...DefaultFixedPointSystem(int expectedOut)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatement(GeneralStatement<?> s)
void
addStatement(NullaryStatement<?> s)
void
addStatement(IFixedPointStatement statement)
Add a statement to the systemvoid
addStatement(UnaryStatement<?> s)
void
addVariable(T v)
boolean
containsStatement(IFixedPointStatement<T> s)
boolean
containsVariable(T v)
boolean
equals(java.lang.Object obj)
int
getNumberOfNodes()
int
getNumberOfStatementsThatDef(T v)
int
getNumberOfStatementsThatUse(T v)
int
getPredNodeCount(INodeWithNumber n)
java.util.Iterator<? extends INodeWithNumber>
getPredNodes(INodeWithNumber n)
java.util.Iterator<AbstractStatement>
getStatements()
Return an Iterator of theIFixedPointStatement
s in this systemjava.util.Iterator<? extends INodeWithNumber>
getStatementsThatDef(T v)
java.util.Iterator<? extends INodeWithNumber>
getStatementsThatUse(T v)
AbstractStatement<?,?>
getStep(int number)
T
getVariable(int n)
java.util.Iterator<? extends INodeWithNumber>
getVariables()
Return an Iterator of the variables in this graphint
hashCode()
void
removeStatement(IFixedPointStatement<T> s)
removes a given statementvoid
reorder()
reorder the statements in this systemjava.lang.String
toString()
-
-
-
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
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
removeStatement
public void removeStatement(IFixedPointStatement<T> s)
Description copied from interface:IFixedPointSystem
removes a given statement- Specified by:
removeStatement
in interfaceIFixedPointSystem<T extends IVariable<T>>
-
getStatements
public java.util.Iterator<AbstractStatement> getStatements()
Description copied from interface:IFixedPointSystem
Return an Iterator of theIFixedPointStatement
s in this system- Specified by:
getStatements
in interfaceIFixedPointSystem<T extends IVariable<T>>
- Returns:
Iterator
<Constraint>
-
addStatement
public void addStatement(IFixedPointStatement statement) throws java.lang.IllegalArgumentException, UnimplementedError
Description copied from interface:IFixedPointSystem
Add a statement to the system- Specified by:
addStatement
in interfaceIFixedPointSystem<T extends IVariable<T>>
- Throws:
java.lang.IllegalArgumentException
UnimplementedError
-
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:IFixedPointSystem
reorder the statements in this system- Specified by:
reorder
in interfaceIFixedPointSystem<T extends IVariable<T>>
-
getStatementsThatUse
public java.util.Iterator<? extends INodeWithNumber> getStatementsThatUse(T v)
- Specified by:
getStatementsThatUse
in interfaceIFixedPointSystem<T extends IVariable<T>>
- Returns:
Iterator
<statement>, the statements that use the variable
-
getStatementsThatDef
public java.util.Iterator<? extends INodeWithNumber> getStatementsThatDef(T v)
- Specified by:
getStatementsThatDef
in 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:
getNumberOfStatementsThatUse
in interfaceIFixedPointSystem<T extends IVariable<T>>
-
getNumberOfStatementsThatDef
public int getNumberOfStatementsThatDef(T v)
- Specified by:
getNumberOfStatementsThatDef
in interfaceIFixedPointSystem<T extends IVariable<T>>
-
getVariables
public java.util.Iterator<? extends INodeWithNumber> getVariables()
Description copied from interface:IFixedPointSystem
Return an Iterator of the variables in this graph- Specified by:
getVariables
in interfaceIFixedPointSystem<T extends IVariable<T>>
- Returns:
Iterator
<IVariable
>
-
getNumberOfNodes
public int getNumberOfNodes()
-
getPredNodes
public java.util.Iterator<? extends INodeWithNumber> getPredNodes(INodeWithNumber n)
-
getPredNodeCount
public int getPredNodeCount(INodeWithNumber n)
-
containsStatement
public boolean containsStatement(IFixedPointStatement<T> s)
- Specified by:
containsStatement
in 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:
containsVariable
in interfaceIFixedPointSystem<T extends IVariable<T>>
- Returns:
- true iff this system already contains a variable that is equal() to v.
-
-