use of soot.SootField in project soot by Sable.
the class IncrementalTypesHeuristic method validFromBothEnds.
public boolean validFromBothEnds(SparkField field) {
if (field instanceof SootField) {
SootField sootField = (SootField) field;
RefType declaringType = sootField.getDeclaringClass().getType();
for (RefType type : notBothEndsTypes) {
if (manager.castNeverFails(declaringType, type)) {
return false;
}
}
}
return true;
}
use of soot.SootField in project soot by Sable.
the class IncrementalTypesHeuristic method validateMatchesForField.
/*
* (non-Javadoc)
*
* @see AAA.algs.Heuristic#validateMatchesForField(soot.jimple.spark.pag.SparkField)
*/
public boolean validateMatchesForField(SparkField field) {
// if (true) return true;
if (field instanceof ArrayElement) {
return true;
}
SootField sootField = (SootField) field;
RefType declaringType = sootField.getDeclaringClass().getType();
if (EXCLUDE_TYPES) {
for (String typeName : EXCLUDED_NAMES) {
if (Util.stringContains(declaringType.toString(), typeName)) {
return false;
}
}
}
for (RefType typeToCheck : typesToCheck) {
if (manager.castNeverFails(declaringType, typeToCheck)) {
return true;
}
}
if (newTypeOnQuery == null) {
newTypeOnQuery = declaringType;
// System.err.println("adding type " + declaringType);
}
// System.err.println("false for " + field);
return false;
}
use of soot.SootField in project soot by Sable.
the class ManualFieldCheckHeuristic method validateMatchesForField.
public boolean validateMatchesForField(SparkField field) {
if (field instanceof ArrayElement) {
return true;
}
SootField sootField = (SootField) field;
String fieldTypeStr = sootField.getDeclaringClass().getType().toString();
for (String typeName : importantTypes) {
if (fieldTypeStr.equals(typeName)) {
return true;
}
}
return false;
}
Aggregations