Algorithm Search⌘K

Pointer and alias analysis

Problems

  • Alias analysis

    Decide whether two memory references in a program may, or must, refer to the same location.

    core
  • Call graph construction

    Find a sound superset of the targets of each call site of a program with virtual or indirect calls, from type or pointer facts.

    core
  • Points-to analysis

    For each pointer variable, find a set of abstract memory locations, such as allocation sites, that it may point to.

    core
  • Mod-ref analysis

    For each call or procedure, find the memory locations it may modify and the ones it may read.

    advanced

Algorithms

  • 0-CFA

    Find the functions that each expression of a higher-order program may evaluate to, with one abstract binding per variable, in cubic time.

    O(n^3) worst1 languagescore
  • Andersen's analysis

    Flow-insensitive points-to analysis that turns each assignment into a subset constraint and solves the constraint graph in cubic time.

    O(n^3 + m) worst1 languagescore
  • Class hierarchy analysis

    Build a call graph from declared types. A virtual call y.m() may reach the method m of every class at or below the declared class of y.

    O(n + S K + K M) worst1 languagescore
  • Rapid type analysis

    Build a call graph like class hierarchy analysis, but let a virtual call reach only the classes that some reachable method creates with new.

    O(n + S K + K M) worst1 languagescore
  • Steensgaard's analysis

    Flow-insensitive points-to analysis that unifies the targets of both sides of each assignment, with union-find, in almost linear time.

    O((n + m) α(n + m)) worst1 languagescore
  • Escape analysis

    Finds objects that do not outlive their method or thread, so they can be put on the stack and their locks removed.

    O(n^2 h + s h) worst1 languagesadvanced
  • Offline variable substitution

    Finds variables with surely equal points-to sets before solving and merges them, which shrinks the constraint graph.

    O(n^3 + m) worst1 languagesadvanced
  • One-level flow analysis

    Points-to analysis with subset constraints at the top pointer level and unification below. Das measured it nearly as precise as Andersen and nearly as fast as Steensgaard.

    O(n (n + m)) worst1 languagesadvanced
  • Online cycle elimination

    Detects cycles in an inclusion constraint graph while solving and merges their nodes, since all nodes on a cycle have equal sets.

    O(n^4 + n^2 m) worst1 languagesadvanced
  • Type-based alias analysis

    Decides that two references cannot alias when their declared types are incompatible under the rules of a type-safe language.

    O(t^2 h + m log t) worst1 languagesadvanced
  • Variable type analysis

    Prune a sound call graph by pushing the classes of new along the assignments of a type propagation graph and keeping the targets that reach each receiver.

    O((n + P) K) worst1 languagesadvanced
  • k-CFA

    Control flow analysis of higher-order programs that keeps a separate binding of each variable for each string of the last k call sites.

    2^O((k+1) n log n) worst1 languagesadvanced
  • Demand-driven points-to analysis

    Answers points-to queries for chosen variables only, by searching backward in the constraint graph, often as CFL reachability.

    O(m^3 + m s) worst1 languagesresearch
  • Lazy and hybrid cycle detection

    Looks for constraint cycles only when an edge brings no new points-to facts, plus an offline pass, making Andersen's analysis scale.

    O(n^4 + n^2 m) worst1 languagesresearch
  • Sparse flow-sensitive pointer analysis

    Makes flow-sensitive points-to analysis scale by propagating facts only along def-use chains found by a cheaper pre-analysis.

    O(n^3 m^4) worst1 languagesresearch

Techniques

  • Object sensitivity

    Context-sensitive pointer analysis for object-oriented code that tells calls apart by the allocation sites of their receiver objects.

    advanced
  • BDD-based points-to analysis

    Stores points-to relations and contexts as binary decision diagrams, which makes cloning-based context-sensitive analysis feasible.

    research

Concepts

  • Field sensitivity

    Whether a pointer analysis keeps the fields of a structure or object apart as separate locations or merges them into one.

    advanced

Theorems