Links und Funktionen
Sprachumschaltung

Navigationspfad
You are here: Home / Publikationen / A Type System for Bounded Space and Functional In-Place Update–Extended Abstract


Inhaltsbereich

Martin Hofmann (2000)

A Type System for Bounded Space and Functional In-Place Update–Extended Abstract

In: Programming Languages and Systems, 9th European Symposium on Programming, ESOP 2000, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS 2000, Berlin, Germany, March 25 - April 2, 2000, Proceedings, ed. by Gert Smolka, vol. 1782, pp. 165-179, Springer. Lecture Notes in Computer Science (ISBN: 3-540-67262-1).

We show how linear typing can be used to obtain functional programs which modify heap-allocated data structures in place. We present this both as a “design pattern” for writing C-code in a functional style and as a compilation process from linearly typed first-order functional programs into malloc()-free C code. The main technical result is the correctness of this compilation. The crucial innovation over previous linear typing schemes consists of the introduction of a resource type ◊ which controls the number of constructor symbols such as cons in recursive definitions and ensures linear space while restricting expressive power surprisingly little. While the space efficiency brought about by the new typing scheme and the compilation into C can also be realised by with state-of-the-art optimising compilers for functional languages such as Ocaml [15], the present method provides guaranteed bounds on heap space which will be of use for applications such as languages for embedded systems or ‘proof carrying codeʼ [18].

Document Actions


Funktionsleiste