Class JvmTaintCpa

All Implemented Interfaces:
ConfigurableProgramAnalysis<JvmAbstractState<SetAbstractState<JvmTaintSource>>>

public class JvmTaintCpa extends SimpleCpa<JvmAbstractState<SetAbstractState<JvmTaintSource>>>
The JvmTaintCpa computes abstract states containing JvmTaintSources which can reach the given code location.
  • Constructor Details

    • JvmTaintCpa

      public JvmTaintCpa(Set<? extends JvmTaintSource> sources)
      Create a taint CPA.
      Parameters:
      sources - a set of taint sources
    • JvmTaintCpa

      public JvmTaintCpa(Map<Signature,Set<JvmTaintSource>> signaturesToSources, Map<MethodSignature,JvmTaintTransformer> taintTransformers, Map<Call,Set<JvmMemoryLocation>> extraTaintPropagationLocations, AbortOperator abortOperator)
      Create a taint CPA.
      Parameters:
      signaturesToSources - a mapping from method signature to taint sources
      taintTransformers - a mapping from method signature to a transformer object applied to the taint state when that method is invoked
      extraTaintPropagationLocations - a mapping from a specific method call to any jvm state location that is tainted as a result of the call
      abortOperator - an operator used to stop the analysis prematurely.
  • Method Details

    • createSourcesMap

      public static Map<Signature,Set<JvmTaintSource>> createSourcesMap(Set<? extends JvmTaintSource> sources)
      Since the used data structure is a map that uses the fqn as key, which is a parameter of the TaintSources, this method constructs the map correctly starting from a set of sources.