Class JvmTaintBamCpaRun.Builder
- java.lang.Object
-
- proguard.analysis.cpa.defaults.BamCpaRun.Builder
-
- proguard.analysis.cpa.jvm.util.JvmBamCpaRun.Builder
-
- proguard.analysis.cpa.jvm.domain.taint.JvmTaintBamCpaRun.Builder
-
- Enclosing class:
- JvmTaintBamCpaRun<OuterAbstractStateT extends AbstractState>
public static class JvmTaintBamCpaRun.Builder extends JvmBamCpaRun.Builder
A builder forJvmTaintBamCpaRun
. It assumes either the best performing parameters or the most basic one, if there is no absolute benefit.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<Call,java.util.Set<JvmMemoryLocation>>
extraTaintPropagationLocations
protected MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>>
followerHeapNodeMapAbstractStateFactory
protected MethodSignature
mainSignature
protected MapAbstractStateFactory<java.lang.String,SetAbstractState<Reference>>
principalHeapNodeMapAbstractStateFactory
protected MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>>
staticFieldMapAbstractStateFactory
protected java.util.Set<? extends JvmTaintSource>
taintSources
protected java.util.Map<MethodSignature,JvmTaintTransformer>
taintTransformers
-
Fields inherited from class proguard.analysis.cpa.jvm.util.JvmBamCpaRun.Builder
cfa, heapModel
-
Fields inherited from class proguard.analysis.cpa.defaults.BamCpaRun.Builder
abortOperator, maxCallStackDepth, reduceHeap
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JvmTaintBamCpaRun<?>
build()
Returns theJvmTaintBamCpaRun
for given parameters.JvmTaintBamCpaRun.Builder
setAbortOperator(AbortOperator abortOperator)
Sets the abort operator for premature CPA algorithm termination.JvmTaintBamCpaRun.Builder
setCfa(JvmCfa cfa)
Sets the control flow automaton.JvmTaintBamCpaRun.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.JvmTaintBamCpaRun.Builder
setFollowerHeapNodeMapAbstractStateFactory(MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> followerHeapNodeMapAbstractStateFactory)
Sets the map abstract state factory used for constructing the mapping from fields to values in the follower heap model.JvmTaintBamCpaRun.Builder
setHeapModel(HeapModel heapModel)
Sets the heap model.JvmTaintBamCpaRun.Builder
setMainSignature(MethodSignature mainSignature)
Sets the signature of the method the analysis starts from.JvmTaintBamCpaRun.Builder
setMaxCallStackDepth(int maxCallStackDepth)
Sets the call stack limit for the interprocedural analysis.JvmTaintBamCpaRun.Builder
setPrincipalHeapNodeMapAbstractStateFactory(MapAbstractStateFactory<java.lang.String,SetAbstractState<Reference>> principalHeapNodeMapAbstractStateFactory)
Sets the map abstract state factory used for constructing the mapping from fields to values in the principal heap model.JvmTaintBamCpaRun.Builder
setReduceHeap(boolean reduceHeap)
Sets whether the heap should be reduced before method calls.JvmTaintBamCpaRun.Builder
setStaticFieldMapAbstractStateFactory(MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> staticFieldMapAbstractStateFactory)
Sets the static field map abstract state factory.JvmTaintBamCpaRun.Builder
setTaintSources(java.util.Set<? extends JvmTaintSource> taintSources)
Sets the taint sources.JvmTaintBamCpaRun.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.
-
-
-
Field Detail
-
mainSignature
protected MethodSignature mainSignature
-
taintSources
protected java.util.Set<? extends JvmTaintSource> taintSources
-
staticFieldMapAbstractStateFactory
protected MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> staticFieldMapAbstractStateFactory
-
principalHeapNodeMapAbstractStateFactory
protected MapAbstractStateFactory<java.lang.String,SetAbstractState<Reference>> principalHeapNodeMapAbstractStateFactory
-
followerHeapNodeMapAbstractStateFactory
protected MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> followerHeapNodeMapAbstractStateFactory
-
taintTransformers
protected java.util.Map<MethodSignature,JvmTaintTransformer> taintTransformers
-
extraTaintPropagationLocations
protected java.util.Map<Call,java.util.Set<JvmMemoryLocation>> extraTaintPropagationLocations
-
-
Method Detail
-
build
public JvmTaintBamCpaRun<?> build()
Returns theJvmTaintBamCpaRun
for given parameters.- Specified by:
build
in classJvmBamCpaRun.Builder
-
setMaxCallStackDepth
public JvmTaintBamCpaRun.Builder setMaxCallStackDepth(int maxCallStackDepth)
Description copied from class:BamCpaRun.Builder
Sets the call stack limit for the interprocedural analysis.- Overrides:
setMaxCallStackDepth
in classJvmBamCpaRun.Builder
-
setAbortOperator
public JvmTaintBamCpaRun.Builder setAbortOperator(AbortOperator abortOperator)
Description copied from class:BamCpaRun.Builder
Sets the abort operator for premature CPA algorithm termination.- Overrides:
setAbortOperator
in classJvmBamCpaRun.Builder
-
setReduceHeap
public JvmTaintBamCpaRun.Builder setReduceHeap(boolean reduceHeap)
Description copied from class:BamCpaRun.Builder
Sets whether the heap should be reduced before method calls.- Overrides:
setReduceHeap
in classJvmBamCpaRun.Builder
-
setCfa
public JvmTaintBamCpaRun.Builder setCfa(JvmCfa cfa)
Description copied from class:JvmBamCpaRun.Builder
Sets the control flow automaton.- Overrides:
setCfa
in classJvmBamCpaRun.Builder
-
setHeapModel
public JvmTaintBamCpaRun.Builder setHeapModel(HeapModel heapModel)
Description copied from class:JvmBamCpaRun.Builder
Sets the heap model.- Overrides:
setHeapModel
in classJvmBamCpaRun.Builder
-
setTaintSources
public JvmTaintBamCpaRun.Builder setTaintSources(java.util.Set<? extends JvmTaintSource> taintSources)
Sets the taint sources.
-
setMainSignature
public JvmTaintBamCpaRun.Builder setMainSignature(MethodSignature mainSignature)
Sets the signature of the method the analysis starts from.
-
setStaticFieldMapAbstractStateFactory
public JvmTaintBamCpaRun.Builder setStaticFieldMapAbstractStateFactory(MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> staticFieldMapAbstractStateFactory)
Sets the static field map abstract state factory.
-
setPrincipalHeapNodeMapAbstractStateFactory
public JvmTaintBamCpaRun.Builder setPrincipalHeapNodeMapAbstractStateFactory(MapAbstractStateFactory<java.lang.String,SetAbstractState<Reference>> principalHeapNodeMapAbstractStateFactory)
Sets the map abstract state factory used for constructing the mapping from fields to values in the principal heap model.
-
setFollowerHeapNodeMapAbstractStateFactory
public JvmTaintBamCpaRun.Builder setFollowerHeapNodeMapAbstractStateFactory(MapAbstractStateFactory<java.lang.String,SetAbstractState<JvmTaintSource>> followerHeapNodeMapAbstractStateFactory)
Sets the map abstract state factory used for constructing the mapping from fields to values in the follower heap model.
-
setTaintTransformers
public JvmTaintBamCpaRun.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 JvmTaintBamCpaRun.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.
-
-