Garbage-Collection Safety for Region-Based Type-Polymorphic Programs

Publikation: Bidrag til tidsskriftTidsskriftartikelForskningfagfællebedømt

Standard

Garbage-Collection Safety for Region-Based Type-Polymorphic Programs. / Elsman, Martin.

I: Proceedings of the ACM on Programming Languages, Bind 7, Nr. PLDI, 115, 2023.

Publikation: Bidrag til tidsskriftTidsskriftartikelForskningfagfællebedømt

Harvard

Elsman, M 2023, 'Garbage-Collection Safety for Region-Based Type-Polymorphic Programs', Proceedings of the ACM on Programming Languages, bind 7, nr. PLDI, 115. https://doi.org/10.1145/3591229

APA

Elsman, M. (2023). Garbage-Collection Safety for Region-Based Type-Polymorphic Programs. Proceedings of the ACM on Programming Languages, 7(PLDI), [115]. https://doi.org/10.1145/3591229

Vancouver

Elsman M. Garbage-Collection Safety for Region-Based Type-Polymorphic Programs. Proceedings of the ACM on Programming Languages. 2023;7(PLDI). 115. https://doi.org/10.1145/3591229

Author

Elsman, Martin. / Garbage-Collection Safety for Region-Based Type-Polymorphic Programs. I: Proceedings of the ACM on Programming Languages. 2023 ; Bind 7, Nr. PLDI.

Bibtex

@article{e33bdc698f774365bc64e6fd17df477c,
title = "Garbage-Collection Safety for Region-Based Type-Polymorphic Programs",
abstract = "Region inference offers a mechanism to reduce (and sometimes entirely remove) the need for reference-Tracing garbage collection by inferring where to insert allocation and deallocation instructions in a program at compile time. When the mechanism is combined with techniques for reference-Tracing garbage collection, which is helpful in general to support programs with very dynamic memory behaviours, it turns out that region-inference is complementary to adding generations to a reference-Tracing collector. However, region-inference and the associated region-representation analyses that make such a memory management strategy perform well in practice are complex, both from a theoretical point-of-view and from an implementation point-of-view. In this paper, we demonstrate a soundness problem with existing theoretical developments, which have to do with ensuring that, even for higher-order polymorphic programs, no dangling-pointers appear during a reference-Tracing collection. This problem has materialised as a practical soundness problem in a real implementation based on region inference. As a solution, we present a modified, yet simple, region type-system that captures garbage-collection effects, even for polymorphic higher-order code, and outline how region inference and region-representation analyses are adapted to the new type system. The new type system allows for associating simpler region type-schemes with functions, compared to original work, makes it possible to combine region-based memory management with partly tag-free reference-Tracing (and generational) garbage-collection, and repairs previously derived work that is based on the erroneous published results. ",
keywords = "garbage-collection, region-inference, Standard ML",
author = "Martin Elsman",
note = "Publisher Copyright: {\textcopyright} 2023 Owner/Author.",
year = "2023",
doi = "10.1145/3591229",
language = "English",
volume = "7",
journal = "Proceedings of the ACM on Programming Languages",
issn = "2475-1421",
publisher = "ACM",
number = "PLDI",

}

RIS

TY - JOUR

T1 - Garbage-Collection Safety for Region-Based Type-Polymorphic Programs

AU - Elsman, Martin

N1 - Publisher Copyright: © 2023 Owner/Author.

PY - 2023

Y1 - 2023

N2 - Region inference offers a mechanism to reduce (and sometimes entirely remove) the need for reference-Tracing garbage collection by inferring where to insert allocation and deallocation instructions in a program at compile time. When the mechanism is combined with techniques for reference-Tracing garbage collection, which is helpful in general to support programs with very dynamic memory behaviours, it turns out that region-inference is complementary to adding generations to a reference-Tracing collector. However, region-inference and the associated region-representation analyses that make such a memory management strategy perform well in practice are complex, both from a theoretical point-of-view and from an implementation point-of-view. In this paper, we demonstrate a soundness problem with existing theoretical developments, which have to do with ensuring that, even for higher-order polymorphic programs, no dangling-pointers appear during a reference-Tracing collection. This problem has materialised as a practical soundness problem in a real implementation based on region inference. As a solution, we present a modified, yet simple, region type-system that captures garbage-collection effects, even for polymorphic higher-order code, and outline how region inference and region-representation analyses are adapted to the new type system. The new type system allows for associating simpler region type-schemes with functions, compared to original work, makes it possible to combine region-based memory management with partly tag-free reference-Tracing (and generational) garbage-collection, and repairs previously derived work that is based on the erroneous published results.

AB - Region inference offers a mechanism to reduce (and sometimes entirely remove) the need for reference-Tracing garbage collection by inferring where to insert allocation and deallocation instructions in a program at compile time. When the mechanism is combined with techniques for reference-Tracing garbage collection, which is helpful in general to support programs with very dynamic memory behaviours, it turns out that region-inference is complementary to adding generations to a reference-Tracing collector. However, region-inference and the associated region-representation analyses that make such a memory management strategy perform well in practice are complex, both from a theoretical point-of-view and from an implementation point-of-view. In this paper, we demonstrate a soundness problem with existing theoretical developments, which have to do with ensuring that, even for higher-order polymorphic programs, no dangling-pointers appear during a reference-Tracing collection. This problem has materialised as a practical soundness problem in a real implementation based on region inference. As a solution, we present a modified, yet simple, region type-system that captures garbage-collection effects, even for polymorphic higher-order code, and outline how region inference and region-representation analyses are adapted to the new type system. The new type system allows for associating simpler region type-schemes with functions, compared to original work, makes it possible to combine region-based memory management with partly tag-free reference-Tracing (and generational) garbage-collection, and repairs previously derived work that is based on the erroneous published results.

KW - garbage-collection

KW - region-inference

KW - Standard ML

U2 - 10.1145/3591229

DO - 10.1145/3591229

M3 - Journal article

AN - SCOPUS:85162005921

VL - 7

JO - Proceedings of the ACM on Programming Languages

JF - Proceedings of the ACM on Programming Languages

SN - 2475-1421

IS - PLDI

M1 - 115

ER -

ID: 358550468