skip to main content
research-article

Design and Implementation of an Escape Analysis in the Context of Safety-Critical Embedded Systems

Published:06 February 2020Publication History
Skip Abstract Section

Abstract

The use of a managed, type-safe language such as Standard ML, Ada Ravenscar, or Java in hard real-time and embedded systems offers productivity, safety, and dependability benefits at a reasonable cost. Static software systems, that is systems in which all relevant resource entities such as threads and their priorities, for instance, and the entire source code are known ahead of time, are particularly interesting for the deployment in safety-critical embedded systems: Code verification is rather maintainable in contrast to dynamic systems. Additionally, static analyses can incorporate information from all software and system layers to assist compilers in emitting code that is well suited to an application on a particular hardware device. It was shown in the past that a program composed in type-safe Java in combination with a static system setup can be as efficient as one that is written in C [30], which is still the most widely used language in the embedded domain. Escape analysis (EA) is one of several static-analysis techniques. It supports, for instance, runtime efficiency by enabling automated stack allocation of objects. In addition, Stilkerich et al. [27, 28] have argued that EA enables further applications in safety-critical embedded systems such as the computation of memory classes stated in the Real-Time Specification for Java (RTSJ) [6]. EA can be applied to any programming language but the quality of its results greatly benefits from the properties of a type-safe language. Notably, embedded multicore devices can positively be affected by the use of EA. Thus, we explore an ahead-of-time (AOT) escape analysis in the context of the KESO JVM featuring a Java AOT compiler targeting (deeply) embedded (hard) real-time systems.

