soot.jimple.internal.JimpleLocal Java Examples

The following examples show how to use soot.jimple.internal.JimpleLocal. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ResultsCCUIListener.java    From CogniCrypt with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void onSecureObjectFound(final IAnalysisSeed secureObject) {
	IPreferenceStore store = Activator.getDefault().getPreferenceStore();
	if (!store.getBoolean(Constants.SHOW_SECURE_OBJECTS) || this.depOnly) {
		return;
	}

	final Statement stmt = secureObject.stmt();
	final Stmt unit = stmt.getUnit().get();
	final List<ValueBox> useAndDefBoxes = unit.getUseAndDefBoxes();
	final Optional<ValueBox> varOpt = useAndDefBoxes.stream().filter(e -> e instanceof JimpleLocalBox).findFirst();
	ValueBox var = null;
	if (varOpt.isPresent()) {
		var = varOpt.get();
	} else {
		for (final ValueBox box : useAndDefBoxes) {
			if (box.getValue() instanceof JimpleLocal) {
				var = box;
				break;
			}
		}
	}
	final Value varName = var.getValue();
	this.markerGenerator.addMarker(Constants.CC_MARKER_TYPE, -1, unitToResource(stmt), unit.getJavaSourceStartLineNumber(),
			"Object " + (varName.toString().startsWith("$r") || varName.toString().startsWith("$stack")  ? " of Type " + var.getValue().getType().toQuotedString() : varName) + " is secure.", "",
			secureObject.getMethod().getActiveBody().toString(), Severities.Info, new HashMap<>(), false);
}
 
Example #2
Source File: Abstraction.java    From JAADAS with GNU General Public License v3.0 5 votes vote down vote up
public static Abstraction getZeroAbstraction(boolean flowSensitiveAliasing) {
	Abstraction zeroValue = new Abstraction(
			new AccessPath(new JimpleLocal("zero", NullType.v()), false),
			null,
			false,
			false);
	Abstraction.flowSensitiveAliasing = flowSensitiveAliasing;
	return zeroValue;
}
 
Example #3
Source File: IFDSReachingDefinitionWithField.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
public Pair<Value, Set<DefinitionStmt>> createZeroValue() {
	System.err.println("calling createZeroValue");
	return new Pair<Value, Set<DefinitionStmt>>(new JimpleLocal("<<zero>>",
			NullType.v()), Collections.<DefinitionStmt> emptySet());
}
 
Example #4
Source File: IFDSReachingDefinitionsEnhanced.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
public Pair<Value, Set<DefinitionStmt>> createZeroValue() {
	return new Pair<Value, Set<DefinitionStmt>>(new JimpleLocal("<<zero>>", NullType.v()), Collections.<DefinitionStmt> emptySet());
}
 
Example #5
Source File: IFDSForwardReachingConstantDefinitions.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
public TaintFact createZeroValue() {
	return new TaintFact(new JimpleLocal("<<zero>>", NullType.v()),Collections.<DefinitionStmt> emptySet());
}
 
Example #6
Source File: IFDSReachingDefinitions.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
public Pair<Value, Set<DefinitionStmt>> createZeroValue() {
	return new Pair<Value, Set<DefinitionStmt>>(new JimpleLocal("<<zero>>", NullType.v()), Collections.<DefinitionStmt> emptySet());
}
 
Example #7
Source File: IFDSLiveVariables.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
public Value createZeroValue() {
	return new JimpleLocal("<<zero>>", NullType.v());
}
 
Example #8
Source File: IFDSLocalInfoFlow.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Local createZeroValue() {
	return new JimpleLocal("zero", NullType.v());
}
 
Example #9
Source File: IFDSUninitializedVariables.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
@Override
public Local createZeroValue() {
	return new JimpleLocal("<<zero>>", NullType.v());
}
 
Example #10
Source File: RegisterAllocator.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
public Register asTmpReg(Type regType) {
	String tmpRegName = "tmp" + getRegCount();
	return asLocal(new JimpleLocal(tmpRegName, regType));
}
 
Example #11
Source File: IFDSReachingConstantDefinitions.java    From JAADAS with GNU General Public License v3.0 4 votes vote down vote up
public TrackFact createZeroValue() {
	return new TrackFact(new JimpleLocal("<<zero>>", NullType.v()) , null);
}
 
Example #12
Source File: PropagationProblem.java    From DroidRA with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public Value createZeroValue() {
  return new JimpleLocal("zero", NullType.v());
}