Links und Funktionen
Sprachumschaltung

Navigationspfad
You are here: Home / Publikationen / Another Type System for In-Place Update


Inhaltsbereich

David Aspinall and Martin Hofmann (2002)

Another Type System for In-Place Update

In: Programming Languages and Systems, 11th European Symposium on Programming, ESOP 2002, held as Part of the Joint European Conference on Theory and Practice of Software, ETAPS 2002, Grenoble, France, April 8-12, 2002, Proceedings, ed. by Daniel Le Métayer, vol. 2305, pp. 36-52, Springer. Lecture Notes in Computer Science (ISBN: 3-540-43363-5).

Linear typing schemes guarantee single-threadedness and so the soundness of in-place update with respect to a functional semantics. But linear schemes are restrictive in practice, and more restrictive than necessary to guarantee soundness of in-place update. This has prompted research into static analysis and more sophisticated typing disciplines, to determine when in-place update may be safely used, or to combine linear and non-linear schemes. Here we contribute to this line of research by defining a new typing scheme which better approximates the semantic property of soundness of in-place update for a functional semantics. Our typing scheme includes two kinds of products ( ⊗and x), which allows data structures with or without sharing to be defined.We begin from the observation that some data is used only in a “read-only” context after which it may be safely re-used before being destroyed. Formalizing the inplace update interpretation and giving a machine model semantics allows us to refine this observation.We define three usage aspects apparent from the semantics, which are used to annotate function argument types. The aspects are (1) used destructively, (2) used read-only but shared with result, and (3) used read-only and not shared.

Document Actions


Funktionsleiste