From e4a2b9205daa7dd8a3a05b3a972d00c23f2adc7a Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Mon, 18 Sep 2017 19:01:16 +0100 Subject: Added additional utility functions in ast_util Also fixed basic ocaml test suite --- lib/ocaml_rts/sail_lib.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/ocaml_rts/sail_lib.ml') diff --git a/lib/ocaml_rts/sail_lib.ml b/lib/ocaml_rts/sail_lib.ml index 0602a3d0..6c0a0f64 100644 --- a/lib/ocaml_rts/sail_lib.ml +++ b/lib/ocaml_rts/sail_lib.ml @@ -315,3 +315,5 @@ let shl_int (n, m) = shift_left_big_int n (int_of_big_int m) let shr_int (n, m) = shift_right_big_int n (int_of_big_int m) let debug (str1, n, str2, v) = prerr_endline (str1 ^ string_of_big_int n ^ str2 ^ string_of_bits v) + +let eq_string (str1, str2) = String.compare str1 str2 == 0 -- cgit v1.2.3 From ced56765ec9324a0e690cbb4e790280d17413f99 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Tue, 26 Sep 2017 17:10:06 +0100 Subject: Added while-do and repeat-until loops to sail for translating ASL --- lib/ocaml_rts/sail_lib.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/ocaml_rts/sail_lib.ml') diff --git a/lib/ocaml_rts/sail_lib.ml b/lib/ocaml_rts/sail_lib.ml index 6c0a0f64..a0d6bc5f 100644 --- a/lib/ocaml_rts/sail_lib.ml +++ b/lib/ocaml_rts/sail_lib.ml @@ -317,3 +317,5 @@ let shr_int (n, m) = shift_right_big_int n (int_of_big_int m) let debug (str1, n, str2, v) = prerr_endline (str1 ^ string_of_big_int n ^ str2 ^ string_of_bits v) let eq_string (str1, str2) = String.compare str1 str2 == 0 + +let lt_int (x, y) = lt_big_int x y -- cgit v1.2.3