| author | huffman |
| Thu, 06 May 2010 11:08:19 -0700 | |
| changeset 36696 | 1b69f78be286 |
| parent 35174 | e15040ae75d7 |
| permissions | -rw-r--r-- |
|
3072
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
1 |
(* Title: HOLCF/IOA/ABP/Impl.thy |
| 12218 | 2 |
Author: Olaf Müller |
|
3072
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
3 |
*) |
|
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
4 |
|
| 17244 | 5 |
header {* The environment *}
|
6 |
||
7 |
theory Env |
|
8 |
imports IOA Action |
|
9 |
begin |
|
|
3072
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
10 |
|
|
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
11 |
types |
| 17244 | 12 |
'm env_state = bool -- {* give next bit to system *}
|
|
3072
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
13 |
|
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
14 |
definition |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
15 |
env_asig :: "'m action signature" where |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
16 |
"env_asig == ({Next},
|
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
17 |
UN m. {S_msg(m)},
|
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
18 |
{})"
|
| 17244 | 19 |
|
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
20 |
definition |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
21 |
env_trans :: "('m action, 'm env_state)transition set" where
|
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
22 |
"env_trans = |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
23 |
{tr. let s = fst(tr);
|
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
24 |
t = snd(snd(tr)) |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
25 |
in case fst(snd(tr)) |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
26 |
of |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
27 |
Next => t=True | |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
28 |
S_msg(m) => s=True & t=False | |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
29 |
R_msg(m) => False | |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
30 |
S_pkt(pkt) => False | |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
31 |
R_pkt(pkt) => False | |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
32 |
S_ack(b) => False | |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
33 |
R_ack(b) => False}" |
| 17244 | 34 |
|
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
35 |
definition |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
36 |
env_ioa :: "('m action, 'm env_state)ioa" where
|
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
37 |
"env_ioa = (env_asig, {True}, env_trans,{},{})"
|
|
3072
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
38 |
|
|
25131
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
39 |
axiomatization |
|
2c8caac48ade
modernized specifications ('definition', 'abbreviation', 'notation');
wenzelm
parents:
19738
diff
changeset
|
40 |
"next" :: "'m env_state => bool" |
|
3072
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
41 |
|
|
a31419014be5
Old ABP files now running under the IOA meta theory based on HOLCF;
mueller
parents:
diff
changeset
|
42 |
end |