src/HOL/HOLCF/IOA/Storage/Impl.thy
author haftmann
Fri, 27 Jun 2025 08:09:26 +0200
changeset 82775 61c39a9e5415
parent 67613 ce654b0e6d69
permissions -rw-r--r--
typo
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42151
4da4fc77664b tuned headers;
wenzelm
parents: 40945
diff changeset
     1
(*  Title:      HOL/HOLCF/IOA/Storage/Impl.thy
40945
b8703f63bfb2 recoded latin1 as utf8;
wenzelm
parents: 40774
diff changeset
     2
    Author:     Olaf Müller
6008
d0e9b1619468 Memory storage case study from PhD p.240;
mueller
parents:
diff changeset
     3
*)
d0e9b1619468 Memory storage case study from PhD p.240;
mueller
parents:
diff changeset
     4
62002
f1599e98c4d0 isabelle update_cartouches -c -t;
wenzelm
parents: 58880
diff changeset
     5
section \<open>The implementation of a memory\<close>
6008
d0e9b1619468 Memory storage case study from PhD p.240;
mueller
parents:
diff changeset
     6
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     7
theory Impl
66453
cc19f7ca2ed6 session-qualified theory imports: isabelle imports -U -i -d '~~/src/Benchmarks' -a;
wenzelm
parents: 62009
diff changeset
     8
imports IOA.IOA Action
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
     9
begin
6008
d0e9b1619468 Memory storage case study from PhD p.240;
mueller
parents:
diff changeset
    10
27361
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    11
definition
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    12
  impl_sig :: "action signature" where
67613
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    13
  "impl_sig = (\<Union>l.{Free l} \<union> {New},
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    14
               \<Union>l.{Loc l},
27361
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    15
               {})"
6008
d0e9b1619468 Memory storage case study from PhD p.240;
mueller
parents:
diff changeset
    16
27361
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    17
definition
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    18
  impl_trans :: "(action, nat  * bool)transition set" where
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    19
  "impl_trans =
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    20
    {tr. let s = fst(tr); k = fst s; b = snd s;
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    21
             t = snd(snd(tr)); k' = fst t; b' = snd t
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    22
         in
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    23
         case fst(snd(tr))
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    24
         of
67613
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    25
         New       \<Rightarrow> k' = k \<and> b'  |
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    26
         Loc l     \<Rightarrow> b \<and> l= k \<and> k'= (Suc k) \<and> \<not>b' |
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    27
         Free l    \<Rightarrow> k'=k \<and> b'=b}"
6008
d0e9b1619468 Memory storage case study from PhD p.240;
mueller
parents:
diff changeset
    28
27361
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    29
definition
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    30
  impl_ioa :: "(action, nat * bool)ioa" where
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    31
  "impl_ioa = (impl_sig, {(0,False)}, impl_trans,{},{})"
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    32
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    33
lemma in_impl_asig:
67613
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    34
  "New \<in> actions(impl_sig) \<and>
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    35
    Loc l \<in> actions(impl_sig) \<and>
ce654b0e6d69 more symbols;
wenzelm
parents: 66453
diff changeset
    36
    Free l \<in> actions(impl_sig) "
27361
24ec32bee347 modernized specifications;
wenzelm
parents: 19740
diff changeset
    37
  by (simp add: impl_sig_def actions_def asig_projections)
17244
0b2ff9541727 converted to Isar theory format;
wenzelm
parents: 14981
diff changeset
    38
6008
d0e9b1619468 Memory storage case study from PhD p.240;
mueller
parents:
diff changeset
    39
end