Package proguard.analysis.cpa.util
Class TaintAnalyzer.Builder
- java.lang.Object
-
- proguard.analysis.cpa.util.TaintAnalyzer.Builder
-
- Enclosing class:
- TaintAnalyzer
public static class TaintAnalyzer.Builder extends java.lang.Object
Class to configure and build aTaintAnalyzer
.Each separate built
TaintAnalyzer
uses its ownBamCache
, so different analyzers won't share results.
-
-
Constructor Summary
Constructors Constructor Description Builder(JvmCfa cfa, java.util.Set<? extends JvmTaintSource> taintSources, java.util.Set<? extends JvmTaintSink> taintSinks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaintAnalyzer
build()
Build aTaintAnalyzer
TaintAnalyzer.Builder
setAbortOperator(AbortOperator abortOperator)
Sets the abort operator for premature CPA algorithm termination.TaintAnalyzer.Builder
setExtraTaintPropagationLocations(java.util.Map<Call,java.util.Set<JvmMemoryLocation>> extraTaintPropagationLocations)
Set a mapping from a call to the set of locations which should get tainted after the call invocation.TaintAnalyzer.Builder
setMaxCallStackDepth(int maxCallStackDepth)
Set the max depth call depth of the inter-procedural analysis.TaintAnalyzer.Builder
setMemoryLocationAbortOperator(AbortOperator memoryLocationAbortOperator)
Sets the abort operator for premature trace reconstruction termination.TaintAnalyzer.Builder
setTaintTransformers(java.util.Map<MethodSignature,JvmTaintTransformer> taintTransformers)
Set a mapping from method signature to a transformer object applied to the taint state when that method is invoked.
-
-
-
Constructor Detail
-
Builder
public Builder(JvmCfa cfa, java.util.Set<? extends JvmTaintSource> taintSources, java.util.Set<? extends JvmTaintSink> taintSinks)
-
-
Method Detail
-
build
public TaintAnalyzer build()
Build aTaintAnalyzer
-
setMaxCallStackDepth
public TaintAnalyzer.Builder setMaxCallStackDepth(int maxCallStackDepth)
Set the max depth call depth of the inter-procedural analysis. After the max depth has been reached, the analysis will provide a default result for the method (i.e., in the same wayLibraryMethod
s are usually not analyzed).The default value is 10.
- Parameters:
maxCallStackDepth
- maximum depth of the call stack analyzed inter-procedurally. 0 means intra-procedural analysis. < 0 means no maximum depth.- Returns:
- this
ValueAnalyzer
builder.
-
setAbortOperator
public TaintAnalyzer.Builder setAbortOperator(AbortOperator abortOperator)
Sets the abort operator for premature CPA algorithm termination.
-
setMemoryLocationAbortOperator
public TaintAnalyzer.Builder setMemoryLocationAbortOperator(AbortOperator memoryLocationAbortOperator)
Sets the abort operator for premature trace reconstruction termination.
-
setTaintTransformers
public TaintAnalyzer.Builder setTaintTransformers(java.util.Map<MethodSignature,JvmTaintTransformer> taintTransformers)
Set a mapping from method signature to a transformer object applied to the taint state when that method is invoked.
-
setExtraTaintPropagationLocations
public TaintAnalyzer.Builder setExtraTaintPropagationLocations(java.util.Map<Call,java.util.Set<JvmMemoryLocation>> extraTaintPropagationLocations)
Set a mapping from a call to the set of locations which should get tainted after the call invocation.
-
-