[ocaml] detect and kill dead modules

Summary:
Add warning 60 (unused module) to the list of fatal warnings. Whitelisting
modules at toplevel is tricky (see inline comments) but doable.

Reviewed By: mbouaziz

Differential Revision: D7790073

fbshipit-source-id: 6f591c4
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent e0a61c0a4a
commit ce0ffaf877

@ -10,7 +10,6 @@
(** The Smallfoot Intermediate Language: Annotations *)
open! IStd
module L = Logging
module F = Format
type parameters = string list [@@deriving compare]
@ -33,14 +32,6 @@ let pp fmt annotation =
(String.concat ~sep:"," annotation.parameters)
module Map = PrettyPrintable.MakePPMap (struct
type nonrec t = t
let compare = compare
let pp = pp
end)
module Item = struct
(* Don't use nonrec due to https://github.com/janestreet/ppx_compare/issues/2 *)
(* type nonrec t = list (t, bool) [@@deriving compare]; *)

@ -29,8 +29,6 @@ val final : t
val pp : F.formatter -> t -> unit
(** Pretty print an annotation. *)
module Map : PrettyPrintable.PPMap with type key = t
module Item : sig
(** Annotation for one item: a list of annotations with visibility. *)
type nonrec t = (t * bool) list [@@deriving compare]

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
type attributes_kind = ProcUndefined | ProcObjCAccessor | ProcDefined [@@deriving compare]

@ -10,8 +10,6 @@
(** The Smallfoot Intermediate Language: Binary Operators *)
open! IStd
module L = Logging
module F = Format
(** Binary operations *)
type t =

@ -10,8 +10,6 @@
(** The Smallfoot Intermediate Language: Binary Operators *)
open! IStd
module L = Logging
module F = Format
(** Binary operations *)
type t =

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Call Flags *)
open! IStd
module L = Logging
module F = Format
(** Flags for a procedure call *)

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Call Flags *)
open! IStd
module L = Logging
module F = Format
(** Flags for a procedure call *)

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Constants *)
open! IStd
module L = Logging
module F = Format
type t =

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Constants *)
open! IStd
module L = Logging
module F = Format
(** Constants *)

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Decompiled Expressions *)
open! IStd
module L = Logging
module F = Format
(** expression representing the result of decompilation *)

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Decompiled Expressions *)
open! IStd
module L = Logging
module F = Format
(** expression representing the result of decompilation *)

@ -12,7 +12,6 @@
open! IStd
module Hashtbl = Caml.Hashtbl
module L = Logging
module F = Format
(* reverse the natural order on Var *)

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Expressions *)
open! IStd
module L = Logging
module F = Format
type closure = {name: Typ.Procname.t; captured_vars: (t * Pvar.t * Typ.t) list}

@ -12,7 +12,6 @@
open! IStd
module Hashtbl = Caml.Hashtbl
module L = Logging
module F = Format
module Name = struct

@ -63,9 +63,6 @@ val knormal : kind
val kfootprint : kind
(** hash table with names as keys *)
module NameHash : Caml.Hashtbl.S with type key = name
val name_spec : name
(** Name used for spec variables *)

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Predicate Symbols *)
open! IStd
module L = Logging
module F = Format
(** {2 Programs and Types} *)

@ -11,7 +11,6 @@
open! IStd
module Hashtbl = Caml.Hashtbl
module L = Logging
module F = Format
(** flags for a procedure *)

@ -174,7 +174,13 @@ module type NameCommon = sig
accepts ALL function arguments, binds the function *)
end
module ProcName : NameCommon with type 'f dispatcher = Typ.Procname.t -> 'f option
(* ocaml ignores the warning suppression at toplevel, hence the [include struct ... end] trick *)
include sig
[@@@warning "-60"]
module ProcName : NameCommon with type 'f dispatcher = Typ.Procname.t -> 'f option
end
module TypName : NameCommon with type 'f dispatcher = Typ.name -> 'f option

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
exception ParseError of string

@ -234,9 +234,6 @@ let is_static_local_name pname pvar =
match Str.split_delim (Str.regexp_string pname) var_name with [_; _] -> true | _ -> false
(** {2 Sets of expressions} *)
let elist_to_eset es = List.fold ~f:(fun set e -> Exp.Set.add e set) ~init:Exp.Set.empty es
(** {2 Sets of heap predicates} *)
module HpredSet = Caml.Set.Make (struct
type t = hpred

@ -14,9 +14,6 @@ module F = Format
(** {2 Programs and Types} *)
val elist_to_eset : Exp.t list -> Exp.Set.t
(** Convert expression lists to expression sets. *)
(** Kind of prune instruction *)
type if_kind =
| Ik_bexp (** boolean expressions, and exp ? exp : exp *)

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Subtypes *)
open! IStd
module L = Logging
module F = Format
let list_to_string list =

