Theory Values
section ‹Operator Semantics›
theory Values
imports
JavaLong
begin
text ‹
In order to properly implement the IR semantics we first introduce
a type that represents runtime values.
These runtime values represent the full range of primitive types
currently allowed by our semantics, ranging from basic integer types
to object references and arrays.
Note that Java supports 64, 32, 16, 8 signed ints, plus 1 bit (boolean)
ints, and char is 16-bit unsigned.
E.g. an 8-bit stamp has a default range of -128..+127.
And a 1-bit stamp has a default range of -1..0, surprisingly.
During calculations the smaller sizes are sign-extended to 32 bits, but explicit
widening nodes will do that, so most binary calculations should see equal input sizes.
An object reference is an option type where the @{term None} object reference
points to the static fields. This is examined more closely in our
definition of the heap.
›
type_synonym objref = "nat option"
type_synonym length = "nat"