From cf8efbe63da569dadbd99eb35c1e4777fa06bc30 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Mon, 12 Mar 2018 18:57:57 +0000 Subject: 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 --- src/spec_analysis.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/spec_analysis.ml') 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 = -- cgit v1.2.3