The Complexity of Andersen’s Analysis in Practice

  • Manu Sridharan
  • Stephen J. Fink
Conference paper

DOI: 10.1007/978-3-642-03237-0_15

Part of the Lecture Notes in Computer Science book series (LNCS, volume 5673)
Cite this paper as:
Sridharan M., Fink S.J. (2009) The Complexity of Andersen’s Analysis in Practice. In: Palsberg J., Su Z. (eds) Static Analysis. SAS 2009. Lecture Notes in Computer Science, vol 5673. Springer, Berlin, Heidelberg

Abstract

While the tightest proven worst-case complexity for Andersen’s points-to analysis is nearly cubic, the analysis seems to scale better on real-world codes. We examine algorithmic factors that help account for this gap. In particular, we show that a simple algorithm can compute Andersen’s analysis in worst-case quadratic time as long as the input program is k-sparse, i.e. it has at most k statements dereferencing each variable and a sparse flow graph. We then argue that for strongly-typed languages like Java, typical structure makes programs likely to be k-sparse, and we give empirical measurements across a suite of Java programs that confirm this hypothesis. We also discuss how various standard implementation techniques yield further constant-factor speedups.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Manu Sridharan
    • 1
  • Stephen J. Fink
    • 1
  1. 1.IBM T.J. Watson Research CenterUSA

Personalised recommendations