From f77c8772511be123bf3178ac486bc622d3bab008 Mon Sep 17 00:00:00 2001 From: Peter Sewell Date: Thu, 30 Oct 2014 16:23:50 +0000 Subject: more compact pp of binary values (following verilog literal syntax) (though we still get some long lists of bitzero,bitzero,... in the instruction state printing...) --- src/lem_interp/printing_functions.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lem_interp/printing_functions.ml b/src/lem_interp/printing_functions.ml index 369e55a9..ff6e7770 100644 --- a/src/lem_interp/printing_functions.ml +++ b/src/lem_interp/printing_functions.ml @@ -48,7 +48,8 @@ let bitvec_to_string l = "0b" ^ collapse_leading (String.concat "" (List.map (fu let val_to_string v = match v with | Bitvector(bools, inc, fst)-> let l = List.length bools in - (string_of_int l) ^ " bits -- 0b" ^ collapse_leading (String.concat "" (List.map (function | true -> "1" | _ -> "0") bools)) +(* (string_of_int l) ^ " bits -- 0b" ^ collapse_leading (String.concat "" (List.map (function | true -> "1" | _ -> "0") bools))*) + (string_of_int l) ^ "'b" ^ collapse_leading (String.concat "" (List.map (function | true -> "1" | _ -> "0") bools)) | Bytevector words -> let l = List.length words in (*(string_of_int l) ^ " bytes -- " ^*) "0x" ^ -- cgit v1.2.3