-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test files in examples/arm_cm0/balrob
- Loading branch information
1 parent
d64e80d
commit ecfb490
Showing
7 changed files
with
384,490 additions
and
0 deletions.
There are no files selected for viewing
2,847 changes: 2,847 additions & 0 deletions
2,847
examples/arm_cm0/balrob/balrob_fmul_test2Script.sml
Large diffs are not rendered by default.
Oops, something went wrong.
344,694 changes: 344,694 additions & 0 deletions
344,694
examples/arm_cm0/balrob/balrob_fmul_testScript.sml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
open HolKernel Parse boolLib bossLib; | ||
|
||
open balrob_supportLib; | ||
open birsSyntax; | ||
open birs_utilsLib; | ||
|
||
open balrob_ftop_testTheory; | ||
|
||
val _ = new_theory "balrob_ftop_test2"; | ||
|
||
(* | ||
val symb_exec_thm = balrob_test_ftop_thm3; | ||
val symb_exec_thm = balrob_test_ftop_thm2; | ||
val symb_exec_thm = balrob_test_ftop_thm4; | ||
*) | ||
val symb_exec_thm = balrob_test_ftop_thm; | ||
|
||
fun print_mem sys = | ||
let | ||
val env = dest_birs_state_env sys; | ||
val mappings = get_env_mappings env; | ||
val mappings_ = List.filter ((fn x => x = "MEM") o stringSyntax.fromHOLstring o fst) mappings; | ||
val mem_exp = (snd o hd) mappings_; | ||
(*val _ = print_term mem_exp;*) | ||
val (mexp, stores) = birs_simp_instancesLib.dest_BExp_Store_list mem_exp []; | ||
val _ = print ("MEM " ^ (term_to_string mexp) ^ " [\n"); | ||
fun print_store (expad, _, expv) = | ||
let | ||
val expad_s = term_to_string expad; | ||
val expv_s = term_to_string expv; | ||
val expv_s = if String.size expv_s > 100 then "(...)" else expv_s; | ||
val _ = print (" " ^ expad_s ^ "\n -> " ^ expv_s ^ "\n"); | ||
in () end; | ||
val _ = map (print_store) stores; | ||
val _ = print ("]\n"); | ||
in () end; | ||
|
||
(* | ||
val Pis = (get_birs_Pi_list o concl) symb_exec_thm; | ||
val _ = List.map | ||
(fn sys => | ||
let | ||
val _ = print_mem sys; | ||
in () end) | ||
Pis; | ||
*) | ||
|
||
val proc_thm = balrob_supportLib.birs_basic_merge symb_exec_thm; | ||
|
||
val entry_name = "ftop"; | ||
val _ = save_thm("balrob_summary_" ^ entry_name ^ "_thm", proc_thm); | ||
|
||
val _ = export_theory (); |
6,956 changes: 6,956 additions & 0 deletions
6,956
examples/arm_cm0/balrob/balrob_ftop_testScript.sml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
open HolKernel Parse boolLib bossLib; | ||
|
||
open balrob_supportLib; | ||
open birsSyntax; | ||
open birs_utilsLib; | ||
|
||
open balrob_top_testTheory; | ||
|
||
val _ = new_theory "balrob_top_test2"; | ||
|
||
(* | ||
val symb_exec_thm = balrob_test_top_thm3; | ||
val symb_exec_thm = balrob_test_top_thm2; | ||
val symb_exec_thm = balrob_test_top_thm4; | ||
*) | ||
val symb_exec_thm = balrob_test_top_thm; | ||
|
||
fun print_mem sys = | ||
let | ||
val env = dest_birs_state_env sys; | ||
val mappings = get_env_mappings env; | ||
val mappings_ = List.filter ((fn x => x = "MEM") o stringSyntax.fromHOLstring o fst) mappings; | ||
val mem_exp = (snd o hd) mappings_; | ||
(*val _ = print_term mem_exp;*) | ||
val (mexp, stores) = birs_simp_instancesLib.dest_BExp_Store_list mem_exp []; | ||
val _ = print ("MEM " ^ (term_to_string mexp) ^ " [\n"); | ||
fun print_store (expad, _, expv) = | ||
let | ||
val expad_s = term_to_string expad; | ||
val expv_s = term_to_string expv; | ||
val expv_s = if String.size expv_s > 100 then "(...)" else expv_s; | ||
val _ = print (" " ^ expad_s ^ "\n -> " ^ expv_s ^ "\n"); | ||
in () end; | ||
val _ = map (print_store) stores; | ||
val _ = print ("]\n"); | ||
in () end; | ||
|
||
(* | ||
val Pis = (get_birs_Pi_list o concl) symb_exec_thm; | ||
val _ = List.map | ||
(fn sys => | ||
let | ||
val _ = print_mem sys; | ||
in () end) | ||
Pis; | ||
*) | ||
|
||
val proc_thm = balrob_supportLib.birs_basic_merge symb_exec_thm; | ||
|
||
val entry_name = "top"; | ||
val _ = save_thm("balrob_summary_" ^ entry_name ^ "_thm", proc_thm); | ||
|
||
val _ = export_theory (); |
28,652 changes: 28,652 additions & 0 deletions
28,652
examples/arm_cm0/balrob/balrob_top_testScript.sml
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.