public class SEvaluator
extends java.lang.Object
Evaluator
,
SConstantPropagatorAndFolder
Modifier and Type | Class and Description |
---|---|
static class |
SEvaluator.BottomConstant
Bottom i.e.
|
static class |
SEvaluator.MetaConstant
Head of a new hierarchy of constants -- Top and Bottom.
|
static class |
SEvaluator.TopConstant
Top i.e.
|
Constructor and Description |
---|
SEvaluator() |
Modifier and Type | Method and Description |
---|---|
static Value |
getConstantValueOf(Value op)
Returns the constant value of
op if it is easy to
find the constant value; else returns null . |
static Constant |
getFuzzyConstantValueOf(Value v)
If a normal expression contains Bottom, always return Bottom.
|
static Constant |
getFuzzyConstantValueOf(Value v,
java.util.Map<Local,Constant> localToConstant)
Get the constant value of the expression given the assumptions
in the localToConstant map (may contain Top and Bottom).
|
static boolean |
isValueConstantValued(Value op)
Returns true if given value is determined to be constant valued,
false otherwise
|
public static boolean isValueConstantValued(Value op)
public static Value getConstantValueOf(Value op)
op
if it is easy to
find the constant value; else returns null
.public static Constant getFuzzyConstantValueOf(Value v)
If a Phi expression contains Bottom, always return Bottom. Otherwise, if all the constant arguments are the same (ignoring Top and locals) return that constant or Top if no concrete constant is present, else return Bottom.
SEvaluator.TopConstant
,
SEvaluator.BottomConstant
public static Constant getFuzzyConstantValueOf(Value v, java.util.Map<Local,Constant> localToConstant)
SEvaluator.TopConstant
,
SEvaluator.BottomConstant