/** * Compute the lexical variables possibly modified by each {@link CGNode} and * its transitive callees. A lexical variable is represented as a pair (C,N), * where C is the defining {@link CGNode} and N is the {@link String} name. */ public Map<CGNode, OrdinalSet<Pair<CGNode, String>>> computeLexicalMod() { Map<CGNode, Collection<Pair<CGNode, String>>> scan = CallGraphTransitiveClosure.collectNodeResults(cg, this::scanNodeForLexWrites); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }
/** * Compute the lexical variables possibly read by each {@link CGNode} and its * transitive callees. A lexical variable is represented as a pair (C,N), * where C is the defining {@link CGNode} and N is the {@link String} name. */ public Map<CGNode, OrdinalSet<Pair<CGNode, String>>> computeLexicalRef() { Map<CGNode, Collection<Pair<CGNode, String>>> scan = CallGraphTransitiveClosure.collectNodeResults(cg, this::scanNodeForLexReads); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }
/** * Compute the lexical variables possibly modified by each {@link CGNode} and * its transitive callees. A lexical variable is represented as a pair (C,N), * where C is the defining {@link CGNode} and N is the {@link String} name. */ public Map<CGNode, OrdinalSet<Pair<CGNode, String>>> computeLexicalMod() { Map<CGNode, Collection<Pair<CGNode, String>>> scan = CallGraphTransitiveClosure.collectNodeResults(cg, this::scanNodeForLexWrites); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }
/** * Compute the lexical variables possibly read by each {@link CGNode} and its * transitive callees. A lexical variable is represented as a pair (C,N), * where C is the defining {@link CGNode} and N is the {@link String} name. */ public Map<CGNode, OrdinalSet<Pair<CGNode, String>>> computeLexicalRef() { Map<CGNode, Collection<Pair<CGNode, String>>> scan = CallGraphTransitiveClosure.collectNodeResults(cg, this::scanNodeForLexReads); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }
/** * 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 * */ public Map<CGNode, OrdinalSet<PointerKey>> computeMod(CallGraph cg, PointerAnalysis<T> pa, HeapExclusions heapExclude) { if (cg == null) { throw new IllegalArgumentException("cg is null"); } Map<CGNode, Collection<PointerKey>> scan = scanForMod(cg, pa, heapExclude); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }
/** * 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 * */ public Map<CGNode, OrdinalSet<PointerKey>> computeRef(CallGraph cg, PointerAnalysis<T> pa, HeapExclusions heapExclude) { if (cg == null) { throw new IllegalArgumentException("cg is null"); } Map<CGNode, Collection<PointerKey>> scan = scanForRef(cg, pa, heapExclude); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }
/** * 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 * */ public Map<CGNode, OrdinalSet<PointerKey>> computeRef(CallGraph cg, PointerAnalysis<T> pa, HeapExclusions heapExclude) { if (cg == null) { throw new IllegalArgumentException("cg is null"); } Map<CGNode, Collection<PointerKey>> scan = scanForRef(cg, pa, heapExclude); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }
/** * 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 * */ public Map<CGNode, OrdinalSet<PointerKey>> computeMod(CallGraph cg, PointerAnalysis<T> pa, HeapExclusions heapExclude) { if (cg == null) { throw new IllegalArgumentException("cg is null"); } Map<CGNode, Collection<PointerKey>> scan = scanForMod(cg, pa, heapExclude); return CallGraphTransitiveClosure.transitiveClosure(cg, scan); }