Arrow Research search
Back to TCS

TCS 2001

A constraint-based region inference algorithm

Journal Article journal-article Computer Science · Theoretical Computer Science

Abstract

Region inference is a type-based technique for determining run time memory management at compile time. It is targeted at a runtime model in which the store consists of a stack of regions and memory management predominantly consists of pushing and popping regions. Region inference has previously been specified by a set of inference rules, which formalize when regions may be allocated and deallocated. We present a constraint-based algorithm which implements the specification. It consists of a constraint-based formulation of region inference and a rewriting algorithm for solving a set of constraints. We prove that the constraint-based formulation of region inference is sound with respect to the region inference rules. Moreover we prove “restricted completeness” of the constraint-based formulation, that is, we define an “implementation-oriented” formulation of region inference and show that every derivation in the implementation-oriented formulation can be obtained by a solution to a corresponding constraint problem. We show that rewriting of a constraint problem always terminates with a solution to the original system.

Authors

Keywords

  • Dynamic storage management
  • Regions
  • Standard ML

Context

Venue
Theoretical Computer Science
Archive span
1975-2026
Indexed papers
16261
Paper id
865417895426632765
v2026.09.13