|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcetus.hir.Expression
cetus.hir.RangeExpression
public class RangeExpression
RangeExpression represents a symbolic range with a lower bound expression and an upper bound expression. RangeAnalysis uses RangeExpression to compute a valid value ranges of variables at program points.
| Field Summary |
|---|
| Fields inherited from class cetus.hir.Expression |
|---|
children, needs_parens, object_print_method, parent |
| Constructor Summary | |
|---|---|
RangeExpression(Expression lb,
Expression ub)
Constructs a range expression with the given lower and upper bounds. |
|
| Method Summary | |
|---|---|
int |
compareTo(Expression e)
Compares the given expression with this range expression. |
static void |
defaultPrint(RangeExpression range,
java.io.OutputStream stream)
Default print method |
boolean |
equals(java.lang.Object o)
Checks if the given object is equal to this range expression. |
Expression |
getLB()
Returns the lower bound of this range expression. |
static Expression |
getOmega()
Returns a new instanceof omega expression which is [-inf:inf]. |
Expression |
getUB()
Returns the upper bound of this range expression. |
boolean |
isBounded()
Returns true if neither lb nor ub is infinity. |
boolean |
isEmpty()
Checks if this range expression has a lower bound greater than the upper bound. |
boolean |
isOmega()
Checks if this range expression does not have any closed bounds. |
void |
setLB(Expression lb)
Sets the lower bound with the given expression. |
void |
setUB(Expression ub)
Sets the upper bound with the given expression. |
Expression |
toExpression()
Converts this range expression to a non-range expression if the lower bound is equal to the upper bound. |
static RangeExpression |
toRange(Expression e)
Converts an arbitrary expression to a range expression by setting the same lower bound and upper bound. |
java.lang.String |
toString()
Returns the string representation of the range expression. |
| Methods inherited from class cetus.hir.Expression |
|---|
clone, equals2, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verify |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RangeExpression(Expression lb,
Expression ub)
lb - the lower bound expression.ub - the upper bound expression.| Method Detail |
|---|
public static void defaultPrint(RangeExpression range,
java.io.OutputStream stream)
public java.lang.String toString()
toString in class Expressionpublic boolean equals(java.lang.Object o)
equals in class Expressiono - the object to be compared.public int compareTo(Expression e)
compareTo in interface java.lang.Comparable<Expression>compareTo in class Expressionpublic void setLB(Expression lb)
lb - the new lower bound.public void setUB(Expression ub)
ub - the new upper boundpublic Expression getLB()
public Expression getUB()
public boolean isEmpty()
public boolean isOmega()
public boolean isBounded()
public static RangeExpression toRange(Expression e)
public Expression toExpression()
public static Expression getOmega()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||