src/HOLCF/IOA/meta_theory/Traces.ML
author aspinall
Fri, 30 Sep 2005 18:18:34 +0200
changeset 17740 fc385ce6187d
parent 14981 e73f8140af78
child 17876 b9c92f384109
permissions -rw-r--r--
Add icon for interface.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     1
(*  Title:      HOLCF/IOA/meta_theory/Traces.ML
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
     2
    ID:         $Id$
12218
wenzelm
parents: 10835
diff changeset
     3
    Author:     Olaf Müller
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     4
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     5
Theorems about Executions and Traces of I/O automata in HOLCF.
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     6
*)   
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
     7
4815
b8a32ef742d9 removed split_all_tac from claset() globally within IOA
oheimb
parents: 4559
diff changeset
     8
(* global changes to simpset() and claset(), see also TLS.ML *)
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
     9
Delsimps (ex_simps @ all_simps);
4536
74f7c556fd90 added split_paired_Ex to the implicit simpset
oheimb
parents: 4477
diff changeset
    10
Delsimps [split_paired_Ex];
4815
b8a32ef742d9 removed split_all_tac from claset() globally within IOA
oheimb
parents: 4559
diff changeset
    11
Addsimps [Let_def];
b8a32ef742d9 removed split_all_tac from claset() globally within IOA
oheimb
parents: 4559
diff changeset
    12
