Skip to main content
Kent Academic Repository

Spegion: Implicit and non-lexical regions with sized allocations

Hughes, Jack Dylan, Vollmer, Michael, Batty, Mark (2025) Spegion: Implicit and non-lexical regions with sized allocations. In: 39th European Conference on Object-Oriented Programming (ECOOP 2025). Leibniz International Proceedings in Informatics (LIPIcs) , 333. Schloss Dagstuhl – Leibniz-Zentrum für Informatik ISBN 978-3-95977-373-7. (doi:10.4230/LIPIcs.ECOOP.2025.15) (KAR id:110458)

Abstract

Region based memory management is a powerful tool designed with the goal of ensuring memory safety statically. The region calculus of Tofte and Talpin is a well known example of a region based system, which uses regions to manage memory in a stack-like fashion. However, the region calculus is lexically scoped and requires explicit annotation of memory regions, which can be cumbersome for the programmer. Other systems have addressed non-lexical regions, but these approaches typically require the use of a substructural type system to track the lifetimes of regions. We present Spegion, a language with implicit non-lexical regions, which provides these same memory safety guarantees for programs that go beyond using memory allocation in a stack-like manner. We are able to achieve this with a concise syntax, and without the use of substructural types, relying instead on an effect system to enforce constraints on region allocation and deallocation. These regions may be divided into sub-regions, i.e., Splittable rEgions, allowing fine grained control over memory allocation. Furthermore, Spegion permits sized allocations, where each value has an associated size which is used to ensure that regions are not over-allocated into. We present a type system for Spegion and prove it is type safe with respect to a small-step operational semantics.

Item Type: Conference or workshop item (Proceeding)
DOI/Identification number: 10.4230/LIPIcs.ECOOP.2025.15
Uncontrolled keywords: regions; type systems; effect systems; programming languages; memory
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Institutional Unit: Schools > School of Computing
Former Institutional Unit:
There are no former institutional units.
Funders: Engineering and Physical Sciences Research Council (https://ror.org/0439y7842)
Depositing User: Michael Vollmer
Date Deposited: 30 Jun 2025 13:49 UTC
Last Modified: 22 Jul 2025 09:23 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/110458 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views of this page since July 2020. For more details click on the image.