@ -11,7 +11,6 @@
(** The Smallfoot Intermediate Language: Subtypes *)
open! IStd
module L = Logging
module F = Format
type t [@@deriving compare]

@ -155,8 +155,6 @@ module T = struct
let equal_template_arg = [%compare.equal : template_arg]
let equal = [%compare.equal : t]
let hash = Hashtbl.hash
end
include T
@ -482,11 +480,6 @@ module Name = struct
end)
end
(** {2 Sets and maps of types} *)
module Set = Caml.Set.Make (T)
module Map = Caml.Map.Make (T)
module Tbl = Hashtbl.Make (T)
(** dump a type with all the details. *)
let d_full (t: t) = L.add_print_action (L.PTtyp_full, Obj.repr t)

@ -230,16 +230,6 @@ val sub_tname : type_subst_t -> Name.t -> Name.t
val is_type_subst_empty : type_subst_t -> bool
(** Sets of types. *)
module Set : Caml.Set.S with type elt = t
(** Maps with type keys. *)
module Map : Caml.Map.S with type key = t
module Tbl : Caml.Hashtbl.S with type key = t
val pp_full : Pp.env -> F.formatter -> t -> unit
(** Pretty print a type with all the details. *)
@ -451,8 +441,6 @@ module Procname : sig
val equal : t -> t -> bool
(** Hash tables with proc names as keys. *)
module Hashable : Caml.Hashtbl.HashedType with type t = t
module Hash : Caml.Hashtbl.S with type key = t
(** Maps from proc names. *)

@ -11,8 +11,6 @@
(** The Smallfoot Intermediate Language: Unary Operators *)
open! IStd
module L = Logging
module F = Format
(** Unary operations *)
type t =

@ -11,8 +11,6 @@
(** The Smallfoot Intermediate Language: Unary Operators *)
open! IStd
module L = Logging
module F = Format
(** Unary operations *)
type t =

@ -61,10 +61,16 @@ module BottomLifted (Domain : S) : sig
end
(** Create a domain with Top element from a pre-domain *)
module TopLifted (Domain : S) : sig
type astate = Domain.astate top_lifted
include sig
(* ocaml ignores the warning suppression at toplevel, hence the [include struct ... end] trick *)
include WithTop with type astate := astate
[@@@warning "-60"]
module TopLifted (Domain : S) : sig
type astate = Domain.astate top_lifted
include WithTop with type astate := astate
end
end
(** Cartesian product of two domains. *)
@ -120,7 +126,13 @@ end
(** Boolean domain ordered by p || ~q. Useful when you want a boolean that's true only when it's
true in both conditional branches. *)
module BooleanAnd : S with type astate = bool
include sig
(* ocaml ignores the warning suppression at toplevel, hence the [include struct ... end] trick *)
[@@@warning "-60"]
module BooleanAnd : S with type astate = bool
end
(** Boolean domain ordered by ~p || q. Useful when you want a boolean that's true only when it's
true in one conditional branch. *)

@ -11,9 +11,6 @@ open! IStd
(** Module for user-defined checkers. *)
module L = Logging
module F = Format
(** State that persists in the .specs files. *)
module ST = struct
let report_error tenv proc_name proc_desc kind loc ?(field_name= None) ?(origin_loc= None)

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
type t = int AccessPath.BaseMap.t

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
(** a map from a formal to its positional index *)
type t

@ -8,8 +8,6 @@
*)
open! IStd
module L = Logging
module F = Format
(** Simplified html node printer for checkers *)

@ -11,9 +11,6 @@ open! IStd
(** Module for Pattern matching. *)
module L = Logging
module F = Format
let type_is_object typ =
match typ.Typ.desc with
| Tptr ({desc= Tstruct name}, _) ->

@ -8,8 +8,6 @@
*)
open! IStd
module F = Format
module L = Logging
module type S = sig
module CFG : ProcCfg.S

@ -11,7 +11,6 @@
(** Main module for the analysis after the capture phase *)
open! IStd
module L = Logging
module F = Format
(** Create tasks to analyze an execution environment *)
let analyze_exe_env_tasks cluster exe_env : Tasks.t =

