A Syntactic Model of Mutation and Aliasing

04/23/2019
by   Paola Giannini, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/30/2018

Flexible recovery of uniqueness and immutability (Extended Version)

We present an imperative object calculus where types are annotated with ...
research
03/15/2018

Tracing sharing in an imperative pure calculus

We introduce a type and effect system, for an imperative object calculus...
research
03/15/2018

Tracing sharing in an imperative pure calculus (Extended Version)

We introduce a type and effect system, for an imperative object calculus...
research
04/06/2018

A Categorical Approach to Syntactic Monoids

The syntactic monoid of a language is generalized to the level of a symm...
research
06/15/2023

Recursive First-order Syntactic Unification Modulo Variable Classes

We present a generalization of first-order syntactic unification to a te...
research
06/14/2022

Aeneas: Rust Verification by Functional Translation

We present Aeneas, a new verification toolchain for Rust programs based ...
research
02/06/2019

Modeling Terms by Graphs with Structure Constraints (Two Illustrations)

In the talk at the workshop my aim was to demonstrate the usefulness of ...

Please sign up or login with your details

Forgot password? Click here to reset