Package com.ibm.wala.fixpoint
Class UnaryStatement<T extends IVariable<T>>
java.lang.Object
com.ibm.wala.util.graph.impl.NodeWithNumber
com.ibm.wala.fixpoint.AbstractStatement<T,UnaryOperator<T>>
com.ibm.wala.fixpoint.UnaryStatement<T>
- All Implemented Interfaces:
IFixedPointStatement<T>,INodeWithNumber
- Direct Known Subclasses:
BasicUnaryStatement
public abstract class UnaryStatement<T extends IVariable<T>>
extends AbstractStatement<T,UnaryOperator<T>>
Represents a single step, restricted to a unary operator.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUnaryStatement(T lhs, T rhs) Constructor for case of one operand on the right-hand side. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyteevaluate()Evaluate this equation, setting a new value for the left-hand side.getLHS()Return the left-hand side of this equation.Return the operands in this equation.T[]getRHS()returns the list of free variables appearing in the right-hand side of the statementinthashCode()Subclasses must implement this, to prevent non-determinism.booleanhasVariable(T cell) Does this equation contain an appearance of a given cell?toString()Return a string representation of this objectMethods inherited from class com.ibm.wala.fixpoint.AbstractStatement
getOperator, getOrderNumberMethods inherited from class com.ibm.wala.util.graph.impl.NodeWithNumber
getGraphNodeId, setGraphNodeIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.ibm.wala.util.graph.INodeWithNumber
getGraphNodeId, setGraphNodeId
-
Field Details
-
lhs
The operands -
rhs
-
-
Constructor Details
-
UnaryStatement
Constructor for case of one operand on the right-hand side.- Parameters:
lhs- the lattice cell set by this equationrhs- the first operand on the rhs
-
-
Method Details
-
evaluate
public byte evaluate()Evaluate this equation, setting a new value for the left-hand side.- Returns:
- true if the lhs value changed. false otherwise
-
getLHS
Return the left-hand side of this equation.- Returns:
- the lattice cell this equation computes
-
getRightHandSide
- Returns:
- the right-hand side of this equation.
-
getOperands
Return the operands in this equation. -
hasVariable
Does this equation contain an appearance of a given cell?- Parameters:
cell- the cell in question- Returns:
- true or false
-
toString
Return a string representation of this object- Overrides:
toStringin classAbstractStatement<T extends IVariable<T>,UnaryOperator<T extends IVariable<T>>> - Returns:
- a string representation of this object
-
equals
- Specified by:
equalsin classAbstractStatement<T extends IVariable<T>,UnaryOperator<T extends IVariable<T>>>
-
hashCode
public int hashCode()Description copied from class:AbstractStatementSubclasses must implement this, to prevent non-determinism.- Specified by:
hashCodein classAbstractStatement<T extends IVariable<T>,UnaryOperator<T extends IVariable<T>>>
-
getRHS
Description copied from interface:IFixedPointStatementreturns the list of free variables appearing in the right-hand side of the statement- Throws:
UnsupportedOperationException
-