summaryrefslogtreecommitdiff
path: root/src/spec_analysis.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-03-12 18:57:57 +0000
committerAlasdair Armstrong2018-03-12 19:01:19 +0000
commitcf8efbe63da569dadbd99eb35c1e4777fa06bc30 (patch)
tree936406a74fb05b55f0f329cc0ee9027806c330b7 /src/spec_analysis.ml
parenta6d59b97a4840b81481751e0e05b1da9ed28de86 (diff)
ELF loading for C backend
Add a flag to Sail that allows for an image of an elf file to be dumped in a simple format using linksem, used as sail -elf test.elf -o test.bin This image file can then be used by a compiled C version of a sail spec as with ocaml simply by ./a.out test.bin
Diffstat (limited to 'src/spec_analysis.ml')
-rw-r--r--src/spec_analysis.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/spec_analysis.ml b/src/spec_analysis.ml
index 74312d9b..97b634da 100644
--- a/src/spec_analysis.ml
+++ b/src/spec_analysis.ml
@@ -568,14 +568,14 @@ let add_def_to_graph (prelude, original_order, defset, graph) d =
let print_dot graph component : unit =
match component with
| root :: _ ->
- print_endline ("// Dependency cycle including " ^ root);
- print_endline ("digraph cycle_" ^ root ^ " {");
+ prerr_endline ("// Dependency cycle including " ^ root);
+ prerr_endline ("digraph cycle_" ^ root ^ " {");
List.iter (fun caller ->
- let print_edge callee = print_endline (" \"" ^ caller ^ "\" -> \"" ^ callee ^ "\";") in
+ let print_edge callee = prerr_endline (" \"" ^ caller ^ "\" -> \"" ^ callee ^ "\";") in
Namemap.find caller graph
|> Nameset.filter (fun id -> List.mem id component)
|> Nameset.iter print_edge) component;
- print_endline "}"
+ prerr_endline "}"
| [] -> ()
let def_of_component graph defset comp =