src/HOL/HOLCF/IOA/Storage/Spec.thy
author huffman
Sat Nov 27 16:08:10 2010 -0800 (2010-11-27)
changeset 40774 0437dbc127b3
parent 35174 src/HOLCF/IOA/Storage/Spec.thy@e15040ae75d7
child 40945 b8703f63bfb2
permissions -rw-r--r--
moved directory src/HOLCF to src/HOL/HOLCF;
added HOLCF theories to src/HOL/IsaMakefile;
     1 (*  Title:      HOL/IOA/example/Spec.thy
     2     Author:     Olaf Müller
     3 *)
     4 
     5 header {* The specification of a memory *}
     6 
     7 theory Spec
     8 imports IOA Action
     9 begin
    10 
    11 definition
    12   spec_sig :: "action signature" where
    13   "spec_sig = (UN l.{Free l} Un {New},
    14                UN l.{Loc l},
    15                {})"
    16 
    17 definition
    18   spec_trans :: "(action, nat set * bool)transition set" where
    19   "spec_trans =
    20    {tr. let s = fst(tr); used = fst s; c = snd s;
    21             t = snd(snd(tr)); used' = fst t; c' = snd t
    22         in
    23         case fst(snd(tr))
    24         of
    25         New       => used' = used & c'  |
    26         Loc l     => c & l~:used  & used'= used Un {l} & ~c'   |
    27         Free l    => used'=used - {l} & c'=c}"
    28 
    29 definition
    30   spec_ioa :: "(action, nat set * bool)ioa" where
    31   "spec_ioa = (spec_sig, {({},False)}, spec_trans,{},{})"
    32 
    33 end