# Precise Interprocedural Analysis using Random Interpretation (Revised version)

### Sumit Gulwani and George C. Necula

###
EECS Department

University of California, Berkeley

Technical Report No. UCB/CSD-04-1353

August 2005

### http://www.eecs.berkeley.edu/Pubs/TechRpts/2004/CSD-04-1353.pdf

We describe a unified framework for random interpretation that generalizes previous randomized intra-procedural analyses, and also extends naturally to efficient inter-procedural analyses. There is no such natural extension known for deterministic algorithms. We present a general technique for extending any intra-procedural random interpreter to perform a context-sensitive inter-procedural analysis with only polynomial increase in running time. This technique involves computing random summaries of procedures, which are complete and probabilistically sound.

As an instantiation of this general technique, we obtain the first polynomial-time randomized algorithm that discovers all linear equalities inter-procedurally in a program that has been abstracted using linear assignments. We also obtain the first polynomial-time randomized algorithm for precise interprocedural value numbering over a program that uses unary uninterpreted functions.

We present experimental evidence that quantifies the precision and relative speed of the analysis for discovering linear equalities along two dimensions: intra-procedural vs. inter-procedural, and deterministic vs. randomized. We also present results that show the variation of the error probability in the randomized analysis with changes in algorithm parameters. These results suggest that the error probability is much lower than our conservative theoretical bounds.

BibTeX citation:

@techreport{Gulwani:CSD-04-1353, Author = {Gulwani, Sumit and Necula, George C.}, Title = {Precise Interprocedural Analysis using Random Interpretation (Revised version)}, Institution = {EECS Department, University of California, Berkeley}, Year = {2005}, Month = {Aug}, URL = {http://www.eecs.berkeley.edu/Pubs/TechRpts/2005/6199.html}, Number = {UCB/CSD-04-1353}, Abstract = {We describe a unified framework for random interpretation that generalizes previous randomized intra-procedural analyses, and also extends naturally to efficient inter-procedural analyses. There is no such natural extension known for deterministic algorithms. We present a general technique for extending any intra-procedural random interpreter to perform a context-sensitive inter-procedural analysis with only polynomial increase in running time. This technique involves computing random summaries of procedures, which are complete and probabilistically sound. <p> As an instantiation of this general technique, we obtain the first polynomial-time randomized algorithm that discovers all linear equalities inter-procedurally in a program that has been abstracted using linear assignments. We also obtain the first polynomial-time randomized algorithm for precise interprocedural value numbering over a program that uses unary uninterpreted functions. <p> We present experimental evidence that quantifies the precision and relative speed of the analysis for discovering linear equalities along two dimensions: intra-procedural vs. inter-procedural, and deterministic vs. randomized. We also present results that show the variation of the error probability in the randomized analysis with changes in algorithm parameters. These results suggest that the error probability is much lower than our conservative theoretical bounds.} }

EndNote citation:

%0 Report %A Gulwani, Sumit %A Necula, George C. %T Precise Interprocedural Analysis using Random Interpretation (Revised version) %I EECS Department, University of California, Berkeley %D 2005 %@ UCB/CSD-04-1353 %U http://www.eecs.berkeley.edu/Pubs/TechRpts/2005/6199.html %F Gulwani:CSD-04-1353