diff --git a/src/data/CCBV.ml b/src/data/CCBV.ml index ac31693c..aa91dca7 100644 --- a/src/data/CCBV.ml +++ b/src/data/CCBV.ml @@ -300,3 +300,10 @@ let of_seq seq = |> CCList.of_seq |> List.sort CCOrd.compare = CCList.range 0 10 *) +let print out bv = + Format.pp_print_string out "bv {"; + iter bv + (fun _i b -> + Format.pp_print_char out (if b then '1' else '0') + ); + Format.pp_print_string out "}" diff --git a/src/data/CCBV.mli b/src/data/CCBV.mli index f3ffd3bb..2c0b35f0 100644 --- a/src/data/CCBV.mli +++ b/src/data/CCBV.mli @@ -113,3 +113,7 @@ type 'a sequence = ('a -> unit) -> unit val to_seq : t -> int sequence val of_seq : int sequence -> t + +val print : Format.formatter -> t -> unit +(** Print the bitvector + @since NEXT_RELEASE *)