public abstract class GeneralStatement<T extends IVariable<T>> extends AbstractStatement<T,AbstractOperator<T>>
| Constructor and Description |
|---|
GeneralStatement(T lhs,
AbstractOperator<T> operator)
Constructor for case of zero operands on the right-hand side.
|
GeneralStatement(T lhs,
AbstractOperator<T> operator,
T[] rhs)
Constructor for case of more than three operands on the right-hand side.
|
GeneralStatement(T lhs,
AbstractOperator<T> operator,
T op1,
T op2)
Constructor for case of two operands on the right-hand side.
|
GeneralStatement(T lhs,
AbstractOperator<T> operator,
T op1,
T op2,
T op3)
Constructor for case of three operands on the right-hand side.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
byte |
evaluate()
Evaluate this equation, setting a new value for the left-hand side.
|
T |
getLHS()
Return the left-hand side of this equation.
|
AbstractOperator<T> |
getOperator() |
T[] |
getRHS()
returns the list of free variables appearing in the right-hand side of the statement
|
int |
hashCode()
Subclasses must implement this, to prevent non-determinism.
|
boolean |
hasVariable(T cell)
Does this equation contain an appearance of a given cell?
|
protected abstract T[] |
makeRHS(int size) |
getOrderNumber, toStringgetGraphNodeId, setGraphNodeIdclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetGraphNodeId, setGraphNodeIdpublic GeneralStatement(T lhs, AbstractOperator<T> operator)
lhs - the lattice cell set by this equationoperator - the equation operatorpublic GeneralStatement(T lhs, AbstractOperator<T> operator, T op1, T op2)
lhs - the lattice cell set by this equationoperator - the equation operatorop1 - the first operand on the rhsop2 - the second operand on the rhspublic GeneralStatement(T lhs, AbstractOperator<T> operator, T op1, T op2, T op3)
lhs - the lattice cell set by this equationoperator - the equation operatorop1 - the first operand on the rhsop2 - the second operand on the rhsop3 - the third operand on the rhspublic GeneralStatement(T lhs, AbstractOperator<T> operator, T[] rhs)
lhs - the lattice cell set by this equationoperator - the equation operatorrhs - the operands of the right-hand side in orderIllegalArgumentException - if rhs is nullpublic byte evaluate()
public T getLHS()
public boolean hasVariable(T cell)
Note: this uses reference equality, assuming that the variables are canonical! This is fragile. TODO: Address it perhaps, but be careful not to sacrifice efficiency.
cell - the cell in questionprotected abstract T[] makeRHS(int size)
public int hashCode()
AbstractStatementhashCode in class AbstractStatement<T extends IVariable<T>,AbstractOperator<T extends IVariable<T>>>public boolean equals(Object o)
equals in class AbstractStatement<T extends IVariable<T>,AbstractOperator<T extends IVariable<T>>>public AbstractOperator<T> getOperator()
getOperator in class AbstractStatement<T extends IVariable<T>,AbstractOperator<T extends IVariable<T>>>public T[] getRHS()
IFixedPointStatement