summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ocaml_rts/Makefile2
-rw-r--r--lib/ocaml_rts/sail_lib.ml7
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/ocaml_rts/Makefile b/lib/ocaml_rts/Makefile
index eee59dd7..3d837e25 100644
--- a/lib/ocaml_rts/Makefile
+++ b/lib/ocaml_rts/Makefile
@@ -53,7 +53,7 @@ import:
rsync -rv --include "*/" --include="*.ml" --include="*.mli" --exclude="*" $(BITBUCKET_ROOT)/lem/ocaml-lib/ lem
main: import
- ocamlbuild -pkg uint -pkg zarith main.native
+ ocamlbuild -pkg uint -pkg zarith main.native -use-ocamlfind
clean:
rm -r linksem
diff --git a/lib/ocaml_rts/sail_lib.ml b/lib/ocaml_rts/sail_lib.ml
index 249d61fc..c550b2ce 100644
--- a/lib/ocaml_rts/sail_lib.ml
+++ b/lib/ocaml_rts/sail_lib.ml
@@ -28,6 +28,9 @@ let trace str =
let trace_write name str =
trace ("Write: " ^ name ^ " " ^ str)
+let trace_read name str =
+ trace ("Read: " ^ name ^ " " ^ str)
+
let sail_trace_call (type t) (name : string) (in_string : string) (string_of_out : t -> string) (f : _ -> t) =
let module M =
struct exception Return of t end
@@ -444,3 +447,7 @@ let string_of_zbool = function
let string_of_zreal r = Num.string_of_num r
let string_of_zstring str = "\"" ^ String.escaped str ^ "\""
+let rec string_of_list sep string_of = function
+ | [] -> ""
+ | [x] -> string_of x
+ | x::ls -> (string_of x) ^ sep ^ (string_of_list sep string_of ls)