com.ibm.wala.ipa.modref
Class ModRef

java.lang.Object
  extended by com.ibm.wala.ipa.modref.ModRef
Direct Known Subclasses:
AstModRef

public class ModRef
extends java.lang.Object

Mod-ref analysis for heap locations. For each call graph node, what heap locations (as determined by a heap model) may it read or write, including it's callees transitively


Nested Class Summary
protected static class ModRef.ModVisitor
           
protected static class ModRef.RefVisitor
           
 
Constructor Summary
protected ModRef()
           
 
Method Summary
 java.util.Map<CGNode,OrdinalSet<PointerKey>> computeMod(CallGraph cg, PointerAnalysis pa)
          For each call graph node, what heap locations (as determined by a heap model) may it write, including its callees transitively
 java.util.Map<CGNode,OrdinalSet<PointerKey>> computeMod(CallGraph cg, PointerAnalysis pa, HeapExclusions heapExclude)
          For each call graph node, what heap locations (as determined by a heap model) may it write, including its callees transitively
 java.util.Map<CGNode,OrdinalSet<PointerKey>> computeRef(CallGraph cg, PointerAnalysis pa)
          For each call graph node, what heap locations (as determined by a heap model) may it read, including its callees transitively
 java.util.Map<CGNode,OrdinalSet<PointerKey>> computeRef(CallGraph cg, PointerAnalysis pa, HeapExclusions heapExclude)
          For each call graph node, what heap locations (as determined by a heap model) may it read, including its callees transitively
 java.util.Set<PointerKey> getMod(CGNode n, ExtendedHeapModel h, PointerAnalysis pa, SSAInstruction s, HeapExclusions hexcl)
          Compute the set of PointerKeys that represent pointers that instruction s may write to.
 java.util.Set<PointerKey> getMod(CGNode n, ExtendedHeapModel h, PointerAnalysis pa, SSAInstruction s, HeapExclusions hexcl, boolean ignoreAllocHeapDefs)
          Compute the set of PointerKeys that represent pointers that instruction s may write to.
 java.util.Set<PointerKey> getRef(CGNode n, ExtendedHeapModel h, PointerAnalysis pa, SSAInstruction s, HeapExclusions hexcl)
          Compute the set of PointerKeys that represent pointers that instruction s may read.
static ModRef make()
           
protected  ModRef.ModVisitor makeModVisitor(CGNode n, java.util.Collection<PointerKey> result, PointerAnalysis pa, ExtendedHeapModel h)
           
protected  ModRef.ModVisitor makeModVisitor(CGNode n, java.util.Collection<PointerKey> result, PointerAnalysis pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs)
           
protected  ModRef.RefVisitor makeRefVisitor(CGNode n, java.util.Collection<PointerKey> result, PointerAnalysis pa, ExtendedHeapModel h)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModRef

protected ModRef()
Method Detail

make

public static ModRef make()

computeMod

public java.util.Map<CGNode,OrdinalSet<PointerKey>> computeMod(CallGraph cg,
                                                               PointerAnalysis pa,
                                                               HeapExclusions heapExclude)
For each call graph node, what heap locations (as determined by a heap model) may it write, including its callees transitively

Throws:
java.lang.IllegalArgumentException - if cg is null

computeRef

public java.util.Map<CGNode,OrdinalSet<PointerKey>> computeRef(CallGraph cg,
                                                               PointerAnalysis pa,
                                                               HeapExclusions heapExclude)
For each call graph node, what heap locations (as determined by a heap model) may it read, including its callees transitively

Throws:
java.lang.IllegalArgumentException - if cg is null

computeMod

public java.util.Map<CGNode,OrdinalSet<PointerKey>> computeMod(CallGraph cg,
                                                               PointerAnalysis pa)
For each call graph node, what heap locations (as determined by a heap model) may it write, including its callees transitively


computeRef

public java.util.Map<CGNode,OrdinalSet<PointerKey>> computeRef(CallGraph cg,
                                                               PointerAnalysis pa)
For each call graph node, what heap locations (as determined by a heap model) may it read, including its callees transitively


makeModVisitor

protected ModRef.ModVisitor makeModVisitor(CGNode n,
                                           java.util.Collection<PointerKey> result,
                                           PointerAnalysis pa,
                                           ExtendedHeapModel h)

makeModVisitor

protected ModRef.ModVisitor makeModVisitor(CGNode n,
                                           java.util.Collection<PointerKey> result,
                                           PointerAnalysis pa,
                                           ExtendedHeapModel h,
                                           boolean ignoreAllocHeapDefs)

getMod

public java.util.Set<PointerKey> getMod(CGNode n,
                                        ExtendedHeapModel h,
                                        PointerAnalysis pa,
                                        SSAInstruction s,
                                        HeapExclusions hexcl)
Compute the set of PointerKeys that represent pointers that instruction s may write to.


getMod

public java.util.Set<PointerKey> getMod(CGNode n,
                                        ExtendedHeapModel h,
                                        PointerAnalysis pa,
                                        SSAInstruction s,
                                        HeapExclusions hexcl,
                                        boolean ignoreAllocHeapDefs)
Compute the set of PointerKeys that represent pointers that instruction s may write to.


makeRefVisitor

protected ModRef.RefVisitor makeRefVisitor(CGNode n,
                                           java.util.Collection<PointerKey> result,
                                           PointerAnalysis pa,
                                           ExtendedHeapModel h)

getRef

public java.util.Set<PointerKey> getRef(CGNode n,
                                        ExtendedHeapModel h,
                                        PointerAnalysis pa,
                                        SSAInstruction s,
                                        HeapExclusions hexcl)
Compute the set of PointerKeys that represent pointers that instruction s may read.