Package proguard.analysis.cpa.bam
Class BamCpa<ContentT extends AbstractState<ContentT>>
java.lang.Object
proguard.analysis.cpa.bam.BamCpa<ContentT>
- Type Parameters:
ContentT- > The content of the jvm states produced by the transfer relation. For example, this can be aSetAbstractStateof taints for taint analysis or aValueAbstractStatefor value analysis.
- All Implemented Interfaces:
ConfigurableProgramAnalysis<JvmAbstractState<ContentT>>
public class BamCpa<ContentT extends AbstractState<ContentT>>
extends Object
implements ConfigurableProgramAnalysis<JvmAbstractState<ContentT>>
A
ConfigurableProgramAnalysis for inter-procedural analysis using block abstraction
memoization as described in , which is
defined by a domain-dependent CpaWithBamOperators that adds three operators: reduce,
expand, and rebuild. This allows an inter-procedural analysis running this CPA to be conducted by
the standard CpaAlgorithm.
A BAM CPA works on a domain-independent level and its abstract domain, merge operator, and
stop operator are defined by the domain-dependent wrapped CPA. The main feature of a BAM CPA is
its transfer relation (see BamTransferRelation for details) that is able to extend the
analysis of the wrapped CPA to the inter-procedural level.
-
Constructor Summary
ConstructorsConstructorDescriptionBamCpa(CpaWithBamOperators<ContentT> wrappedCpa, JvmCfa cfa, MethodSignature mainFunction, BamCache<ContentT> cache) Create a BamCpa with default transfer relation.BamCpa(CpaWithBamOperators<ContentT> wrappedCpa, JvmCfa cfa, MethodSignature mainFunction, BamCache<ContentT> cache, int maxCallStackDepth) Create a BamCpa with default transfer relation with a limited call depth. -
Method Summary
Modifier and TypeMethodDescription@NotNull AbortOperatorgetCache()Returns the BAM cache used by the CPA.getCfa()Returns the CFA used by the CPA.Returns the expand operator of the wrapped CPA.Returns the transfer relation of the interprocedural CPA wrapped by the BamCpa.@NotNull MergeOperator<JvmAbstractState<ContentT>>Returns the merge operator of the wrapped CPA.@NotNull PrecisionAdjustmentReturns the precision adjustment of the wrapped CPA.Returns the rebuild operator of the wrapped CPA.Returns the reduce operator of the wrapped CPA.@NotNull StopOperator<JvmAbstractState<ContentT>>Returns the stop operator of the wrapped CPA.@NotNull BamTransferRelation<ContentT>Returns the BAM transfer relation, more details inBamTransferRelation.
-
Constructor Details
-
BamCpa
public BamCpa(CpaWithBamOperators<ContentT> wrappedCpa, JvmCfa cfa, MethodSignature mainFunction, BamCache<ContentT> cache) Create a BamCpa with default transfer relation.- Parameters:
wrappedCpa- a wrapped CPA with BAM operatorscfa- a control flow automatonmainFunction- the signature of the main function of an analyzed programcache- a cache for the block abstractions
-
BamCpa
public BamCpa(CpaWithBamOperators<ContentT> wrappedCpa, JvmCfa cfa, MethodSignature mainFunction, BamCache<ContentT> cache, int maxCallStackDepth) Create a BamCpa with default transfer relation with a limited call depth. At the maximum call depth further function calls are just analyzed intra-procedurally.- Parameters:
wrappedCpa- a wrapped cpa with BAM operatorscfa- a control flow automatonmainFunction- the signature of a main functioncache- a cache for the block abstractionsmaxCallStackDepth- maximum depth of the call stack analyzed inter-procedurally. 0 means intra-procedural analysis. < 0 means no maximum depth.
-
-
Method Details
-
getTransferRelation
Returns the BAM transfer relation, more details inBamTransferRelation.- Specified by:
getTransferRelationin interfaceConfigurableProgramAnalysis<ContentT extends AbstractState<ContentT>>
-
getMergeOperator
Returns the merge operator of the wrapped CPA.- Specified by:
getMergeOperatorin interfaceConfigurableProgramAnalysis<ContentT extends AbstractState<ContentT>>
-
getStopOperator
Returns the stop operator of the wrapped CPA.- Specified by:
getStopOperatorin interfaceConfigurableProgramAnalysis<ContentT extends AbstractState<ContentT>>
-
getPrecisionAdjustment
Returns the precision adjustment of the wrapped CPA.- Specified by:
getPrecisionAdjustmentin interfaceConfigurableProgramAnalysis<ContentT extends AbstractState<ContentT>>
-
getAbortOperator
- Specified by:
getAbortOperatorin interfaceConfigurableProgramAnalysis<ContentT extends AbstractState<ContentT>>
-
getReduceOperator
Returns the reduce operator of the wrapped CPA. -
getExpandOperator
Returns the expand operator of the wrapped CPA. -
getRebuildOperator
Returns the rebuild operator of the wrapped CPA. -
getCache
Returns the BAM cache used by the CPA. -
getCfa
Returns the CFA used by the CPA. -
getIntraproceduralTransferRelation
Returns the transfer relation of the interprocedural CPA wrapped by the BamCpa.This transfer relation is used to analyze all non-call instructions and call instructions that cannot be analyzed inter-procedurally (e.g., because their code is not available or because the maximum analysis depth has been reached).
-