Go backward to Command Blocks
Go up to Top
Go forward to Semantics of Command Block

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


Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: qualification.tex,v 1.2 1996/05/02 11:53:49 schreine Exp schreine

Prev Up Next