previous up next
Go backward to Command Blocks
Go up to Top
Go forward to Semantics of Command Block
RISC-Linz logo

Store Algebra

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


Author: Wolfgang Schreiner
Last Modification: May 14, 1998

previous up next