The Complexity of Andersen's Analysis in Practice

While the tightest proven worst-case complexity for Andersen's points-to analysis is nearly cubic, the analysis seems to scale better in practice when applied to 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.

By: Manu Sridharan; Stephen J. Fink

Published in: RC24751 in 2009


This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.


Questions about this service can be mailed to .