Class AddNopStmt
java.lang.Object
soot.jimple.infoflow.codeOptimization.AddNopStmt
- All Implemented Interfaces:
ICodeOptimizer
There is one special case: If a source stmt is a static method without any
parameters, which is called from a static method also without any parameters
(see static2Test), the assign stmt s = staticSource() is be the first
statement in the iCFG (excluded the dummy main method). The CallToReturn flow
function only gets applied if a return site is available. In backwards
analysis the iCFG is reversed and the assign stmt therefore has no return
site. But we need the execution of the CallToReturn flow function to register
the arrival at the source.
To fix this edge case, we add a NOP in static methods called from an entry
point.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(InfoflowConfiguration config) Initializes the code optimizer.voidrun(InfoflowManager manager, Collection<soot.SootMethod> entryPoints, ISourceSinkManager sourcesSinks, ITaintPropagationWrapper taintWrapper) Runs the coe optimization
-
Constructor Details
-
AddNopStmt
public AddNopStmt()
-
-
Method Details
-
initialize
Description copied from interface:ICodeOptimizerInitializes the code optimizer. This method is called before any actual optimizations are carried out.- Specified by:
initializein interfaceICodeOptimizer- Parameters:
config- The data flow analyzer's configuration
-
run
public void run(InfoflowManager manager, Collection<soot.SootMethod> entryPoints, ISourceSinkManager sourcesSinks, ITaintPropagationWrapper taintWrapper) Description copied from interface:ICodeOptimizerRuns the coe optimization- Specified by:
runin interfaceICodeOptimizer- Parameters:
manager- The data flow manager for interacting with the solverentryPoints- The set of entry points for the data flow analysissourcesSinks- The SourceSinkManagertaintWrapper- The taint wrapper
-