本文整理汇总了Java中soot.jimple.infoflow.data.Abstraction.deriveNewAbstraction方法的典型用法代码示例。如果您正苦于以下问题:Java Abstraction.deriveNewAbstraction方法的具体用法?Java Abstraction.deriveNewAbstraction怎么用?Java Abstraction.deriveNewAbstraction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类soot.jimple.infoflow.data.Abstraction
的用法示例。
在下文中一共展示了Abstraction.deriveNewAbstraction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeAliasTaints
import soot.jimple.infoflow.data.Abstraction; //导入方法依赖的package包/类
@Override
public void computeAliasTaints(Abstraction d1, Stmt src, Value targetValue,
Set<Abstraction> taintSet, SootMethod method, Abstraction newAbs) {
// Use global aliasing
Value baseValue = ((InstanceFieldRef) targetValue).getBase();
Set<AccessPath> aliases = methodToAliases.getUnchecked(method).get
(new AccessPath(baseValue, true));
if (aliases != null)
for (AccessPath ap : aliases) {
Abstraction aliasAbs = newAbs.deriveNewAbstraction(
ap.merge(newAbs.getAccessPath()), null);
if (taintSet.add(aliasAbs))
// We have found a new alias. This new base object may however yet
// again alias with something, so we need to check again
if (ap.isInstanceFieldRef()) {
InstanceFieldRef aliasBaseVal = Jimple.v().newInstanceFieldRef
(ap.getPlainValue(), ap.getFirstField().makeRef());
computeAliasTaints(d1, src, aliasBaseVal, taintSet, method, aliasAbs);
}
}
}
示例2: getTaintedValues
import soot.jimple.infoflow.data.Abstraction; //导入方法依赖的package包/类
@Override
public Set<Abstraction> getTaintedValues(Stmt call, Abstraction source, Value[] params){
//check some evaluated methods:
//arraycopy:
//arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
//Copies an array from the specified source array, beginning at the specified position,
//to the specified position of the destination array.
if(call.getInvokeExpr().getMethod().toString().contains("arraycopy"))
if(params[0].equals(source.getAccessPath().getPlainValue())) {
Abstraction abs = source.deriveNewAbstraction(params[2], false, call,
source.getAccessPath().getBaseType());
abs.setCorrespondingCallSite(call);
return Collections.singleton(abs);
}
return Collections.emptySet();
}
示例3: computeAliasTaints
import soot.jimple.infoflow.data.Abstraction; //导入方法依赖的package包/类
@Override
public void computeAliasTaints(Abstraction d1, Stmt src, Value targetValue,
Set<Abstraction> taintSet, SootMethod method, Abstraction newAbs) {
// If we don't have an alias set for this method yet, we compute it
if (!globalAliases.containsRow(method))
computeGlobalAliases(method);
// Use global aliasing
Value baseValue = ((InstanceFieldRef) targetValue).getBase();
Set<AccessPath> aliases = globalAliases.get(method, new AccessPath(
baseValue));
if (aliases != null)
for (AccessPath ap : aliases) {
Abstraction aliasAbs = newAbs.deriveNewAbstraction(
ap.merge(newAbs.getAccessPath()), src);
taintSet.add(aliasAbs);
}
}