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


Java IFDSSolver.solve方法代码示例

本文整理汇总了Java中heros.solver.IFDSSolver.solve方法的典型用法代码示例。如果您正苦于以下问题:Java IFDSSolver.solve方法的具体用法?Java IFDSSolver.solve怎么用?Java IFDSSolver.solve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在heros.solver.IFDSSolver的用法示例。


在下文中一共展示了IFDSSolver.solve方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runSolver

import heros.solver.IFDSSolver; //导入方法依赖的package包/类
public void runSolver(final boolean followReturnsPastSeeds, final String...initialSeeds) {
	IFDSSolver<Statement, JoinableFact, TestMethod, InterproceduralCFG<Statement, TestMethod>> solver =
			new IFDSSolver<Statement, JoinableFact, TestMethod, InterproceduralCFG<Statement, TestMethod>>(
			createTabulationProblem(followReturnsPastSeeds, initialSeeds));

	solver.solve();
	assertAllFlowFunctionsUsed();
}
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:9,代码来源:TestHelper.java

示例2: analyze

import heros.solver.IFDSSolver; //导入方法依赖的package包/类
public void analyze() {
	icfg.initForMethod(task.getStartMethod());
	InterproceduralAnalysisProblem problem = new InterproceduralAnalysisProblem(icfg);
	IFDSSolver<Unit, FlowAbstraction, SootMethod, JitIcfg> solver = new IFDSSolver<Unit, FlowAbstraction, SootMethod, JitIcfg>(
			problem, jumpFunctions, endSum, inc) {

		// FlowTwist -> PropagateAndMerge
		@Override
		protected void propagate(FlowAbstraction sourceVal, Unit target, FlowAbstraction targetVal,
				EdgeFunction<IFDSSolver.BinaryDomain> f, Unit relatedCallSite, boolean isUnbalancedReturn,
				boolean force) {

			// Report leaks from summaries
			Map<FlowAbstraction, Set<List<FlowAbstraction>>> summaryLeaks = jumpFn.summaryPathsLookup(sourceVal,
					target);
			if (!summaryLeaks.isEmpty()) {
				if (DEBUG_REPORT)
					LOGGER.debug("Report (sum) " + sourceVal + " --- " + target.getJavaSourceStartLineNumber() + ":"
							+ target + " --- " + summaryLeaks);
				reporter.report(sourceVal, summaryLeaks);
			}

			// Set neighbours
			FlowAbstraction neighbour = null;
			Set<FlowAbstraction> similarTargets = jumpFn.forwardLookup(sourceVal, target).keySet();
			for (FlowAbstraction fa : similarTargets) {
				// If the values are similar, but not exact
				if (!targetVal.equals(FlowAbstraction.zeroAbstraction()) && targetVal.getUnit() != target
						&& !fa.exactEquals(targetVal) && fa.getShortName().equals(targetVal.getShortName())) {
					fa.addNeighbour(targetVal);
					neighbour = fa;
					if (DEBUG_NEIGHBOURS)
						LOGGER.debug("Initiate Neighbour " + targetVal + ":" + targetVal.getUnit() + " TO " + fa
								+ ":" + fa.getUnit() + " AT " + target + " METHOD " + icfg.getMethodOf(target));
					break;
				}
			}
			if (neighbour == null)
				propagateAfterMerge(sourceVal, target, targetVal, f, relatedCallSite, isUnbalancedReturn, force);
			else
				propagateAfterMerge(sourceVal, target, neighbour, f, relatedCallSite, isUnbalancedReturn, force);

		}
	};
	solver.solve();
}
 
开发者ID:secure-software-engineering,项目名称:cheetah,代码行数:47,代码来源:AnalysisTask.java

示例3: _runOneDirectionSolver

import heros.solver.IFDSSolver; //导入方法依赖的package包/类
protected static void _runOneDirectionSolver(final TabulationProblem tabulationProblem, IFDSSolver<Unit, Trackable, SootMethod, BiDiInterproceduralCFG<Unit, SootMethod>> solver) {
	AnalysisReporting.ifdsStarting(tabulationProblem.getContext(), solver);
	solver.solve();
	AnalysisReporting.ifdsFinished(tabulationProblem.getContext(), solver, FlowFunctionFactory.propCounter.get());
	FlowFunctionFactory.propCounter.set(0);
}
 
开发者ID:johanneslerch,项目名称:FlowTwist,代码行数:7,代码来源:SolverFactory.java


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