Package crypto.constraints
Class EvaluableConstraint
- java.lang.Object
-
- crypto.constraints.EvaluableConstraint
-
- Direct Known Subclasses:
ComparisonConstraint,ExceptionConstraint,PredicateConstraint,ValueConstraint
public abstract class EvaluableConstraint extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Modifier Constructor Description protectedEvaluableConstraint(ISLConstraint origin, ConstraintSolver context)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancouldNotExtractValues(Map<String,CallSiteWithExtractedValue> extractedValueMap, ISLConstraint constraint)If theExtractParameterAnalysiscannot find the allocation site of a parameter, it adds the ZERO value to the results to indicate that the value could not be extracted.abstract voidevaluate()protected Map<Integer,boomerang.scene.Val>extractArray(ExtractedValue extractedValue)protected Map<String,CallSiteWithExtractedValue>extractSootArray(CallSiteWithParamIndex callSite, ExtractedValue allocSite)Function that finds the values assigned to a soot array.protected Map<String,CallSiteWithExtractedValue>extractValueAsString(String varName)protected Collection<AbstractError>getErrors()static EvaluableConstraintgetInstance(ISLConstraint con, ConstraintSolver context)booleanhasErrors()
-
-
-
Constructor Detail
-
EvaluableConstraint
protected EvaluableConstraint(ISLConstraint origin, ConstraintSolver context)
-
-
Method Detail
-
getInstance
public static EvaluableConstraint getInstance(ISLConstraint con, ConstraintSolver context)
-
evaluate
public abstract void evaluate()
-
hasErrors
public boolean hasErrors()
-
getErrors
protected Collection<AbstractError> getErrors()
-
extractValueAsString
protected Map<String,CallSiteWithExtractedValue> extractValueAsString(String varName)
-
extractSootArray
protected Map<String,CallSiteWithExtractedValue> extractSootArray(CallSiteWithParamIndex callSite, ExtractedValue allocSite)
Function that finds the values assigned to a soot array.- Parameters:
callSite- call site at which sootValue is involvedallocSite- allocation site at which sootValue is involved- Returns:
- extracted array values
-
extractArray
protected Map<Integer,boomerang.scene.Val> extractArray(ExtractedValue extractedValue)
-
couldNotExtractValues
protected boolean couldNotExtractValues(Map<String,CallSiteWithExtractedValue> extractedValueMap, ISLConstraint constraint)
If theExtractParameterAnalysiscannot find the allocation site of a parameter, it adds the ZERO value to the results to indicate that the value could not be extracted. In such a case, aImpreciseValueExtractionErroris reported.- Parameters:
extractedValueMap- the map from theextractValueAsString(String)methodconstraint- the constraint that cannot be evaluated- Returns:
- true if the value could not be extracted and an
ImpreciseValueExtractionErrorgot reported
-
-