Go backward to Command Blocks Go up to Top Go forward to Semantics of Command Block |
Store = {<n1, n2, ..., nm> |
ni
in Int, 1 <= i <= m, m >= 0}
lookup: Location x Store x Int
lookup(loci, <n1, ..., ni, ...,
nm>) = ni
update: Location x Int x Store
-> Store
update(loci, n, <n1, ..., ni, ...,
nm>)
= <n1, ..., n, ..., nm>
allocate: Store -> Location
x Store
allocate <n1, n2, ..., nm>
=
(locm+1, <n1, n2, ..., nm, init>
where init is some unknown integer
size-of: Store -> Int
size-of <n1, n2, ..., nm> = m
free: Int -> Store -> Store
free i <n1, n2, ..., ni, ...,
nm> =
<n1, n2, ..., ni>
if 0 <= i <= m