Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Type-based Escape Analysis with Existential Lifetimes

https://doi.org/10.15514/ISPRAS-2026-38(1)-6

Abstract

Escape analysis is a fundamental technique in programming languages used to ensure the safety of various compiler optimizations and language features. To achieve high precision and efficiency, particularly in interprocedural scenarios, escape analysis can be integrated into the type system. However, a significant drawback of this approach is that it often necessitates complex and verbose type annotations from the programmers.
In this paper, we introduce a novel type-based escape analysis that simplifies lifetime tracking for data types through the use of existential lifetimes. Additionally, our escape-analysis incorporates a minimum operation on lifetimes, which enables user-provided type annotations to more accurately capture a function’s data flow, thereby making them simpler and more intuitive to write. Finally, we present a prototype implementation of the corresponding type-checking algorithm.

About the Author

Andrey Sergeevich STOYAN
HSE University
Russian Federation

Postgraduate student. Research interests: type theory, design of programming languages.



References

1. Blanchet B. Escape analysis for object-oriented languages: application to Java. ACM SIGPLAN Notices, vol. 34, no. 10, 1999, pp. 20–34. DOI: 10.1145/320384.320387.

2. Akhin M., Belyaev M. Kotlin language specification. Kotlin Language Specification, 2021.

3. Matsakis N.D., Klock F.S. The Rust language. Proceedings of the 2014 ACM SIGAda annual conference on High integrity language technology, 2014, pp. 103–104. DOI: 10.1145/2663171.2663188.

4. Lorenzen A., White L., Dolan S., Eisenberg R.A., Lindley S. Oxidizing OCaml with modal memory management. Proceedings of the ACM on Programming Languages, vol. 8, issue ICFP, 2024, pp. 485–5104. DOI: 10.1145/3674642.

5. Brachthäuser J.I., Schuster P., Ostermann K. Effects as capabilities: effect handlers and lightweight effect polymorphism. Proceedings of the ACM on Programming Languages, vol. 4, issue OOPSLA, 2020, pp. 1–30. DOI: 10.1145/3428194.

6. Boruch-Gruszecki A., Odersky M., Lee E., Lhoták O., Brachthäuser J. Capturing types. ACM Transactions on Programming Languages and Systems, vol. 45, no. 4, 2023, pp. 1–52. DOI: 10.1145/3622839.

7. Stoyan A. Supplementary code for this work. Available at: https://github.com/penguin-boxx/existential-escape-analysis-paper, accessed 05.02.2026.

8. Xie N., Cong Y., Ikemori K., Leijen D. First-class names for effect handlers. Proceedings of the ACM on Programming Languages, vol. 6, issue OOPSLA2, 2022, pp. 30–59. DOI: 10.1145/3563309.

9. Osvald L., Essertel G., Wu X., Alayón L.I.G., Rompf T. Gentrification gone too far? Affordable 2nd-class values for fun and (co-) effect. ACM SIGPLAN Notices, vol. 51, no. 10, 2016, pp. 234–251. DOI: 10.1145/2983990.2984009.

10. Brachthäuser J.I., Schuster P., Lee E., Boruch-Gruszecki A. Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back. Proceedings of the ACM on Programming Languages, vol. 6, issue OOPSLA1, 2022, pp. 1–30. DOI: 10.1145/3527320.


Review

For citations:


STOYAN A.S. Type-based Escape Analysis with Existential Lifetimes. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2026;38(1):71-78. https://doi.org/10.15514/ISPRAS-2026-38(1)-6



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)