Skip to main content
Log in

AutoAlias: Automatic Variable-Precision Alias Analysis for Object-Oriented Programs

  • Original Research
  • Published:
SN Computer Science Aims and scope Submit manuscript

Abstract

The aliasing question (can two reference expressions point, during an execution, to the same object?) is both one of the most critical in practice, for applications ranging from compiler optimization to programmer verification, and one of the most heavily researched, with many hundreds of publications over several decades. One might then expect that good off-the-shelf solutions are widely available, ready to be plugged into a compiler or verifier. This is not the case. In practice, efficient and precise alias analysis remains an open problem. We present a practical tool, AutoAlias, which can be used to perform automatic alias analysis for object-oriented programs. Based on the theory of “duality semantics”, an application of Abstract Interpretation ideas, it is directed at object-oriented languages and has been implemented for Eiffel as an addition to the EiffelStudio environment. It offers variable-precision analysis, controllable through the choice of a constant that governs the number of fixpoint iterations: a higher number means better precision and higher computation time. All the source code of AutoAlias, as well as detailed results of analyses reported in this article, are publicly available. Practical applications so far have covered a library of data structures and algorithms and a library for GUI creation. For the former, AutoAlias achieves a precision appropriate for practical purposes and execution times in the order of 25 s for about 8000 lines of intricate code. For the GUI library, AutoAlias produces the alias analysis in around 232 s for about 150,000 lines of intricate code.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18

Similar content being viewed by others

References

  1. Andersen LO. Program analysis and specialization for the C programming language. Technical report (1994).

  2. Chase DR, Wegman M, Zadeck FK. Analysis of pointers and structures. SIGPLAN Not. 1990;25(6):296–310.

    Article  Google Scholar 

  3. Choi J-D, Burke M, Carini P. Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In: Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on principles of programming languages, POPL ’93. New York: ACM; 1993. p. 232–45.

  4. Deutsch A. Interprocedural may-alias analysis for pointers: beyond k-limiting. SIGPLAN Not. 1994;29(6):230–41.

    Article  Google Scholar 

  5. Hardekopf B, Lin C. Flow-sensitive pointer analysis for millions of lines of code. In: Proceedings of the 9th annual IEEE/ACM international symposium on code generation and optimization, CGO ’11. IEEE Computer Society: Washington, DC; 2011. p. 289–98.

  6. Kogtenkov A, Meyer B, Velder S. Alias calculus, change calculus and frame inference. Sci Comput Program. 2015;97(P1):163–72.

    Article  Google Scholar 

  7. Landi W, Ryder BG. A safe approximate algorithm for interprocedural aliasing. In: Proceedings of the ACM SIGPLAN 1992 conference on programming language design and implementation, PLDI ’92. ACM: New York; 1992. p. 235–248.

  8. Larus JR, Hilfinger PN. Detecting conflicts between structure accesses. SIGPLAN Not. 1988;23(7):24–31.

    Article  Google Scholar 

  9. Meyer B. Eiffel: a language and environment for software engineering. J Syst Softw. 1988;8(3):199–246.

    Article  Google Scholar 

  10. Meyer B. Object-oriented software construction. 2nd ed. Upper Saddle River: Prentice-Hall; 1997.

    MATH  Google Scholar 

  11. Meyer B. Towards a theory and calculus of aliasing. J Object Technol. 2010;9(2):37–74 (column).

  12. Meyer B. Framing the frame problem. In: Pretschner A, Broy M, Irlbeck M, editors. Dependable software systems. New York: Springer; 2014. p. 174–85.

    Google Scholar 

  13. Meyer B. An automatic technique for static deadlock prevention. In: Voronkov A, Virbitskaite I, editors. Perspectives of system informatics. Berlin: Springer; 2015. p. 45–58.

    Chapter  Google Scholar 

  14. Meyer B, Kogtenkov A. Negative variables and the essence of object-oriented programming. Berlin: Springer; 2014. p. 171–87.

    Google Scholar 

  15. Milanova A, Rountev A, Ryder BG. Parameterized object sensitivity for points-to analysis for Java. ACM Trans Softw Eng Methodol. 2005;14(1):1–41.

    Article  Google Scholar 

  16. Rivera V. Autoalias and autoframe implementations; 2019. https://github.com/varivera/alias_graph_based/tree/master/autoframe commit:25d20fc529151d19760f12a3566681fd0c79b1ed.

  17. Rivera V. Autoalias and autoframe results. https://varivera.github.io/autoalias.html. Accessed Apr 2019.

  18. Rivera V, Bertrand M. Autoframe: automatic frame inference for object-oriented languages. Companion paper to this one, under submission (pre-print available at https://arxiv.org/pdf/1808.08751.pdf); 2019.

  19. Sharir M, Pnueli A. Two approaches to interprocedural data flow analysis, chapter 7. Englewood Cliffs: Prentice-Hall; 1981. p. 189–234.

    Google Scholar 

  20. Shivers OG. Control-flow analysis of higher-order languages of taming lambda. Ph.D. thesis, Pittsburgh. UMI Order No. GAX91-26964; 1991.

  21. Smaragdakis Y, Balatsouras G. Pointer analysis. Found Trends Program Lang. 2015;2(1):1–69.

    Article  Google Scholar 

  22. Smaragdakis Y, Bravenboer M, Lhoták O. Pick your contexts well: understanding object-sensitivity. SIGPLAN Not. 2011;46(1):17–30.

    Article  Google Scholar 

  23. Sridharan M, Chandra S, Dolby J, Fink SJ, Yahav E. Aliasing in object-oriented programming. Chapter alias analysis for object-oriented programs. Berlin: Springer; 2013. p. 196–232.

    Google Scholar 

Download references

Acknowledgements

We are indebted to colleagues who collaborated on the previous iterations of the alias calculus work, particular Sergey Velder (ITMO University) for many important suggestions regarding the theory, Alexander Kogtenkov (Eiffel Software, also then ETH Zurich) who implemented an earlier version of the Change Calculus, and Marco Trudel (then ETH Zurich). We thank members of the Software Engineering Laboratory at Innopolis University, particularly Manuel Mazzara and Alexander Naumchev, for many fruitful discussions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Victor Rivera.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Rivera, V., Meyer, B. AutoAlias: Automatic Variable-Precision Alias Analysis for Object-Oriented Programs. SN COMPUT. SCI. 1, 12 (2020). https://doi.org/10.1007/s42979-019-0012-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s42979-019-0012-1

Keywords

Navigation