Skip to content

Commit 28ef66d

Browse files
Cleanup and moving some stuff to public repo
1 parent e1e46f4 commit 28ef66d

13 files changed

+909
-420
lines changed

hol/cake_sem/metatheory/p4_cake_exec_sem_completenessScript.sml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3526,7 +3526,7 @@ FOLDL AUPDATE [] l2 = l2 ==>
35263526
FOLDL AUPDATE [(q,r)] l2 = (q,r)::l2
35273527
Proof
35283528
completeInduct_on ‘l2’ >>
3529-
gs[] >>
3529+
gs[] >>
35303530
rpt strip_tac >>
35313531
QED
35323532

hol/metatheory/p4_concurrentScript.sml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ QED
126126

127127
Theorem arch_exec_trace_1:
128128
!actx s s'.
129-
arch_multi_exec actx s 1 = SOME s' ==>
129+
arch_multi_exec uninit_arb actx s 1 = SOME s' ==>
130130
trace_path ( \s s'. arch_red actx s s') 1 s s'
131131
Proof
132132
rpt strip_tac >>
@@ -138,7 +138,7 @@ QED
138138

139139
Theorem arch_exec_trace_n:
140140
!actx n s s'.
141-
arch_multi_exec actx s n = SOME s' ==>
141+
arch_multi_exec uninit_arb actx s n = SOME s' ==>
142142
trace_path ( \s s'. arch_red actx s s') n s s'
143143
Proof
144144
Induct_on ‘n’ >| [
@@ -147,13 +147,13 @@ Induct_on ‘n’ >| [
147147
fs[arch_multi_exec_def, trace_path_def],
148148

149149
rpt strip_tac >>
150-
subgoal ‘?s''. arch_multi_exec actx s n = SOME s'' /\
151-
arch_multi_exec actx s'' 1 = SOME s'’ >- (
150+
subgoal ‘?s''. arch_multi_exec uninit_arb actx s n = SOME s'' /\
151+
arch_multi_exec uninit_arb actx s'' 1 = SOME s'’ >- (
152152
fs [arithmeticTheory.SUC_ONE_ADD] >>
153153
PairCases_on ‘s’ >>
154154
FULL_SIMP_TAC empty_ss [Once ADD_SYM] >>
155155
fs[arch_multi_exec_add] >>
156-
Cases_on ‘arch_multi_exec actx ((s0,s1,s2,s3),s4,s5,s6) n’ >> (
156+
Cases_on ‘arch_multi_exec uninit_arb actx ((s0,s1,s2,s3),s4,s5,s6) n’ >> (
157157
fs[]
158158
) >>
159159
PairCases_on ‘x’ >>

hol/metatheory/p4_exec_sem_arch_soundnessScript.sml

Lines changed: 78 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ open listTheory ottTheory p4Theory p4_auxTheory p4_exec_semTheory p4_exec_sem_fr
99
Definition arch_exec_sound:
1010
(arch_exec_sound arch_frame_list (type:('a itself)) =
1111
!(actx:'a actx) aenv g_scope_list status astate'.
12-
arch_exec actx (aenv, g_scope_list, arch_frame_list, status) = SOME astate' ==>
12+
arch_exec uninit_arb actx (aenv, g_scope_list, arch_frame_list, status) = SOME astate' ==>
1313
arch_red actx (aenv, g_scope_list, arch_frame_list, status) astate')
1414
End
1515

16-
(* TODO: ARB issue *)
17-
Theorem declare_list_in_scope_exec'_eq:
18-
declare_list_in_scope_exec' = declare_list_in_scope
16+
Theorem declare_list_in_scope_exec_eq:
17+
!t_scope scope.
18+
declare_list_in_scope_exec uninit_arb (t_scope,scope) = declare_list_in_scope (t_scope,scope)
1919
Proof
20-
cheat
20+
gs[declare_list_in_scope_exec_def, declare_list_in_scope_def, arb_from_tau_gen_arb_equiv]
2121
QED
2222

2323
Theorem arch_exec_sound_red:
@@ -38,82 +38,82 @@ Cases_on `arch_frame_list` >> (
3838
) >| [
3939
Cases_on `oEL i ab_list` >> (gs[arch_exec_def]) >>
4040
Cases_on ‘x’ >| [
41-
(* input *)
42-
fs [arch_exec_def] >>
43-
Cases_on `input_f (in_out_list,ascope)` >> (
44-
fs []
45-
) >>
46-
PairCases_on `x` >>
47-
gvs[] >>
48-
metis_tac[(valOf o find_clause_arch_red) "arch_in", oEL_EQ_EL, clause_name_def],
41+
(* input *)
42+
fs [arch_exec_def] >>
43+
Cases_on `input_f (in_out_list,ascope)` >> (
44+
fs []
45+
) >>
46+
PairCases_on `x` >>
47+
gvs[] >>
48+
metis_tac[(valOf o find_clause_arch_red) "arch_in", oEL_EQ_EL, clause_name_def],
4949

50-
(* programmable block initialisation *)
51-
fs [arch_exec_def] >>
52-
Cases_on `ALOOKUP pblock_map s` >> (
53-
fs []
54-
) >>
55-
PairCases_on `x` >>
56-
fs [] >>
57-
rename1 `(x0, x_d_l, b_func_map, t_scope, pars_map, tbl_map)` >>
58-
rename1 `(p, x_d_l, b_func_map, t_scope, pars_map, tbl_map)` >>
59-
Cases_on `lookup_block_body s b_func_map` >> (
60-
fs []
61-
) >>
62-
rename1 `lookup_block_body s b_func_map = SOME stmt` >>
63-
fs [] >>
64-
Cases_on `copyin_pbl (MAP FST x_d_l,MAP SND x_d_l,l,ascope)` >> (
65-
fs []
66-
) >>
67-
Cases_on `oLASTN 1 g_scope_list` >> (
68-
fs []
69-
) >>
70-
Cases_on `x'` >> (
71-
fs []
72-
) >>
73-
Cases_on `t` >> (
74-
fs []
75-
) >>
76-
Cases_on `initialise_var_stars func_map b_func_map ext_map [declare_list_in_scope (t_scope,x); h]` >> (
77-
fs [declare_list_in_scope_exec'_eq]
78-
) >>
79-
rw [] >>
80-
irule ((valOf o find_clause_arch_red) "arch_pbl_init") >>
81-
fs [clause_name_def] >>
82-
qexistsl_tac [`ZIP (l, ZIP(MAP FST x_d_l, MAP SND x_d_l))`, `x`] >>
83-
fs [] >>
84-
rpt strip_tac >| [
85-
fs [map_tri_zip12, listTheory.oEL_EQ_EL],
50+
(* programmable block initialisation *)
51+
fs [arch_exec_def] >>
52+
Cases_on `ALOOKUP pblock_map s` >> (
53+
fs []
54+
) >>
55+
PairCases_on `x` >>
56+
fs [] >>
57+
rename1 `(x0, x_d_l, b_func_map, t_scope, pars_map, tbl_map)` >>
58+
rename1 `(p, x_d_l, b_func_map, t_scope, pars_map, tbl_map)` >>
59+
Cases_on `lookup_block_body s b_func_map` >> (
60+
fs []
61+
) >>
62+
rename1 `lookup_block_body s b_func_map = SOME stmt` >>
63+
fs [] >>
64+
Cases_on `copyin_pbl (MAP FST x_d_l,MAP SND x_d_l,l,ascope)` >> (
65+
fs []
66+
) >>
67+
Cases_on `oLASTN 1 g_scope_list` >> (
68+
fs []
69+
) >>
70+
Cases_on `x'` >> (
71+
fs []
72+
) >>
73+
Cases_on `t` >> (
74+
fs []
75+
) >>
76+
Cases_on `initialise_var_stars func_map b_func_map ext_map [declare_list_in_scope_exec uninit_arb (t_scope,x); h]` >> (
77+
fs [declare_list_in_scope_exec_eq]
78+
) >>
79+
rw [] >>
80+
irule ((valOf o find_clause_arch_red) "arch_pbl_init") >>
81+
fs [clause_name_def] >>
82+
qexistsl_tac [`ZIP (l, ZIP(MAP FST x_d_l, MAP SND x_d_l))`, `x`] >>
83+
fs [] >>
84+
rpt strip_tac >| [
85+
fs [map_tri_zip12, listTheory.oEL_EQ_EL],
8686

87-
gs [listTheory.oEL_EQ_EL] >>
88-
metis_tac [oLASTN_imp_LASTN],
87+
gs [listTheory.oEL_EQ_EL] >>
88+
metis_tac [oLASTN_imp_LASTN],
8989

90-
fs [map_tri_zip12, ZIP_MAP_FST_SND],
90+
fs [map_tri_zip12, ZIP_MAP_FST_SND],
9191

92-
fs [map_tri_zip12, ZIP_MAP_FST_SND]
93-
],
92+
fs [map_tri_zip12, ZIP_MAP_FST_SND]
93+
],
9494

95-
(* fixed-function block *)
96-
fs [arch_exec_def] >>
97-
Cases_on `ALOOKUP ffblock_map s` >> (
98-
fs []
99-
) >>
100-
Cases_on `x` >>
101-
fs [] >>
102-
Cases_on `f ascope` >> (
103-
fs []
104-
) >>
105-
rw [] >>
106-
metis_tac [(valOf o find_clause_arch_red) "arch_ffbl", oEL_EQ_EL, clause_name_def],
95+
(* fixed-function block *)
96+
fs [arch_exec_def] >>
97+
Cases_on `ALOOKUP ffblock_map s` >> (
98+
fs []
99+
) >>
100+
Cases_on `x` >>
101+
fs [] >>
102+
Cases_on `f ascope` >> (
103+
fs []
104+
) >>
105+
rw [] >>
106+
metis_tac [(valOf o find_clause_arch_red) "arch_ffbl", oEL_EQ_EL, clause_name_def],
107107

108-
(* output *)
109-
fs [arch_exec_def] >>
110-
Cases_on `output_f (in_out_list',ascope)` >> (
111-
fs []
112-
) >>
113-
PairCases_on `x` >>
114-
fs [] >>
115-
rw [] >>
116-
metis_tac [(valOf o find_clause_arch_red) "arch_out", oEL_EQ_EL, clause_name_def]
108+
(* output *)
109+
fs [arch_exec_def] >>
110+
Cases_on `output_f (in_out_list',ascope)` >> (
111+
fs []
112+
) >>
113+
PairCases_on `x` >>
114+
fs [] >>
115+
rw [] >>
116+
metis_tac [(valOf o find_clause_arch_red) "arch_out", oEL_EQ_EL, clause_name_def]
117117
],
118118

119119
fs [arch_exec_def],
@@ -179,7 +179,7 @@ Cases_on `arch_frame_list` >> (
179179
) >>
180180
PairCases_on `x` >>
181181
fs [state_fin_exec_equiv, state_fin_def] >>
182-
Cases_on `frames_exec (apply_table_f,ext_map,func_map,x2,x4,x5)
182+
Cases_on `frames_exec uninit_arb (apply_table_f,ext_map,func_map,x2,x4,x5)
183183
(ascope,g_scope_list,l,status_running)` >> (
184184
fs []
185185
) >>
@@ -191,18 +191,8 @@ Cases_on `arch_frame_list` >> (
191191
qexistsl_tac [‘x2’] >>
192192
qexists_tac `l'` >>
193193
qexistsl_tac [‘x4’, ‘x0’, ‘x3’, ‘x5’, ‘s’, ‘x1’] >>
194-
(*
195-
qexists_tac `ZIP (l', x1)` >>
196-
rpt strip_tac >| [
197-
fs [map_tri_zip12],
198-
199-
fs [map_tri_zip12],
200-
*)
201-
assume_tac frame_list_exec_sound_red >>
202-
fs [frame_list_exec_sound]
203-
(*
204-
]
205-
*)
194+
assume_tac frame_list_exec_sound_red >>
195+
fs [frame_list_exec_sound]
206196
],
207197

208198
(* programmable block return *)

0 commit comments

Comments
 (0)