









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to mutability and aliasing in programming languages, with a focus on ocaml. It explains how variables are treated in different languages, the concept of reference cells or references, and the implications of aliasing on program reasoning and compiler optimization. It also discusses the benefits and difficulties of aliasing.
Typology: Study notes
1 / 15
This page cannot be seen from the preview
Don't miss anything!










So a variable of typeWe choose OCaml’s style, which is easier to work with formally.
in most languages (except OCaml) will correspond
to a
(actually, a
) here.
A value of type
is a
pointer
to a cell holding a value of type
.
r =
5
pointed to is not copied. If this value is “copied” by assigning it to another variable, the cell
r =
5
s =
So we can change