src/HOL/HOLCF/IOA/Storage/Spec.thy
author wenzelm
Sun Nov 02 17:16:01 2014 +0100 (2014-11-02)
changeset 58880 0baae4311a9f
parent 42151 4da4fc77664b
child 61032 b57df8eecad6
permissions -rw-r--r--
modernized header;
wenzelm@42151
     1
(*  Title:      HOL/HOLCF/IOA/Storage/Spec.thy
wenzelm@40945
     2
    Author:     Olaf Müller
mueller@6008
     3
*)
mueller@6008
     4
wenzelm@58880
     5
section {* 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