@@ -376,9 +376,10 @@ fun dest_ascope ascope =
376376 let
377377 val (counter, ascope') = dest_pair ascope
378378 val (ext_obj_map, ascope'') = dest_pair ascope'
379- val (v_map, ctrl) = dest_pair ascope''
379+ val (v_map, ascope''') = dest_pair ascope''
380+ val (ctrl, oracle_index) = dest_pair ascope'''
380381 in
381- (counter, ext_obj_map, v_map, ctrl)
382+ (counter, ext_obj_map, v_map, ctrl, oracle_index )
382383 end
383384;
384385
@@ -394,9 +395,12 @@ fun dest_actx actx =
394395 val (copyin_pbl, actx'''''') = dest_pair actx'''''
395396 val (copyout_pbl, actx''''''') = dest_pair actx''''''
396397 val (apply_table_f, actx'''''''') = dest_pair actx'''''''
397- val (ext_map, func_map) = dest_pair actx''''''''
398+ val (ext_map, actx''''''''') = dest_pair actx''''''''
399+ val (func_map, actx'''''''''') = dest_pair actx'''''''''
400+ val (get_oracle_index, actx''''''''''') = dest_pair actx''''''''''
401+ val (set_oracle_index, random_oracle) = dest_pair actx'''''''''''
398402 in
399- (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map)
403+ (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map, get_oracle_index, set_oracle_index, random_oracle )
400404 end
401405;
402406
@@ -435,7 +439,7 @@ fun debug_arch_from_step arch actx astate nsteps =
435439 val (aenv, g_scope_list, arch_frame_list, status) = dest_astate astate'
436440(* Use the below to debug, e.g. using the executable semantics in p4_exec_semScript.sml: *)
437441(* val (i, in_out_list, in_out_list', scope) = dest_aenv aenv *)
438- (* val (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map) = dest_actx actx *)
442+ (* val (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map, get_oracle_index, set_oracle_index, random_oracle ) = dest_actx actx *)
439443 in
440444 (dest_actx actx, (dest_aenv aenv, g_scope_list, arch_frame_list, status))
441445 end
@@ -448,7 +452,7 @@ fun debug_arch_from_step_alt arch actx astate nsteps =
448452 val (aenv, g_scope_list, arch_frame_list, status) = dest_astate astate'
449453(* Use the below to debug, e.g. using the executable semantics in p4_exec_semScript.sml: *)
450454(* val (i, in_out_list, in_out_list', scope) = dest_aenv aenv *)
451- (* val (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map) = dest_actx actx *)
455+ (* val (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map, get_oracle_index, set_oracle_index, random_oracle ) = dest_actx actx *)
452456 in
453457 (actx, list_mk_pair [aenv, g_scope_list, arch_frame_list, status])
454458 end
@@ -461,12 +465,12 @@ fun debug_frames_from_step arch actx astate nsteps =
461465 val astate' = eval_and_print_result arch actx astate nsteps
462466 val (aenv, g_scope_list, arch_frame_list, status) = dest_astate astate'
463467 val (i, in_out_list, in_out_list', scope) = dest_aenv aenv
464- val (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map) = dest_actx actx
468+ val (ab_list, pblock_map, ffblock_map, input_f, output_f, copyin_pbl, copyout_pbl, apply_table_f, ext_map, func_map, get_oracle_index, set_oracle_index, random_oracle ) = dest_actx actx
465469 val (pbl_x, pbl_el) = dest_arch_block_pbl $ rhs $ concl $ EVAL ``EL (^i) (^ab_list)``
466470 val (pbl_type, params, b_func_map, decl_list, pars_map, tbl_map) = dest_pblock $ optionSyntax.dest_some $ rhs $ concl $ EVAL ``ALOOKUP (^pblock_map) (^pbl_x)``
467471 val frame_list = dest_arch_frame_list_regular arch_frame_list
468472 in
469- ((apply_table_f, ext_map, func_map, b_func_map, pars_map, tbl_map), (scope, g_scope_list, frame_list, status))
473+ ((apply_table_f, ext_map, func_map, b_func_map, pars_map, tbl_map, get_oracle_index, set_oracle_index, random_oracle ), (scope, g_scope_list, frame_list, status))
470474 end
471475;
472476
0 commit comments