Package com.ibm.wala.ipa.modref
Class ModRef<T extends InstanceKey>
- java.lang.Object
-
- com.ibm.wala.ipa.modref.ModRef<T>
-
- Direct Known Subclasses:
AstModRef
public class ModRef<T extends InstanceKey> extends 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
Nested Classes Modifier and Type Class Description protected static class
ModRef.ModVisitor<T extends InstanceKey,H extends ExtendedHeapModel>
protected static class
ModRef.RefVisitor<T extends InstanceKey,H extends ExtendedHeapModel>
-
Constructor Summary
Constructors Modifier Constructor Description protected
ModRef()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<CGNode,OrdinalSet<PointerKey>>
computeMod(CallGraph cg, PointerAnalysis<T> pa)
For each call graph node, what heap locations (as determined by a heap model) may it write, including its callees transitivelyMap<CGNode,OrdinalSet<PointerKey>>
computeMod(CallGraph cg, PointerAnalysis<T> pa, HeapExclusions heapExclude)
For each call graph node, what heap locations (as determined by a heap model) may it write, including its callees transitivelyMap<CGNode,OrdinalSet<PointerKey>>
computeRef(CallGraph cg, PointerAnalysis<T> pa)
For each call graph node, what heap locations (as determined by a heap model) may it read, including its callees transitivelyMap<CGNode,OrdinalSet<PointerKey>>
computeRef(CallGraph cg, PointerAnalysis<T> pa, HeapExclusions heapExclude)
For each call graph node, what heap locations (as determined by a heap model) may it read, including its callees transitivelySet<PointerKey>
getMod(CGNode n, ExtendedHeapModel h, PointerAnalysis<T> pa, SSAInstruction s, HeapExclusions hexcl)
Compute the set ofPointerKey
s that represent pointers that instruction s may write to.Set<PointerKey>
getMod(CGNode n, ExtendedHeapModel h, PointerAnalysis<T> pa, SSAInstruction s, HeapExclusions hexcl, boolean ignoreAllocHeapDefs)
Compute the set ofPointerKey
s that represent pointers that instruction s may write to.Set<PointerKey>
getRef(CGNode n, ExtendedHeapModel h, PointerAnalysis<T> pa, SSAInstruction s, HeapExclusions hexcl)
Compute the set ofPointerKey
s that represent pointers that instruction s may read.static ModRef
make()
ExtendedHeapModel
makeHeapModel(PointerAnalysis<T> pa)
protected ModRef.ModVisitor
makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h)
protected ModRef.ModVisitor
makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs)
protected ModRef.RefVisitor
makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h)
-
-
-
Method Detail
-
make
public static ModRef make()
-
computeMod
public Map<CGNode,OrdinalSet<PointerKey>> computeMod(CallGraph cg, PointerAnalysis<T> 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:
IllegalArgumentException
- if cg is null
-
computeRef
public Map<CGNode,OrdinalSet<PointerKey>> computeRef(CallGraph cg, PointerAnalysis<T> 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:
IllegalArgumentException
- if cg is null
-
computeMod
public Map<CGNode,OrdinalSet<PointerKey>> computeMod(CallGraph cg, PointerAnalysis<T> pa)
For each call graph node, what heap locations (as determined by a heap model) may it write, including its callees transitively
-
computeRef
public Map<CGNode,OrdinalSet<PointerKey>> computeRef(CallGraph cg, PointerAnalysis<T> pa)
For each call graph node, what heap locations (as determined by a heap model) may it read, including its callees transitively
-
makeHeapModel
public ExtendedHeapModel makeHeapModel(PointerAnalysis<T> pa)
-
makeModVisitor
protected ModRef.ModVisitor makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h)
-
makeModVisitor
protected ModRef.ModVisitor makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs)
-
getMod
public Set<PointerKey> getMod(CGNode n, ExtendedHeapModel h, PointerAnalysis<T> pa, SSAInstruction s, HeapExclusions hexcl)
Compute the set ofPointerKey
s that represent pointers that instruction s may write to.
-
getMod
public Set<PointerKey> getMod(CGNode n, ExtendedHeapModel h, PointerAnalysis<T> pa, SSAInstruction s, HeapExclusions hexcl, boolean ignoreAllocHeapDefs)
Compute the set ofPointerKey
s that represent pointers that instruction s may write to.
-
makeRefVisitor
protected ModRef.RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<T> pa, ExtendedHeapModel h)
-
getRef
public Set<PointerKey> getRef(CGNode n, ExtendedHeapModel h, PointerAnalysis<T> pa, SSAInstruction s, HeapExclusions hexcl)
Compute the set ofPointerKey
s that represent pointers that instruction s may read.
-
-