From 3ab947ce345e9d18ddcda57d8f88b2a9b8f5d267 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Mon, 12 Oct 2015 11:48:36 +0200 Subject: Removal of cchecklink, superseded by AbsInt's Valex tool. --- checklink/Bitstring_utils.ml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 checklink/Bitstring_utils.ml (limited to 'checklink/Bitstring_utils.ml') diff --git a/checklink/Bitstring_utils.ml b/checklink/Bitstring_utils.ml deleted file mode 100644 index 3218f898..00000000 --- a/checklink/Bitstring_utils.ml +++ /dev/null @@ -1,33 +0,0 @@ -(** Note that a bitstring is a triple (string * int * int), where the string - contains the contents (the last char is filled up with zeros if necessary), - the firts int gives the first bit to consider, and the second int gives the - bit length of the considered bitstring. -*) -type bitstring = Bitstring.bitstring - -(** Checks whether a given number of bits of a bitstring are zeroed. The - bitstring may be longer. - @param size number of bits to check -*) - -let is_zeros (bs: bitstring) (size: int): bool = - Bitstring.bitstring_length bs >= size - && Bitstring.is_zeroes_bitstring (Bitstring.subbitstring bs 0 size) - -(* - -let rec is_zeros (bs: bitstring) (size: int): bool = - size = 0 || - if size >= 64 - then ( - bitmatch bs with - | { 0L : 64 : int ; rest : -1 : bitstring } -> - is_zeros rest (size - 64) - | { _ } -> false - ) - else ( - bitmatch bs with - | { 0L : size : int } -> true - | { _ } -> false - ) -*) -- cgit