References

  1. Mark Aiken, Manuel Fähndrich, Chris Hawblitzel, Galen Hunt, and James Larus. 2006. Deconstructing process isolation. In Proceedings of the 2006 Symposium on Memory System Performance and Correctness (MSPC’06). 1--10. DOI:https://doi.org/10.1145/1178597.1178599Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. AUTOSAR. 2010. Specification of Operating System (Version 4.1.0). Technical Report. Automotive Open System Architecture GbR.Google ScholarGoogle Scholar
  3. Bruno Blanchet. 1998. Escape analysis: Correctness proof, implementation and experimental results. In Proceedings of the 25th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL’98). 25--37. DOI:https://doi.org/10.1145/268946.268949Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bruno Blanchet. 1999. Escape analysis for object-oriented languages: Application to Java. ACM SIGPLAN Notices 34, 10 (1999), 20--34.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bruno Blanchet. 2003. Escape analysis for Java: Theory and practice. ACM Trans. Program. Lang. Syst. 25, 6 (Nov. 2003), 713--775. DOI:https://doi.org/10.1145/945885.945886Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Greg Bollella, Benjamin Brosgol, James Gosling, Peter Dibble, Steve Furr, and Mark Turnbull. 2000. The Real-Time Specification for Java (1st ed.).Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Steve Carr, Kathryn S. McKinley, and Chau-Wen Tseng. 1994. Compiler optimizations for improving data locality. In Proceedings of the 6th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS VI). ACM, New York, 252--262. DOI:https://doi.org/10.1145/195473.195557Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Ramkrishna Chatterjee, Barbara G. Ryder, and William A. Landi. 1999. Relevant context inference. In Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’99). ACM, New York, 133--146. DOI:https://doi.org/10.1145/292540.292554Google ScholarGoogle Scholar
  9. Jong-Deok Choi, Michael Burke, and Paul Carini. 1993. 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). ACM, New York, 232--245. DOI:https://doi.org/10.1145/158511.158639Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. 1999. Escape analysis for Java. In Proceedings of the 14th ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA’99). ACM, New York, 1--19. DOI:https://doi.org/10.1145/320384.320386Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jong-Deok Choi, Manish Gupta, Mauricio J. Serrano, Vugranam C. Sreedhar, and Samuel P. Midkiff. 2003. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Trans. Program. Lang. Syst. 25, 6 (Nov. 2003), 876--910. DOI:https://doi.org/10.1145/945885.945892Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Patrick Cousot and Radhia Cousot. 1977. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL’77). ACM, New York, 238--252. DOI:https://doi.org/10.1145/512950.512973Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Tamar Domani, Gal Goldshtein, Elliot K. Kolodner, Ethan Lewis, Erez Petrank, and Dafna Sheinwald. 2002. Thread-local heaps for Java. In Proceedings of the 3rd International Symposium on Memory Management (ISMM’02). ACM, New York, 76--87. DOI:https://doi.org/10.1145/512429.512439Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Maryam Emami, Rakesh Ghiya, and Laurie J. Hendren. 1994. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation (PLDI’94). ACM, New York, 242--256. DOI:https://doi.org/10.1145/178243.178264Google ScholarGoogle Scholar
  15. David Gay and Bjarne Steensgaard. 1998. Stack Allocating Objects in Java (Extended Abstract). Technical Report. University of California, Berkeley.Google ScholarGoogle Scholar
  16. Rakesh Ghiya and Laurie J. Hendren. 1996. Connection analysis: A practical interprocedural heap analysis for C. Int. J. Parallel Program. 24, 6 (Dec. 1996), 547--578.Google ScholarGoogle ScholarCross RefCross Ref
  17. Benjamin Goldberg and Young Gil Park. 1990. Higher order escape analysis: Optimizing stack allocation in functional program implementations. In Proceedings of the 3rd European Symposium on Programming (ESOP’90), Neil D. Jones (ed.), Vol. 432. 152--160.Google ScholarGoogle ScholarCross RefCross Ref
  18. Jim Trevor, J. Greg Morrisett, Dan Grossman, Michael W. Hicks, James Cheney, and Yanling Wang. 2002. Cyclone: A safe dialect of C. In Proceedings of the General Track of the annual conference on USENIX Annual Technical Conference (ATEC’02). 275--288.Google ScholarGoogle Scholar
  19. Tomas Kalibera, Jeff Hagelberg, Filip Pizlo, Ales Plsek, Ben Titzer, and Jan Vitek. 2009. CDx: A family of real-time Java benchmarks. In Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES’09). 41--50. DOI:https://doi.org/10.1145/1620405.1620412Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. William Landi and Barbara G. Ryder. 1992. 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, 235--248. DOI:https://doi.org/10.1145/143095.143137Google ScholarGoogle Scholar
  21. Clemens Lang. 2012. Improved Stack Allocation using Escape Analysis in the KESO Multi-JVM (Bachelor Thesis). Friedrich-Alexander University Erlangen-Nuremberg, Germany.Google ScholarGoogle Scholar
  22. Clemens Lang. 2014. Compiler-assisted memory management using escape analysis in the KESO JVM (Master Thesis). Friedrich-Alexander University Erlangen-Nuremberg, Germany.Google ScholarGoogle Scholar
  23. Kyungwoo Lee, Xing Fang, and Samuel P. Midkiff. 2007. Practical escape analyses: How good are they?. In Proceedings of the 3rd International Conference on Virtual Execution Environments (VEE’07). ACM, New York, 180--190. DOI:https://doi.org/10.1145/1254810.1254836Google ScholarGoogle Scholar
  24. Young Gil Park and Benjamin Goldberg. 1992. Escape analysis on lists. In Proceedings of the General Track of the annual conference on USENIX Annual Technical Conference (PLDI’92). 116--127.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Lukas Stadler, Thomas Würthinger, and Hanspeter Mössenböck. 2014. Partial escape analysis and scalar replacement for Java. In Proceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO’14). ACM, New York, Article 165, 10 pages. DOI:https://doi.org/10.1145/2544137.2544157Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Bjarne Steensgaard. 1996. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’96). ACM, New York, 32--41. DOI:https://doi.org/10.1145/237721.237727Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Isabella Stilkerich, Clemens Lang, Christoph Erhardt, Christian Bay, and Michael Stilkerich. 2017. The perfect getaway: Using escape analysis in embedded real-time systems. ACM Transactions on Embedded Computing Systems16, Article 99 (2017), 99:1--99:30. Issue 4. DOI:https://doi.org/10.1145/3035542Google ScholarGoogle Scholar
  28. Isabella Stilkerich, Clemens Lang, Christoph Erhardt, and Michael Stilkerich. 2015. A practical getaway: Applications of escape analysis in embedded real-time systems. In Proceedings of the 16th ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems 2015 CD-ROM (LCTES’15). ACM, New York, Article 4, 11 pages. DOI:https://doi.org/10.1145/2670529.2754961Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Isabella Stilkerich, Michael Strotz, Christoph Erhardt, and Michael Stilkerich. 2014. RT-LAGC: Fragmentation-tolerant real-time memory management revisited. In Proceedings of the 12th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES’14). 87--96. DOI:https://doi.org/10.1145/2661020.2661031Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Michael Stilkerich, Isabella Thomm, Christian Wawersich, and Wolfgang Schröder-Preikschat. 2012. Tailor-made JVMs for statically configured embedded systems. Concurrency and Computation: Practice and Experience 24, 8 (2012), 789--812. DOI:https://doi.org/10.1002/cpe.1755Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Robert Tarjan. 1972. Depth first search and linear graph algorithms. SIAM J. Comput. (1972), 146--160.Google ScholarGoogle Scholar
  32. Robert P. Wilson and Monica S. Lam. 1995. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the ACM SIGPLAN 1995 Conference on Programming Language Design and Implementation (PLDI’95). ACM, New York, 1--12. DOI:https://doi.org/10.1145/207110.207111Google ScholarGoogle Scholar

Index Terms

  1. Design and Implementation of an Escape Analysis in the Context of Safety-Critical Embedded Systems

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Article Metrics

            • Downloads (Last 12 months)15
            • Downloads (Last 6 weeks)0

            Other Metrics

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader

          HTML Format

          View this article in HTML Format .

          View HTML Format
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!