Class IntentContextInterpreter

java.lang.Object
com.ibm.wala.dalvik.ipa.callgraph.propagation.cfa.IntentContextInterpreter
All Implemented Interfaces:
com.ibm.wala.ipa.callgraph.cha.CHAContextInterpreter, com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter, com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter

public class IntentContextInterpreter extends Object implements com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter
An SSAContextInterpreter that redirects functions that start Android-Components.

The Starter-Functions (listed in IntentStarters) are replaced by a Model that emulates Android Lifecycle based on their Target (Internal, External, ...): A wrapper around the single models is generated dynamically (by the models themselves) to resemble the signature of the replaced function.

Methods are replacement by generating a adapted Intermediate Representation of this function on every occurrence of a call to it.

Since:
2013-10-14
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    IntentContextInterpreter(com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.ipa.callgraph.AnalysisOptions options, com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.ibm.wala.cfg.ControlFlowGraph<com.ibm.wala.ssa.SSAInstruction,com.ibm.wala.ssa.ISSABasicBlock>
    getCFG(com.ibm.wala.ipa.callgraph.CGNode node)
     
    com.ibm.wala.ssa.DefUse
    getDU(com.ibm.wala.ipa.callgraph.CGNode node)
     
    com.ibm.wala.ssa.IR
    getIR(com.ibm.wala.ipa.callgraph.CGNode node)
    Generates an adapted IR of the managed functions on each call.
    com.ibm.wala.ssa.IRView
    getIRView(com.ibm.wala.ipa.callgraph.CGNode node)
     
    int
    getNumberOfStatements(com.ibm.wala.ipa.callgraph.CGNode node)
     
    Iterator<com.ibm.wala.classLoader.CallSiteReference>
    iterateCallSites(com.ibm.wala.ipa.callgraph.CGNode node)
     
    Iterator<com.ibm.wala.types.FieldReference>
    iterateFieldsRead(com.ibm.wala.ipa.callgraph.CGNode node)
     
    Iterator<com.ibm.wala.types.FieldReference>
    iterateFieldsWritten(com.ibm.wala.ipa.callgraph.CGNode node)
     
    Iterator<com.ibm.wala.classLoader.NewSiteReference>
    iterateNewSites(com.ibm.wala.ipa.callgraph.CGNode node)
     
    boolean
    recordFactoryType(com.ibm.wala.ipa.callgraph.CGNode node, com.ibm.wala.classLoader.IClass klass)
     
    boolean
    understands(com.ibm.wala.ipa.callgraph.CGNode node)
    If the function associated with the node is handled by this class.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IntentContextInterpreter

      public IntentContextInterpreter(com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.ipa.callgraph.AnalysisOptions options, com.ibm.wala.ipa.callgraph.IAnalysisCacheView cache)
  • Method Details

    • getIR

      public com.ibm.wala.ssa.IR getIR(com.ibm.wala.ipa.callgraph.CGNode node)
      Generates an adapted IR of the managed functions on each call.
      Specified by:
      getIR in interface com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter
      Parameters:
      node - The function to create the IR of
      Throws:
      IllegalArgumentException - on a node of null
    • getIRView

      public com.ibm.wala.ssa.IRView getIRView(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      getIRView in interface com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter
    • understands

      public boolean understands(com.ibm.wala.ipa.callgraph.CGNode node)
      If the function associated with the node is handled by this class.
      Specified by:
      understands in interface com.ibm.wala.ipa.callgraph.cha.CHAContextInterpreter
      Throws:
      IllegalArgumentException - if the given node is null
    • iterateNewSites

      public Iterator<com.ibm.wala.classLoader.NewSiteReference> iterateNewSites(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      iterateNewSites in interface com.ibm.wala.ipa.callgraph.cha.CHAContextInterpreter
      Specified by:
      iterateNewSites in interface com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter
    • iterateCallSites

      public Iterator<com.ibm.wala.classLoader.CallSiteReference> iterateCallSites(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      iterateCallSites in interface com.ibm.wala.ipa.callgraph.cha.CHAContextInterpreter
    • getCFG

      public com.ibm.wala.cfg.ControlFlowGraph<com.ibm.wala.ssa.SSAInstruction,com.ibm.wala.ssa.ISSABasicBlock> getCFG(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      getCFG in interface com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter
    • getNumberOfStatements

      public int getNumberOfStatements(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      getNumberOfStatements in interface com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter
    • getDU

      public com.ibm.wala.ssa.DefUse getDU(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      getDU in interface com.ibm.wala.ipa.callgraph.propagation.SSAContextInterpreter
    • recordFactoryType

      public boolean recordFactoryType(com.ibm.wala.ipa.callgraph.CGNode node, com.ibm.wala.classLoader.IClass klass)
      Specified by:
      recordFactoryType in interface com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter
    • iterateFieldsWritten

      public Iterator<com.ibm.wala.types.FieldReference> iterateFieldsWritten(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      iterateFieldsWritten in interface com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter
    • iterateFieldsRead

      public Iterator<com.ibm.wala.types.FieldReference> iterateFieldsRead(com.ibm.wala.ipa.callgraph.CGNode node)
      Specified by:
      iterateFieldsRead in interface com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter