Skip to content

Commit 74850cc

Browse files
Cleanup, fixing typos, adding missing adjustments to symbexec after finishing work on retrofit sem
1 parent 10794a1 commit 74850cc

20 files changed

+668
-679
lines changed

hol/p4_exec_semScript.sml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3358,7 +3358,7 @@ arch_multi_exec uninit (ab_list,pblock_map,ffblock_map,input_f,output_f,copyin_p
33583358
((i,io_list,io_list',ascope),g_scope_list',
33593359
arch_frame_list_regular frame_list',status_running) ==>
33603360
?x el pbl_type x_d_list b_func_map decl_list pars_map tbl_map.
3361-
EL i ab_list = arch_block_pbl x el /\
3361+
oEL i ab_list = SOME $ arch_block_pbl x el /\
33623362
ALOOKUP pblock_map x =
33633363
SOME (pbl_type,x_d_list,b_func_map,decl_list,pars_map,tbl_map)
33643364
Proof
@@ -3409,10 +3409,7 @@ Cases_on ‘x5’ >- (
34093409
) >>
34103410
gs[AllCaseEqs()]
34113411
) >>
3412-
gvs[arch_exec_def, AllCaseEqs()] >- (
3413-
metis_tac[listTheory.oEL_EQ_EL]
3414-
) >>
3415-
metis_tac[listTheory.oEL_EQ_EL]
3412+
gvs[arch_exec_def, AllCaseEqs()]
34163413
QED
34173414

34183415
val _ = export_theory ();

hol/p4_exec_semSyntax.sig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ val dest_arch_multi_exec : term -> term * term * term * term
77
val is_arch_multi_exec : term -> bool
88
val mk_arch_multi_exec : term * term * int -> term
99

10+
val dest_match_all_exec : term -> term
11+
val is_match_all_exec : term -> bool
12+
val match_all_exec_tm : term
13+
val mk_match_all_exec : term -> term
14+
1015
end

hol/p4_exec_semSyntax.sml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ open p4_exec_semTheory;
88

99
val (arch_multi_exec_tm, _, dest_arch_multi_exec, is_arch_multi_exec) =
1010
syntax_fns4 "p4_exec_sem" "arch_multi_exec";
11+
(* TODO: Generalise *)
1112
val mk_arch_multi_exec =
1213
(fn (ctx, state, fuel) => (#2 (syntax_fns4 "p4_exec_sem" "arch_multi_exec")) (“uninit_zero”, ctx, state, term_of_int fuel));
1314

15+
val (match_all_exec_tm, mk_match_all_exec, dest_match_all_exec, is_match_all_exec) =
16+
syntax_fns1 "p4_exec_sem" "match_all_exec";
17+
1418
end

hol/p4_testLib.sml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fun the_final_state_hyp_imp_n step_thm =
225225
let
226226
val (hyp, step_tm) = dest_imp $ concl step_thm
227227
val (exec, final_state) = dest_eq step_tm
228-
val steps = #3 $ dest_arch_multi_exec exec
228+
val steps = #4 $ dest_arch_multi_exec exec
229229
in
230230
(hyp, optionSyntax.dest_some final_state, steps)
231231
end
@@ -235,7 +235,7 @@ fun get_actx step_thm =
235235
let
236236
val step_thm_tm = concl step_thm
237237
in
238-
#1 $ dest_arch_multi_exec $ fst $ dest_eq $
238+
#2 $ dest_arch_multi_exec $ fst $ dest_eq $
239239
(if is_imp step_thm_tm
240240
then snd $ dest_imp $ step_thm_tm
241241
else step_thm_tm)

0 commit comments

Comments
 (0)