Package proguard.analysis.cpa.bam
Interface BamCache<ContentT extends AbstractState<ContentT>>
- Type Parameters:
ContentT- The content of the jvm states. For example, this can be aSetAbstractStateof taints for taint analysis or aValueAbstractStatefor value analysis.
- All Known Implementing Classes:
BamCacheImpl
public interface BamCache<ContentT extends AbstractState<ContentT>>
Generic interface for the BAM cache, where the blocks represent a function identified with a
SignatureT. Along with the Cfa the signature can be used to retrieve the block
(i.e. the respective CFA subgraph) as described in the BAM paper.
A block abstraction is uniquely identified by a triple of an entry AbstractState (that
may be call-context dependent, e.g. if the calling parameters or global variables are different),
the corresponding Precision, and the Signature of the function the block belongs
to.
-
Method Summary
Modifier and TypeMethodDescriptionget(Precision precision, MethodSignature blockKey) Returns a collection of all the cache entries for a specified method with a certain precision, empty in case there are not such entries.get(JvmAbstractState<ContentT> stateKey, Precision precisionKey, MethodSignature blockKey) Gets the block abstraction identified by the provided keys from the cache.get(MethodSignature blockKey) Returns a collection of all the cache entries for a specified method, empty in case there are not such entries.Returns a set of all the methods that have an entry in the cache.voidput(JvmAbstractState<ContentT> stateKey, Precision precisionKey, MethodSignature blockKey, BlockAbstraction<ContentT> blockAbstraction) Adds the block abstraction identified by the provided keys to the cache.intsize()Returns the size of the cache.values()Returns block abstractions stored in the cache.
-
Method Details
-
put
void put(JvmAbstractState<ContentT> stateKey, Precision precisionKey, MethodSignature blockKey, BlockAbstraction<ContentT> blockAbstraction) Adds the block abstraction identified by the provided keys to the cache. -
get
BlockAbstraction<ContentT> get(JvmAbstractState<ContentT> stateKey, Precision precisionKey, MethodSignature blockKey) Gets the block abstraction identified by the provided keys from the cache.- Returns:
- The requested block abstraction, null in case of cache-miss.
-
get
Returns a collection of all the cache entries for a specified method, empty in case there are not such entries. -
get
Returns a collection of all the cache entries for a specified method with a certain precision, empty in case there are not such entries. -
values
Collection<BlockAbstraction<ContentT>> values()Returns block abstractions stored in the cache. -
size
int size()Returns the size of the cache. -
getAllMethods
Set<MethodSignature> getAllMethods()Returns a set of all the methods that have an entry in the cache.
-