src/HOL/HOLCF/IOA/Storage/Spec.thy
changeset 40774 0437dbc127b3
parent 35174 e15040ae75d7
child 40945 b8703f63bfb2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/HOLCF/IOA/Storage/Spec.thy	Sat Nov 27 16:08:10 2010 -0800
     1.3 @@ -0,0 +1,33 @@
     1.4 +(*  Title:      HOL/IOA/example/Spec.thy
     1.5 +    Author:     Olaf Müller
     1.6 +*)
     1.7 +
     1.8 +header {* The specification of a memory *}
     1.9 +
    1.10 +theory Spec
    1.11 +imports IOA Action
    1.12 +begin
    1.13 +
    1.14 +definition
    1.15 +  spec_sig :: "action signature" where
    1.16 +  "spec_sig = (UN l.{Free l} Un {New},
    1.17 +               UN l.{Loc l},
    1.18 +               {})"
    1.19 +
    1.20 +definition
    1.21 +  spec_trans :: "(action, nat set * bool)transition set" where
    1.22 +  "spec_trans =
    1.23 +   {tr. let s = fst(tr); used = fst s; c = snd s;
    1.24 +            t = snd(snd(tr)); used' = fst t; c' = snd t
    1.25 +        in
    1.26 +        case fst(snd(tr))
    1.27 +        of
    1.28 +        New       => used' = used & c'  |
    1.29 +        Loc l     => c & l~:used  & used'= used Un {l} & ~c'   |
    1.30 +        Free l    => used'=used - {l} & c'=c}"
    1.31 +
    1.32 +definition
    1.33 +  spec_ioa :: "(action, nat set * bool)ioa" where
    1.34 +  "spec_ioa = (spec_sig, {({},False)}, spec_trans,{},{})"
    1.35 +
    1.36 +end