A syntactic model of mutation and aliasing

Paola Giannini, Marco Servetto, Elena Zucca

Risultato della ricerca: Contributo su rivistaArticolo da conferenzapeer review

Abstract

Traditionally, semantic models of imperative languages use an auxiliary structure which mimics memory. In this way, ownership and other encapsulation properties need to be reconstructed from the graph structure of such global memory. We present an alternative syntactic model where memory is encoded as part of the program rather than as a separate resource. This means that execution can be modelled by just rewriting source code terms, as in semantic models for functional programs. Formally, this is achieved by the block construct, introducing local variable declarations, which play the role of memory when their initializing expressions have been evaluated. In this way, we obtain a language semantics which directly represents at the syntactic level constraints on aliasing, allowing simpler reasoning about related properties. To illustrate this advantage, we consider the issue, widely studied in the literature, of characterizing an isolated portion of memory, which cannot be reached through external references. In the syntactic model, closed block values, called capsules, provide a simple representation of isolated portions of memory, and capsules can be safely moved to another location in the memory, without introducing sharing, by means of affine variables. We prove that the syntactic model can be encoded in the conventional one, hence efficiently implemented.

Lingua originaleInglese
pagine (da-a)39-55
Numero di pagine17
RivistaElectronic Proceedings in Theoretical Computer Science, EPTCS
Volume293
DOI
Stato di pubblicazionePubblicato - 2019
Evento12th Workshop on Developments in Computational Models, DCM 2018 and 9th Workshop on Intersection Types and Related Systems, ITRS 2018 - Oxford, United Kingdom
Durata: 8 lug 20188 lug 2018

Fingerprint

Entra nei temi di ricerca di 'A syntactic model of mutation and aliasing'. Insieme formano una fingerprint unica.

Cita questo