From 879f8d6fe89d860c8340acc012b33a884b2edc2e Mon Sep 17 00:00:00 2001 From: Sungkeun Cho Date: Fri, 14 Dec 2018 03:44:16 -0800 Subject: [PATCH] [inferbo] Remove deadcode Reviewed By: mbouaziz Differential Revision: D13463856 fbshipit-source-id: f6a9c4328 --- infer/src/bufferoverrun/arrayBlk.ml | 2 -- infer/src/bufferoverrun/bounds.ml | 4 ---- infer/src/bufferoverrun/bounds.mli | 2 -- infer/src/bufferoverrun/itv.ml | 4 ---- infer/src/bufferoverrun/itv.mli | 2 -- 5 files changed, 14 deletions(-) diff --git a/infer/src/bufferoverrun/arrayBlk.ml b/infer/src/bufferoverrun/arrayBlk.ml index 19c0e7350..ebc791ea3 100644 --- a/infer/src/bufferoverrun/arrayBlk.ml +++ b/infer/src/bufferoverrun/arrayBlk.ml @@ -125,8 +125,6 @@ let offsetof : t -> Itv.t = fun a -> fold (fun _ arr -> Itv.join arr.ArrInfo.off let sizeof : t -> Itv.t = fun a -> fold (fun _ arr -> Itv.join arr.ArrInfo.size) a Itv.bot -let strideof : t -> Itv.t = fun a -> fold (fun _ arr -> Itv.join arr.ArrInfo.stride) a Itv.bot - let sizeof_byte : t -> Itv.t = fun a -> fold (fun _ arr -> Itv.join (Itv.mult arr.ArrInfo.size arr.ArrInfo.stride)) a Itv.bot diff --git a/infer/src/bufferoverrun/bounds.ml b/infer/src/bufferoverrun/bounds.ml index bcce81794..211f3b440 100644 --- a/infer/src/bufferoverrun/bounds.ml +++ b/infer/src/bufferoverrun/bounds.ml @@ -440,10 +440,6 @@ module Bound = struct let is_const : t -> bool = function Linear (_, se) -> SymLinear.is_zero se | _ -> false - let eq_const : Z.t -> t -> bool = - fun z -> function Linear (z', se) -> SymLinear.is_zero se && Z.(equal z' z) | _ -> false - - let neg : t -> t = function | MInf -> PInf diff --git a/infer/src/bufferoverrun/bounds.mli b/infer/src/bufferoverrun/bounds.mli index 81b707a88..56608c1f4 100644 --- a/infer/src/bufferoverrun/bounds.mli +++ b/infer/src/bufferoverrun/bounds.mli @@ -83,8 +83,6 @@ module Bound : sig val is_const : t -> Z.t sexp_option - val eq_const : Z.t -> t -> bool - val plus_l : t -> t -> t val plus_u : t -> t -> t diff --git a/infer/src/bufferoverrun/itv.ml b/infer/src/bufferoverrun/itv.ml index e3479dddf..79ed339dc 100644 --- a/infer/src/bufferoverrun/itv.ml +++ b/infer/src/bufferoverrun/itv.ml @@ -147,8 +147,6 @@ module ItvPure = struct None - let eq_const : Z.t -> t -> bool = fun z (l, u) -> Bound.eq_const z l && Bound.eq_const z u - let is_zero : t -> bool = fun (l, u) -> Bound.is_zero l && Bound.is_zero u let is_one : t -> bool = fun (l, u) -> Bound.eq l Bound.one && Bound.eq u Bound.one @@ -563,8 +561,6 @@ let is_one = bind1bool ItvPure.is_one let is_mone = bind1bool ItvPure.is_mone -let eq_const : Z.t -> t -> bool = fun z -> bind1bool (ItvPure.eq_const z) - let neg : t -> t = lift1 ItvPure.neg let lnot : t -> Boolean.t = bind1b ItvPure.lnot diff --git a/infer/src/bufferoverrun/itv.mli b/infer/src/bufferoverrun/itv.mli index c675e3089..9b0db3b53 100644 --- a/infer/src/bufferoverrun/itv.mli +++ b/infer/src/bufferoverrun/itv.mli @@ -141,8 +141,6 @@ val is_one : t -> bool val is_mone : t -> bool -val eq_const : Z.t -> t -> bool - val lb : t -> Bound.t val ub : t -> Bound.t