previous up next
Go backward to Valuation Functions
Go up to Top
Go forward to Error Handling
RISC-Linz logo

Composition of States

C[[C1; C2]] = C[[C1]] check-cmd C[[C2]]

Command = State -> Post-state_|_
check-cmd: Command × Command -> Command
h1 check-cmd h2 =
    lambda a. let z = h1(a) in
    cases z of
        isOK(s, i, o) -> h2(s, i, o)
        isErr(s, i, o) -> z
    end

  1. Give current state a to C[[C1]] producing a post-state z = C[[C2]]a'.
  2. If z is a proper state a' and if the state component is OK, produce C[[C2]]a'
  3. If z is errnoneous, C[[C2]] is ignored and z is the result.

Similar for check of expression results.


Author: Wolfgang Schreiner
Last Modification: November 5, 1997

previous up next