@ -8,7 +8,6 @@
*)
open! IStd
module F = Format
module L = Logging
type closure = unit -> unit

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
(** Module to register and invoke callbacks *)

@ -8,7 +8,6 @@
*)
open! IStd
module L = Logging
module F = Format
(** Module to process clusters of procedures. *)

@ -8,9 +8,7 @@
*)
open! IStd
module L = Logging
module F = Format
module CLOpt = CommandLineOption
(** Module to create a makefile with dependencies between clusters *)

@ -9,12 +9,10 @@
*)
open! IStd
module Hashtbl = Caml.Hashtbl
(** Support for Execution environments *)
module L = Logging
module F = Format
(** per-file data: type environment and cfg *)
type file_data = {source: SourceFile.t; mutable tenv: Tenv.t option; mutable cfg: Cfg.t option}

@ -10,7 +10,6 @@
open! IStd
open PolyVariantEqual
module L = Logging
module F = Format
(** Module to merge the results of capture for different buck targets. *)

@ -10,7 +10,6 @@
open! IStd
open PolyVariantEqual
module Hashtbl = Caml.Hashtbl
(** Specifications and spec table *)

@ -9,7 +9,6 @@
*)
open! IStd
module CLOpt = CommandLineOption
(** Configuration values: either constant, determined at compile time, or set at startup
time by system calls, environment variables, or command line options *)

