src/HOL/HOLCF/IOA/Storage/Spec.thy
author wenzelm
Fri Dec 03 20:38:58 2010 +0100 (2010-12-03)
changeset 40945 b8703f63bfb2
parent 40774 0437dbc127b3
child 42151 4da4fc77664b
permissions -rw-r--r--
recoded latin1 as utf8;
use textcomp for some text symbols where it appears appropriate;
mueller@6008
     1
(*  Title:      HOL/IOA/example/Spec.thy
wenzelm@40945
     2
    Author:     Olaf Müller
mueller@6008
     3
*)
mueller@6008
     4
wenzelm@17244
     5
header {* The specification of a memory *}
mueller@6008
     6
wenzelm@17244
     7
theory Spec
wenzelm@17244
     8
imports IOA Action
wenzelm@17244
     9
begin
mueller@6008
    10
wenzelm@27361
    11
definition
wenzelm@27361
    12
  spec_sig :: "action signature" where
wenzelm@27361
    13
  "spec_sig = (UN l.{Free l} Un {New},
wenzelm@27361
    14
               UN l.{Loc l},
wenzelm@27361
    15
               {})"
mueller@6008
    16
wenzelm@27361
    17
definition
wenzelm@27361
    18
  spec_trans :: "(action, nat set * bool)transition set" where
wenzelm@27361
    19
  "spec_trans =
wenzelm@27361
    20
   {tr. let s = fst(tr); used = fst s; c = snd s;
wenzelm@27361
    21
            t = snd(snd(tr)); used' = fst t; c' = snd t
wenzelm@27361
    22
        in
wenzelm@27361
    23
        case fst(snd(tr))
wenzelm@27361
    24
        of
wenzelm@27361
    25
        New       => used' = used & c'  |
wenzelm@27361
    26
        Loc l     => c & l~:used  & used'= used Un {l} & ~c'   |
wenzelm@27361
    27
        Free l    => used'=used - {l} & c'=c}"
mueller@6008
    28
wenzelm@27361
    29
definition
wenzelm@27361
    30
  spec_ioa :: "(action, nat set * bool)ioa" where
wenzelm@27361
    31
  "spec_ioa = (spec_sig, {({},False)}, spec_trans,{},{})"
wenzelm@17244
    32
mueller@6008
    33
end