3071
|
1 |
(* Title: HOLCF/IOA/meta_theory/CompoExecs.thy
|
3275
|
2 |
ID: $Id$
|
3071
|
3 |
Author: Olaf M"uller
|
|
4 |
Copyright 1996 TU Muenchen
|
|
5 |
|
|
6 |
Compositionality on Execution level.
|
|
7 |
*)
|
|
8 |
|
|
9 |
CompoExecs = Traces +
|
|
10 |
|
|
11 |
|
|
12 |
consts
|
|
13 |
|
|
14 |
ProjA ::"('a,'s * 't)execution => ('a,'s)execution"
|
|
15 |
ProjA2 ::"('a,'s * 't)pairs -> ('a,'s)pairs"
|
|
16 |
ProjB ::"('a,'s * 't)execution => ('a,'t)execution"
|
|
17 |
ProjB2 ::"('a,'s * 't)pairs -> ('a,'t)pairs"
|
3521
|
18 |
Filter_ex ::"'a signature => ('a,'s)execution => ('a,'s)execution"
|
|
19 |
Filter_ex2 ::"'a signature => ('a,'s)pairs -> ('a,'s)pairs"
|
|
20 |
stutter ::"'a signature => ('a,'s)execution => bool"
|
|
21 |
stutter2 ::"'a signature => ('a,'s)pairs -> ('s => tr)"
|
|
22 |
|
|
23 |
par_execs ::"[('a,'s)execution_module,('a,'t)execution_module] => ('a,'s*'t)execution_module"
|
3071
|
24 |
|
|
25 |
|
|
26 |
defs
|
|
27 |
|
|
28 |
|
|
29 |
ProjA_def
|
|
30 |
"ProjA ex == (fst (fst ex), ProjA2`(snd ex))"
|
|
31 |
|
|
32 |
ProjB_def
|
|
33 |
"ProjB ex == (snd (fst ex), ProjB2`(snd ex))"
|
|
34 |
|
|
35 |
|
|
36 |
ProjA2_def
|
|
37 |
"ProjA2 == Map (%x.(fst x,fst(snd x)))"
|
|
38 |
|
|
39 |
ProjB2_def
|
|
40 |
"ProjB2 == Map (%x.(fst x,snd(snd x)))"
|
|
41 |
|
|
42 |
|
|
43 |
Filter_ex_def
|
3521
|
44 |
"Filter_ex sig ex == (fst ex,Filter_ex2 sig`(snd ex))"
|
3071
|
45 |
|
|
46 |
|
|
47 |
Filter_ex2_def
|
3842
|
48 |
"Filter_ex2 sig == Filter (%x. fst x:actions sig)"
|
3071
|
49 |
|
|
50 |
stutter_def
|
3521
|
51 |
"stutter sig ex == ((stutter2 sig`(snd ex)) (fst ex) ~= FF)"
|
3071
|
52 |
|
|
53 |
stutter2_def
|
3521
|
54 |
"stutter2 sig ==(fix`(LAM h ex. (%s. case ex of
|
3071
|
55 |
nil => TT
|
|
56 |
| x##xs => (flift1
|
3521
|
57 |
(%p.(If Def ((fst p)~:actions sig)
|
3071
|
58 |
then Def (s=(snd p))
|
|
59 |
else TT fi)
|
|
60 |
andalso (h`xs) (snd p))
|
|
61 |
`x)
|
|
62 |
)))"
|
|
63 |
|
3521
|
64 |
par_execs_def
|
|
65 |
"par_execs ExecsA ExecsB ==
|
|
66 |
let exA = fst ExecsA; sigA = snd ExecsA;
|
|
67 |
exB = fst ExecsB; sigB = snd ExecsB
|
|
68 |
in
|
|
69 |
( {ex. Filter_ex sigA (ProjA ex) : exA}
|
|
70 |
Int {ex. Filter_ex sigB (ProjB ex) : exB}
|
|
71 |
Int {ex. stutter sigA (ProjA ex)}
|
|
72 |
Int {ex. stutter sigB (ProjB ex)}
|
3842
|
73 |
Int {ex. Forall (%x. fst x:(actions sigA Un actions sigB)) (snd ex)},
|
3521
|
74 |
asig_comp sigA sigB)"
|
3071
|
75 |
|
|
76 |
end |