@ -13,7 +13,6 @@ open PolyVariantEqual
(** Database of analysis results *)
module F = Format
module L = Logging
let cutoff_length = 100
@ -86,14 +85,6 @@ let filename_add_suffix fn s = fn ^ s
let file_exists path = Sys.file_exists path = `Yes
module FilenameSet = Caml.Set.Make (struct
type t = filename [@@deriving compare]
end)
module FilenameMap = Caml.Map.Make (struct
type t = filename [@@deriving compare]
end)
(** Return the time when a file was last modified. The file must exist. *)
let file_modified_time ?(symlink= false) fname =
try

@ -17,10 +17,6 @@ open! IStd
(** generic file name *)
type filename [@@deriving compare]
module FilenameSet : Caml.Set.S with type elt = filename
module FilenameMap : Caml.Map.S with type key = filename
val filename_from_string : string -> filename
val filename_to_string : filename -> string

@ -8,7 +8,6 @@
*)
open! IStd
module F = Format
module L = Logging
(** Location in the original source file *)
type t =

@ -8,7 +8,6 @@
*)
open! IStd
open PolyVariantEqual
module CLOpt = CommandLineOption
module L = Logging
let results_dir_dir_markers = [Config.results_dir ^/ Config.specs_dir_name]

@ -10,7 +10,6 @@
open! IStd
module L = Logging
module F = Format
(** Generic serializer *)
type 'a serializer =

@ -9,7 +9,6 @@
open! IStd
open PolyVariantEqual
module L = Logging
type zip_library = {zip_filename: string; zip_channel: Zip.in_file Lazy.t; models: bool}

@ -13,7 +13,6 @@ open! IStd
(** Implementation of Abstraction Functions *)
module L = Logging
module F = Format
(** {2 Abstraction} *)
@ -932,15 +931,6 @@ let abstract_gc tenv p =
Prop.prop_iter_to_prop tenv (Prop.prop_iter_gc_fields iter)
(** maps from identifiers *)
module IdMap = Caml.Map.Make (Ident)
module HpredSet = Caml.Set.Make (struct
type t = Sil.hpred
let compare = Sil.compare_hpred ~inst:false
end)
(** find the id's in sigma reachable from the given roots *)
let sigma_reachable root_fav sigma =
let reach_set = ref root_fav in

@ -13,7 +13,6 @@ open! IStd
(** Abstraction for Arrays *)
module L = Logging
module F = Format
type sigma = Sil.hpred list

@ -12,9 +12,6 @@ open! IStd
(** Attribute manipulation in Propositions (i.e., Symbolic Heaps) *)
module L = Logging
module F = Format
(** Check whether an atom is used to mark an attribute *)
let is_pred atom = match atom with Sil.Apred _ | Anpred _ -> true | _ -> false

@ -12,9 +12,6 @@ open! IStd
(** Attribute manipulation in Propositions (i.e., Symbolic Heaps) *)
module L = Logging
module F = Format
val is_pred : Sil.atom -> bool
(** Check whether an atom is used to mark an attribute *)

@ -13,7 +13,6 @@ open! IStd
(** Classify bugs into buckets *)
module L = Logging
module F = Format
let verbose = Config.trace_error

@ -13,7 +13,6 @@ open! IStd
open SymExec
module L = Logging
module F = Format
type t = Builtin.registered

@ -14,7 +14,6 @@ module Hashtbl = Caml.Hashtbl
(** Operators for the abstract domain. In particular, join and meet. *)
module L = Logging
module F = Format
let ( ++ ) = IntLit.add
@ -59,12 +58,6 @@ let opposite side = match side with Lhs -> Rhs | Rhs -> Lhs
let do_side side f e1 e2 = match side with Lhs -> f e1 e2 | Rhs -> f e2 e1
(** {2 Sets for expression pairs} *)
module EPset = Caml.Set.Make (struct
type t = Exp.t * Exp.t [@@deriving compare]
end)
(** {2 Module for maintaining information about noninjectivity during join} *)
module NonInj : sig
@ -356,49 +349,6 @@ end = struct
CheckJoinPost.add side e1 e2
end
module CheckMeet : InfoLossCheckerSig = struct
let lexps1 = ref Exp.Set.empty
let lexps2 = ref Exp.Set.empty
let init sigma1 sigma2 =
let lexps1_lst = Sil.hpred_list_get_lexps (fun _ -> true) sigma1 in
let lexps2_lst = Sil.hpred_list_get_lexps (fun _ -> true) sigma2 in
lexps1 := Sil.elist_to_eset lexps1_lst ;
lexps2 := Sil.elist_to_eset lexps2_lst
let final () =
lexps1 := Exp.Set.empty ;
lexps2 := Exp.Set.empty
let lost_little side e es =
let lexps = match side with Lhs -> !lexps1 | Rhs -> !lexps2 in
match (es, e) with
| [], _ ->
true
| [Exp.Const _], Exp.Lvar _ ->
false
| [Exp.Const _], Exp.Var _ ->
not (Exp.Set.mem e lexps)
| [Exp.Const _], _ ->
assert false
| [_], Exp.Lvar _ | [_], Exp.Var _ ->
true
| [_], _ ->
assert false
| _, Exp.Lvar _ | _, Exp.Var _ ->
false
| _, Exp.Const _ ->
assert false
| _ ->
assert false
let add = NonInj.add
end
(** {2 Module for worklist} *)
module Todo : sig

@ -13,7 +13,6 @@ open! IStd
(** Functions for "Smart" Pattern Matching *)
module L = Logging
module F = Format
let mem_idlist i l = List.exists ~f:(Ident.equal i) l

@ -12,9 +12,6 @@ open! IStd
(** Functions for Propositions (i.e., Symbolic Heaps) *)
module L = Logging
module F = Format
(** {2 Sets of Propositions} *)
module PropSet = Caml.Set.Make (struct

@ -13,7 +13,6 @@ open! IStd
(** Re-arrangement and extension of structures with fresh variables *)
module L = Logging
module F = Format
let list_product l1 l2 =
let l1' = List.rev l1 in

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open! IStd
module L = Logging
module F = Format
module MF = MarkupFormatter
let desc_retain_cycle tenv (cycle: RetainCyclesType.t) =

@ -12,9 +12,6 @@ open! IStd
(** State of symbolic execution *)
module L = Logging
module F = Format
(** failure statistics for symbolic execution on a given node *)
type failure_stats =
{ mutable instr_fail: int

@ -9,7 +9,6 @@
open! IStd
module L = Logging
module F = Format
(** Handle timeout events *)

@ -15,8 +15,6 @@ open AbsLoc
open! AbstractDomain.Types
module F = Format
module L = Logging
module ItvPure = Itv.ItvPure
module MF = MarkupFormatter
module PO = BufferOverrunProofObligations
module Trace = BufferOverrunTrace
module TraceSet = Trace.Set
@ -281,10 +279,6 @@ module Stack = struct
end
module Heap = struct
module PPMap = struct
include PrettyPrintable.MakePPMap (Loc)
end
include AbstractDomain.Map (Loc) (Val)
let bot = empty

@ -13,10 +13,6 @@
open! IStd
open AbsLoc
open! AbstractDomain.Types
module F = Format
module L = Logging
module Trace = BufferOverrunTrace
module TraceSet = Trace.Set
open BufferOverrunDomain
let eval_const : Const.t -> Val.t = function

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
module Domain = LithoDomain
module Summary = Summary.Make (struct

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
module LocalAccessPath = struct
type t = {access_path: AccessPath.t; parent: Typ.Procname.t} [@@deriving compare]

@ -10,7 +10,6 @@
open! IStd
module F = Format
module L = Logging
module FieldsAssignedInConstructors = AbstractDomain.FiniteSet (struct
type t = Typ.Fieldname.t * Typ.t [@@deriving compare]
@ -66,7 +65,6 @@ end
(* Tracks when block variables of ObjC classes have been assigned to in constructors *)
module FieldsAssignedInConstructorsChecker =
AbstractInterpreter.Make (ProcCfg.Normal) (TransferFunctions)
module AnalysisCfg = ProcCfg.Normal
let add_annot annot annot_name = ({Annot.class_name= annot_name; parameters= []}, true) :: annot

@ -8,7 +8,6 @@
*)
open! IStd
module F = Format
type t [@@deriving compare]

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
module type Kind = sig
include TraceElem.Kind

@ -11,8 +11,6 @@ open! IStd
module VarNames : module type of AbstractDomain.FiniteSet (String)
module BottomSiofTrace : module type of AbstractDomain.BottomLifted (SiofTrace)
(* The domain for the analysis is:
- On the one hand, sets of global variables if an initialization is needed at runtime, or Bottom

@ -10,7 +10,6 @@
open! IStd
open PolyVariantEqual
module F = Format
module L = Logging
module GlobalVar = struct
include Pvar

@ -10,7 +10,6 @@
(** Module for parsing stack traces and using them to guide Infer analysis *)
open! IStd
module F = Format
module L = Logging
type frame = {class_str: string; method_str: string; file_str: string; line_num: int option}

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
module type Spec = sig
module Source : Source.S

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
module type Spec = sig
module Source : Source.S

@ -8,7 +8,6 @@
*)
open! IStd
module F = Format
module Set = struct
module APSet = PrettyPrintable.MakePPSet (AccessPath.Abs)

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
module type S = sig
module TraceDomain : AbstractDomain.WithBottom

@ -8,8 +8,6 @@
*)
open! IStd
module L = Logging
module F = Format
(** Android lifecycle types and their lifecycle methods that are called by the framework *)

@ -8,8 +8,6 @@
*)
open! IStd
module F = Format
module L = Logging
(** Annotations. *)

@ -9,7 +9,8 @@
open! IStd
module F = Format
(* Map (node,instr) -> basic cost *)
(** Map (node,instr) -> basic cost *)
module NodeInstructionToCostMap = AbstractDomain.MapOfPPMap (ProcCfg.InstrNode.IdMap) (Itv.Bound)
module EnvMap = AbstractDomain.Map (Exp) (Itv)
module EnvDomainBO = AbstractDomain.BottomLifted (EnvMap)

@ -11,8 +11,6 @@ open! IStd
(** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *)
module P = Printf
let report_error fragment_typ fld fld_typ summary pdesc =
let pname = Procdesc.get_proc_name pdesc in
let description = Localise.desc_fragment_retains_view fragment_typ fld fld_typ pname in

@ -8,8 +8,6 @@
*)
open! IStd
module L = Logging
module F = Format
(** Check an implicit cast when returning an immutable collection from a method whose type is mutable. *)
let check_immutable_cast tenv curr_pname curr_pdesc typ_expected typ_found_opt loc : unit =

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
(** backward analysis for computing set of maybe-live variables at each program point *)

@ -9,7 +9,6 @@
open! IStd
module L = Logging
module F = Format
type printf_signature =
{unique_id: string; format_pos: int; fixed_pos: int list; vararg_pos: int option}

@ -11,7 +11,6 @@ open! IStd
(** Module for registering checkers. *)
module L = Logging
module F = Format
(* make sure SimpleChecker.ml is not dead code *)

@ -16,7 +16,6 @@ module D =
UninitDomain.Domain
module UninitVars = AbstractDomain.FiniteSet (AccessPath)
module AliasedVars = AbstractDomain.FiniteSet (UninitDomain.VarPair)
module PrePost = AbstractDomain.Pair (D) (D)
module RecordDomain = UninitDomain.Record (UninitVars) (AliasedVars) (D)
module Summary = Summary.Make (struct

@ -9,7 +9,6 @@
open! IStd
module F = Format
module L = Logging
(** Forward analysis to compute uninitialized variables at each program point *)
module Domain = AbstractDomain.InvertedSet (AccessPath)

@ -11,8 +11,6 @@ open! IStd
(** Processes types and record declarations by adding them to the tenv *)
module L = Logging
let add_predefined_objc_types tenv =
ignore (Tenv.mk_struct tenv (CType_to_sil_type.get_builtin_objc_typename `ObjCClass)) ;
ignore (Tenv.mk_struct tenv (CType_to_sil_type.get_builtin_objc_typename `ObjCId))

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open! IStd
module CLOpt = CommandLineOption
module F = Format
module L = Logging
(** enable debug mode (to get more data saved to disk for future inspections) *)

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open! IStd
module F = Format
let log_caught_exception (trans_unit_ctx: CFrontend_config.translation_unit_context) exception_type
exception_triggered_location (source_location_start, source_location_end) ast_node =

@ -10,7 +10,6 @@
(** This module creates extra ast constructs that are needed for the translation *)
open! IStd
module L = Logging
let stmt_info_with_fresh_pointer stmt_info =
{ Clang_ast_t.si_pointer= CAst_utils.get_fresh_pointer ()

@ -13,7 +13,6 @@ open PolyVariantEqual
(** Functions for transformations of ast nodes *)
module L = Logging
module F = Format
type qual_type_to_sil_type = Tenv.t -> Clang_ast_t.qual_type -> Typ.t

@ -14,7 +14,6 @@ module Hashtbl = Caml.Hashtbl
(** and the cg, cfg, and tenv corresponding to the current file. *)
module L = Logging
module StmtMap = ClangPointers.Map
type pointer = int [@@deriving compare]

@ -10,9 +10,15 @@
open! IStd
module L = Logging
module rec CTransImpl : CModule_type.CTranslation = CTrans.CTrans_funct (CFrontend_declImpl)
(* ocamlc gets confused by [module rec]: https://caml.inria.fr/mantis/view.php?id=6714 *)
(* it also ignores the warning suppression at toplevel, hence the [include struct ... end] trick *)
include struct
[@@@warning "-60"]
and CFrontend_declImpl : CModule_type.CFrontend = CFrontend_decl.CFrontend_decl_funct (CTransImpl)
module rec CTransImpl : CModule_type.CTranslation = CTrans.CTrans_funct (CFrontend_declImpl)
and CFrontend_declImpl : CModule_type.CFrontend = CFrontend_decl.CFrontend_decl_funct (CTransImpl)
end
(* Translates a file by translating the ast into a cfg. *)
let compute_icfg trans_unit_ctx tenv ast =

@ -11,9 +11,6 @@ open! IStd
(** General utility functions such as functions on lists *)
module L = Logging
module F = Format
type var_info = Clang_ast_t.decl_info * Clang_ast_t.qual_type * Clang_ast_t.var_decl_info * bool
let rec swap_elements_list l =

@ -13,8 +13,6 @@ open! IStd
(** Computes the local variables of a function or method to be added to the procdesc *)
module L = Logging
let is_custom_var_pointer pointer = pointer <= 0
let sil_var_of_decl context var_decl procname =

@ -8,7 +8,6 @@
*)
open! IStd
module L = Logging
module CTLFormulaSet = Caml.Set.Make (CTL)
module ClosureHashtbl = Caml.Map.Make (struct

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
module CTLFormulaSet : Caml.Set.S with type elt = CTL.t
module ClosureHashtbl : Caml.Map.S with type key = CTL.t
type context_linter_map = bool ClosureHashtbl.t

@ -272,15 +272,6 @@ module Attribute = struct
F.fprintf fmt "Functional"
| Choice choice ->
Choice.pp fmt choice
module Set = PrettyPrintable.MakePPSet (struct
type nonrec t = t
let compare = compare
let pp = pp
end)
end
module AttributeSetDomain = AbstractDomain.InvertedSet (Attribute)

@ -139,8 +139,6 @@ module Attribute : sig
[@@deriving compare]
val pp : F.formatter -> t -> unit
module Set : PrettyPrintable.PPSet with type elt = t
end
module AttributeSetDomain : module type of AbstractDomain.InvertedSet (Attribute)

@ -30,8 +30,6 @@ module LockEvent : sig
include PrettyPrintable.PrintableOrderedType with type t := t
end
module LockState : AbstractDomain.WithBottom
(** Represents either
- the existence of a program path from the current method to the eventual acquisition of a lock
("eventually"), or,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save