当前位置: 首页>>代码示例>>Java>>正文


Java Abstraction.deriveNewAbstraction方法代码示例

本文整理汇总了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);
				}
		}
}
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:22,代码来源:ImplicitFlowAliasStrategy.java

示例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();
}
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:19,代码来源:DefaultNativeCallHandler.java

示例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);
		}
}
 
开发者ID:0-14N,项目名称:soot-inflow,代码行数:19,代码来源:ImplicitFlowAliasStrategy.java


注:本文中的soot.jimple.infoflow.data.Abstraction.deriveNewAbstraction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。