Alias analysis for optimization of dynamic languages

Michael Gorbovitski, Yanhong A. Liu, Scott D. Stoller, Tom Rothamel, Tuncay K. Tekle
2010 Proceedings of the 6th symposium on Dynamic languages - DLS '10  
Dynamic languages such as Python allow programs to be written more easily using high-level constructs such as comprehensions for queries and using generic code. Efficient execution of programs then requires powerful optimizationsincrementalization of expensive queries and specialization of generic code. Effective incrementalization and specialization of dynamic languages require precise and scalable alias analysis. This paper describes the development and experimental evaluation of a may-alias
more » ... nalysis for a full dynamic objectoriented language, for program optimization by incrementalization and specialization. The analysis is flow-sensitive; we show that this is necessary for effective optimization of dynamic languages. It uses precise type analysis and a powerful form of context sensitivity, called trace sensitivity, to further improve analysis precision. It uses a compressed representation to significantly reduce the memory used by flowsensitive analyses. We evaluate the effectiveness of this analysis and 17 variants of it for incrementalization and specialization of Python programs, and we evaluate the precision, memory usage, and running time of these analyses on programs of diverse sizes. The results show that our analysis has acceptable precision and efficiency and represents the best trade-off between them compared to the variants.
doi:10.1145/1869631.1869635 dblp:conf/dls/GorbovitskiLSRT10 fatcat:wn2qlurqgbbrvmtpvfht4qmoyq