Package soot.shimple.toolkits.scalar
Class SEvaluator
- java.lang.Object
-
- soot.shimple.toolkits.scalar.SEvaluator
-
public class SEvaluator extends Object
Extension of soot.jimple.toolkits.scalar.Evaluator to handle Phi expressions.- Author:
- Navindra Umanee.
- See Also:
Evaluator,SConstantPropagatorAndFolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSEvaluator.BottomConstantBottom i.e.static classSEvaluator.MetaConstantHead of a new hierarchy of constants -- Top and Bottom.static classSEvaluator.TopConstantTop i.e.
-
Constructor Summary
Constructors Constructor Description SEvaluator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ValuegetConstantValueOf(Value op)Returns the constant value ofopif it is easy to find the constant value; else returnsnull.static ConstantgetFuzzyConstantValueOf(Value v)If a normal expression contains Bottom, always return Bottom.static ConstantgetFuzzyConstantValueOf(Value v, Map<Local,Constant> localToConstant)Get the constant value of the expression given the assumptions in the localToConstant map (may contain Top and Bottom).static booleanisValueConstantValued(Value op)Returns true if given value is determined to be constant valued, false otherwise
-
-
-
Method Detail
-
isValueConstantValued
public static boolean isValueConstantValued(Value op)
Returns true if given value is determined to be constant valued, false otherwise
-
getConstantValueOf
public static Value getConstantValueOf(Value op)
Returns the constant value ofopif it is easy to find the constant value; else returnsnull.
-
getFuzzyConstantValueOf
public static Constant getFuzzyConstantValueOf(Value v)
If a normal expression contains Bottom, always return Bottom. Otherwise, if a normal expression contains Top, returns Top. Else determine the constant value of the expression if possible, if not return Bottom.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.
- See Also:
SEvaluator.TopConstant,SEvaluator.BottomConstant
-
getFuzzyConstantValueOf
public static Constant getFuzzyConstantValueOf(Value v, Map<Local,Constant> localToConstant)
Get the constant value of the expression given the assumptions in the localToConstant map (may contain Top and Bottom). Does not change expression.- See Also:
SEvaluator.TopConstant,SEvaluator.BottomConstant
-
-