I am self learning some parts of Essentials of Programming Languages.
First let me quote some definitions from Essentials of Programming Languages:
the expressed values are the possible values of expressions, and the denoted values are the values bound to variables.
and
We model memory as a finite map from locations to a set of values called the storable values. For historical reasons, we call this the store.
The storable values in a language are typically, but not always, the same as the expressed values of the language. This choice is part of the design of a language
Now come my questions. In the implicit reference design (e.g. the design adopted in Scheme, Java, C#, Python)
every variable denotes a reference. Denoted values are references to locations that contain expressed values. References are no longer expressed values. They exist only as the bindings of variables.
ExpVal = Int+Bool+Proc DenVal = Ref(ExpVal)
and
Ref(ExpVal)
means the set of references to locations that contain expressed values.
In the implicit reference design described in the third quote,
Are the set of expressed values and the set of storable values the same?
I guess yes, because that seems to be implied by the use of
Ref(ExpVal)
in the implicit design and by the fourth/last quote (Ref
is explicitly said to apply toExpVal
and not explicitly said to apply toStorableVal
), and also because that is the case typically in a language, according to the second quote.But I am not sure if the answer is yes, because that would lead to some contradiction to my possibly incorrect intuition that a denotable value is a storable value.
Are the references not storable values?
I guess no, because the references are not expressed values (according to the third quote) and the expressed values and the storable values are the same (if the answer to the previous question is yes).