src/HOL/TLA/Memory/MemClerkParameters.thy
author paulson
Wed, 04 Jul 2007 13:56:26 +0200
changeset 23563 42f2f90b51a6
parent 21624 6f79647cf536
child 36866 426d5781bb25
permissions -rw-r--r--
simplified a proof

(*
    File:        MemClerkParameters.thy
    ID:          $Id$
    Author:      Stephan Merz
    Copyright:   1997 University of Munich
*)

header {* RPC-Memory example: Parameters of the memory clerk *}

theory MemClerkParameters
imports RPCParameters
begin

datatype mClkState = clkA | clkB

types
  (* types sent on the clerk's send and receive channels are argument types
     of the memory and the RPC, respectively *)
  mClkSndArgType   = "memOp"
  mClkRcvArgType   = "rpcOp"

constdefs
  (* translate a memory call to an RPC call *)
  MClkRelayArg     :: "memOp => rpcOp"
    "MClkRelayArg marg == memcall marg"
  (* translate RPC failures to memory failures *)
  MClkReplyVal     :: "Vals => Vals"
    "MClkReplyVal v == if v = RPCFailure then MemFailure else v"

end