Do Mutable Variables Have Reference Types?

11/08/2022
by   Oleg Kiselyov, et al.
0

Implicit heterogeneous metaprogramming (a.k.a. offshoring) is an attractive approach for generating C with some correctness guarantees: generate OCaml code, where the correctness guarantees are easier to establish, and then map that code to C. The key idea is that simple imperative OCaml code looks like a non-standard notation for C. Regretfully, it is false, when it comes to mutable variables. In the past, the approach was salvaged by imposing strong ad hoc restrictions. The present paper for the first time investigates the problem systematically and discovers general solutions needing no restrictions. In the process we explicate the subtleties of modeling mutable variables by values of reference types and arrive at an intuitively and formally clear correspondence. We also explain C assignment without resorting to L-values.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/14/2020

A Survey of Energy Efficient Schemes in Ad-hoc Networks

Ad hoc network is a collection of different types of nodes, which are co...
research
07/28/2016

Modeling selectional restrictions in a relational type system

Selectional restrictions are semantic constraints on forming certain com...
research
10/23/2017

Strategy Preserving Compilation for Parallel Functional Code

Graphics Processing Units (GPUs) and other parallel devices are widely a...
research
07/20/2017

RKL: a general, invariant Bayes solution for Neyman-Scott

Neyman-Scott is a classic example of an estimation problem with a partia...
research
07/10/2020

Reverse AD at Higher Types: Pure, Principled and Denotationally Correct

We show how to define source-code transformations for forward- and rever...
research
09/29/2022

Evolving Reference Architecture Description: Guidelines based on ISO/IEC/IEEE 42010

The architectural design of software systems is not a trivial task, requ...

Please sign up or login with your details

Forgot password? Click here to reset