claset_ref() := claset() delSWrapper "split_all_tac";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    13
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    14
val exec_rws = [executions_def,is_exec_frag_def];
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    15
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    16
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    17
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    18
(* ----------------------------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    19
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    20
section "recursive equations of operators";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    21
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    22
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    23
(* ---------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    24
(*                               filter_act                         *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    25
(* ---------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    26
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    27
10835
nipkow
parents: 7229
diff changeset
    28
Goal  "filter_act$UU = UU";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
    29
by (simp_tac (simpset() addsimps [filter_act_def]) 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    30
qed"filter_act_UU";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    31
10835
nipkow
parents: 7229
diff changeset
    32
Goal  "filter_act$nil = nil";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
    33
by (simp_tac (simpset() addsimps [filter_act_def]) 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    34
qed"filter_act_nil";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    35
10835
nipkow
parents: 7229
diff changeset
    36
Goal "filter_act$(x>>xs) = (fst x) >> filter_act$xs";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
    37
by (simp_tac (simpset() addsimps [filter_act_def]) 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    38
qed"filter_act_cons";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    39
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    40
Addsimps [filter_act_UU,filter_act_nil,filter_act_cons];
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    41
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    42
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    43
(* ---------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    44
(*                             mk_trace                             *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    45
(* ---------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    46
10835
nipkow
parents: 7229
diff changeset
    47
Goal "mk_trace A$UU=UU";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
    48
by (simp_tac (simpset() addsimps [mk_trace_def]) 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    49
qed"mk_trace_UU";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    50
10835
nipkow
parents: 7229
diff changeset
    51
Goal "mk_trace A$nil=nil";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
    52
by (simp_tac (simpset() addsimps [mk_trace_def]) 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    53
qed"mk_trace_nil";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    54
10835
nipkow
parents: 7229
diff changeset
    55
Goal "mk_trace A$(at >> xs) =    \
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    56
\            (if ((fst at):ext A)    \       
10835
nipkow
parents: 7229
diff changeset
    57
\                 then (fst at) >> (mk_trace A$xs) \   
nipkow
parents: 7229
diff changeset
    58
\                 else mk_trace A$xs)";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    59
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
    60
by (asm_full_simp_tac (simpset() addsimps [mk_trace_def]) 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    61
qed"mk_trace_cons";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    62
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    63
Addsimps [mk_trace_UU,mk_trace_nil,mk_trace_cons];
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    64
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    65
(* ---------------------------------------------------------------- *)
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    66
(*                             is_exec_fragC                             *)
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    67
(* ---------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    68
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    69
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
    70
Goal "is_exec_fragC A = (LAM ex. (%s. case ex of \
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    71
\      nil => TT \
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    72
\    | x##xs => (flift1 \ 
10835
nipkow
parents: 7229
diff changeset
    73
\            (%p. Def ((s,p):trans_of A) andalso (is_exec_fragC A$xs) (snd p)) \
nipkow
parents: 7229
diff changeset
    74
\             $x) \
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    75
\   ))";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    76
by (rtac trans 1);
3457
a8ab7c64817c Ran expandshort
paulson
parents: 3433
diff changeset
    77
by (rtac fix_eq2 1);
a8ab7c64817c Ran expandshort
paulson
parents: 3433
diff changeset
    78
by (rtac is_exec_fragC_def 1);
a8ab7c64817c Ran expandshort
paulson
parents: 3433
diff changeset
    79
by (rtac beta_cfun 1);
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
    80
by (simp_tac (simpset() addsimps [flift1_def]) 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    81
qed"is_exec_fragC_unfold";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    82
10835
nipkow
parents: 7229
diff changeset
    83
Goal "(is_exec_fragC A$UU) s=UU";
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    84
by (stac is_exec_fragC_unfold 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    85
by (Simp_tac 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    86
qed"is_exec_fragC_UU";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    87
10835
nipkow
parents: 7229
diff changeset
    88
Goal "(is_exec_fragC A$nil) s = TT";
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    89
by (stac is_exec_fragC_unfold 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    90
by (Simp_tac 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    91
qed"is_exec_fragC_nil";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    92
10835
nipkow
parents: 7229
diff changeset
    93
Goal "(is_exec_fragC A$(pr>>xs)) s = \
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    94
\                        (Def ((s,pr):trans_of A) \
10835
nipkow
parents: 7229
diff changeset
    95
\                andalso (is_exec_fragC A$xs)(snd pr))";
3457
a8ab7c64817c Ran expandshort
paulson
parents: 3433
diff changeset
    96
by (rtac trans 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
    97
by (stac is_exec_fragC_unfold 1);
7229
6773ba0c36d5 renamed Cons to Consq in order to avoid clash with List.Cons;
wenzelm
parents: 5068
diff changeset
    98
by (asm_full_simp_tac (simpset() addsimps [Consq_def,flift1_def]) 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
    99
by (Simp_tac 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   100
qed"is_exec_fragC_cons";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   101
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   102
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   103
Addsimps [is_exec_fragC_UU,is_exec_fragC_nil,is_exec_fragC_cons];
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   104
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   105
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   106
(* ---------------------------------------------------------------- *)
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   107
(*                        is_exec_frag                              *)
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   108
(* ---------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   109
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   110
Goal "is_exec_frag A (s, UU)";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   111
by (simp_tac (simpset() addsimps [is_exec_frag_def]) 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   112
qed"is_exec_frag_UU";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   113
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   114
Goal "is_exec_frag A (s, nil)";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   115
by (simp_tac (simpset() addsimps [is_exec_frag_def]) 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   116
qed"is_exec_frag_nil";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   117
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   118
Goal "is_exec_frag A (s, (a,t)>>ex) = \
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   119
\                               (((s,a,t):trans_of A) & \
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   120
\                               is_exec_frag A (t, ex))";
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   121
by (simp_tac (simpset() addsimps [is_exec_frag_def]) 1);
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   122
qed"is_exec_frag_cons";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   123
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   124
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   125
(* Delsimps [is_exec_fragC_UU,is_exec_fragC_nil,is_exec_fragC_cons]; *)
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   126
Addsimps [is_exec_frag_UU,is_exec_frag_nil, is_exec_frag_cons];  
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   127
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   128
(* ---------------------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   129
                           section "laststate";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   130
(* ---------------------------------------------------------------------------- *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   131
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   132
Goal "laststate (s,UU) = s";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   133
by (simp_tac (simpset() addsimps [laststate_def]) 1); 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   134
qed"laststate_UU";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   135
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   136
Goal "laststate (s,nil) = s";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   137
by (simp_tac (simpset() addsimps [laststate_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   138
qed"laststate_nil";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   139
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   140
Goal "!! ex. Finite ex ==> laststate (s,at>>ex) = laststate (snd at,ex)";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   141
by (simp_tac (simpset() addsimps [laststate_def]) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   142
by (case_tac "ex=nil" 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   143
by (Asm_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   144
by (Asm_simp_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   145
by (dtac (Finite_Last1 RS mp) 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   146
by (assume_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   147
by (def_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   148
qed"laststate_cons";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   149
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   150
Addsimps [laststate_UU,laststate_nil,laststate_cons];
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   151
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   152
Goal "!!ex. Finite ex ==> (! s. ? u. laststate (s,ex)=u)";
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   153
by (Seq_Finite_induct_tac 1);
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   154
qed"exists_laststate";
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents: 4536
diff changeset
   155
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   156
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   157
(* -------------------------------------------------------------------------------- *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   158
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   159
section "has_trace, mk_trace";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   160
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   161
(* alternative definition of has_trace tailored for the refinement proof, as it does not 
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   162
   take the detour of schedules *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   163
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   164
Goalw  [executions_def,mk_trace_def,has_trace_def,schedules_def,has_schedule_def] 
10835
nipkow
parents: 7229
diff changeset
   165
"has_trace A b = (? ex:executions A. b = mk_trace A$(snd ex))";
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   166
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   167
by (safe_tac set_cs);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   168
(* 1 *)
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   169
by (res_inst_tac[("x","ex")] bexI 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   170
by (stac beta_cfun 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   171
by (cont_tacR 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   172
by (Simp_tac 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   173
by (Asm_simp_tac 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   174
(* 2 *)
10835
nipkow
parents: 7229
diff changeset
   175
by (res_inst_tac[("x","filter_act$(snd ex)")] bexI 1);
3071
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   176
by (stac beta_cfun 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   177
by (cont_tacR 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   178
by (Simp_tac 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   179
by (safe_tac set_cs);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   180
by (res_inst_tac[("x","ex")] bexI 1);
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   181
by (REPEAT (Asm_simp_tac 1));
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   182
qed"has_trace_def2";
981258186b71 New meta theory for IOA based on HOLCF.
mueller
parents:
diff changeset
   183
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   184
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   185
(* -------------------------------------------------------------------------------- *)
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   186
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   187
section "signatures and executions, schedules";
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   188
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   189
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   190
(* All executions of A have only actions of A. This is only true because of the 
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   191
   predicate state_trans (part of the predicate IOA): We have no dependent types.
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   192
   For executions of parallel automata this assumption is not needed, as in par_def
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   193
   this condition is included once more. (see Lemmas 1.1.1c in CompoExecs for example) *)
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   194
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   195
Goal 
3521
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3457
diff changeset
   196
  "!! A. is_trans_of A ==> \
10835
nipkow
parents: 7229
diff changeset
   197
\ ! s. is_exec_frag A (s,xs) --> Forall (%a. a:act A) (filter_act$xs)";
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   198
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   199
by (pair_induct_tac "xs" [is_exec_frag_def,Forall_def,sforall_def] 1);
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   200
(* main case *)
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   201
ren "ss a t" 1;
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   202
by (safe_tac set_cs);
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   203
by (REPEAT (asm_full_simp_tac (simpset() addsimps [is_trans_of_def]) 1));
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   204
qed"execfrag_in_sig";
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   205
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   206
Goal 
3521
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3457
diff changeset
   207
  "!! A.[|  is_trans_of A; x:executions A |] ==> \
10835
nipkow
parents: 7229
diff changeset
   208
\ Forall (%a. a:act A) (filter_act$(snd x))";
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   209
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   210
by (asm_full_simp_tac (simpset() addsimps [executions_def]) 1);
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   211
by (pair_tac "x" 1);
3457
a8ab7c64817c Ran expandshort
paulson
parents: 3433
diff changeset
   212
by (rtac (execfrag_in_sig RS spec RS mp) 1);
4477
b3e5857d8d99 New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents: 4423
diff changeset
   213
by Auto_tac;
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   214
qed"exec_in_sig";
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   215
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   216
Goalw [schedules_def,has_schedule_def]
3521
bdc51b4c6050 changes needed for adding fairness
mueller
parents: 3457
diff changeset
   217
  "!! A.[|  is_trans_of A; x:schedules A |] ==> \
3842
b55686a7b22c fixed dots;
wenzelm
parents: 3521
diff changeset
   218
\   Forall (%a. a:act A) x";
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   219
4098
71e05eb27fb6 isatool fixclasimp;
wenzelm
parents: 3842
diff changeset
   220
by (fast_tac (claset() addSIs [exec_in_sig]) 1);
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   221
qed"scheds_in_sig";
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   222
4283
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   223
(*
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   224
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   225
is ok but needs ForallQFilterP which has to been proven first (is trivial also)
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   226
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   227
Goalw [traces_def,has_trace_def]
4283
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   228
  "!! A.[| x:traces A |] ==> \
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   229
\   Forall (%a. a:act A) x";
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   230
 by (safe_tac set_cs );
4423
a129b817b58a expandshort;
wenzelm
parents: 4283
diff changeset
   231
by (rtac ForallQFilterP 1);
4283
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   232
by (fast_tac (!claset addSIs [ext_is_act]) 1);
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   233
qed"traces_in_sig";
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   234
*)
92707e24b62b managed merge details;
mueller
parents: 4098
diff changeset
   235
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   236
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   237
(* -------------------------------------------------------------------------------- *)
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   238
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   239
section "executions are prefix closed";
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   240
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   241
(* only admissible in y, not if done in x !! *)
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   242
Goal "!x s. is_exec_frag A (s,x) & y<<x  --> is_exec_frag A (s,y)";
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   243
by (pair_induct_tac "y" [is_exec_frag_def] 1);
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   244
by (strip_tac 1);
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   245
by (Seq_case_simp_tac "xa" 1);
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   246
by (pair_tac "a" 1);
4477
b3e5857d8d99 New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents: 4423
diff changeset
   247
by Auto_tac;
3275
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   248
qed"execfrag_prefixclosed";
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   249
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   250
bind_thm ("exec_prefixclosed",conjI RS (execfrag_prefixclosed RS spec RS spec RS mp));
3f53f2c876f4 changes for release 94-8
mueller
parents: 3071
diff changeset
   251
3361
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   252
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   253
(* second prefix notion for Finite x *)
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   254
5068
fb28eaa07e01 isatool fixgoal;
wenzelm
parents: 4815
diff changeset
   255
Goal "! y s. is_exec_frag A (s,x@@y) --> is_exec_frag A (s,x)";
3433
2de17c994071 added deadlock freedom, polished definitions and proofs
mueller
parents: 3361
diff changeset
   256
by (pair_induct_tac "x" [is_exec_frag_def] 1);
3361
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   257
by (strip_tac 1);
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   258
by (Seq_case_simp_tac "s" 1);
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   259
by (pair_tac "a" 1);
4477
b3e5857d8d99 New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
paulson
parents: 4423
diff changeset
   260
by Auto_tac;
3361
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   261
qed_spec_mp"exec_prefix2closed";
1877e333f66c Last changes for new release 94-8
mueller
parents: 3275
diff changeset
   262