@@ -9,15 +9,15 @@ open listTheory ottTheory p4Theory p4_auxTheory p4_exec_semTheory p4_exec_sem_fr
99Definition 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')
1414End
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)
1919Proof
20- cheat
20+ gs[declare_list_in_scope_exec_def, declare_list_in_scope_def, arb_from_tau_gen_arb_equiv]
2121QED
2222
2323Theorem 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