summaryrefslogtreecommitdiff
path: root/src/process_file.ml
diff options
context:
space:
mode:
authorChristopher Pulte2015-10-28 12:09:28 +0000
committerChristopher Pulte2015-10-28 12:09:28 +0000
commit91a38a0dbcac11574768ff2fa2cb180d8d897487 (patch)
tree96345da4636839e26a80678a22b1b4003310e632 /src/process_file.ml
parentea3171159c61ce03c76aef37b472ba9da2d932c7 (diff)
progress on lem backend: auto-generate read_register and write_register functions, and state definition
Diffstat (limited to 'src/process_file.ml')
-rw-r--r--src/process_file.ml21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/process_file.ml b/src/process_file.ml
index 135f0931..1a776cff 100644
--- a/src/process_file.ml
+++ b/src/process_file.ml
@@ -173,14 +173,21 @@ let output1 libpath out_arg filename defs (* alldoc_accum alldoc_inc_accum alldo
close_output_with_check ext_o
end
| Lem_out None ->
- let ((o,temp_file_name, _) as ext_o) = open_output_with_check_unformatted (f' ^ "embed.lem") in
- begin Pretty_print.pp_defs_lem o defs (generated_line filename) ["Sail_values";];
- close_output_with_check ext_o
- end
+ let ((o1,_, _) as ext_o1) =
+ open_output_with_check_unformatted ("arch.lem") in
+ let ((o2,_, _) as ext_o2) =
+ open_output_with_check_unformatted (f' ^ "embed.lem") in
+ Pretty_print.pp_defs_lem o1 o2 defs (generated_line filename) ["Sail_values"];
+ close_output_with_check ext_o1;
+ close_output_with_check ext_o2
| Lem_out (Some lib) ->
- let ((o,temp_file_name, _) as ext_o) = open_output_with_check_unformatted (f' ^ "embed.lem") in
- Pretty_print.pp_defs_lem o defs (generated_line filename) ["Sail_values"; lib];
- close_output_with_check ext_o
+ let ((o1,_, _) as ext_o1) =
+ open_output_with_check_unformatted ("arch.lem") in
+ let ((o2,_, _) as ext_o2) =
+ open_output_with_check_unformatted (f' ^ "embed.lem") in
+ Pretty_print.pp_defs_lem o1 o2 defs (generated_line filename) ["Sail_values"; lib];
+ close_output_with_check ext_o1;
+ close_output_with_check ext_o2
| Ocaml_out None ->
let ((o,temp_file_name, _) as ext_o) = open_output_with_check_unformatted (f' ^ ".ml") in
begin Pretty_print.pp_defs_ocaml o defs (generated_line filename) ["Big_int_Z";"Sail_values"];