Open Utils implicitly

Summary: public

Reviewed By: jvillard

Differential Revision: D2938316

fb-gh-sync-id: c6aa6c9
shipit-source-id: c6aa6c9
master
Josh Berdine 9 years ago committed by facebook-github-bot-7
parent 8a9f221119
commit b155168083

@ -18,3 +18,7 @@ us a line at cla@fb.com. Thanks!
`infer/tests/codetoanalyze/` and
`infer/tests/{endtoend,frontend}/`. To run the all tests, execute
`./scripts/test.sh`.
## Hacking
* Be aware that the build system implicitly opens the Utils module.

@ -97,6 +97,7 @@ OCAMLBUILD_OPTIONS = \
-cflags -w,@38 \
-cflags -w,@39 \
-tag-line "<*clang/clang_ast_*>: warn(-35-39)" \
-tag-line "not <**/{config,iList,utils}.*>: open(Utils)" \
-lflags $(OCAML_INCLUDES) \
-cflags $(OCAML_INCLUDES) \
$(addprefix -lib ,$(OCAML_LIBS)) \

@ -10,7 +10,6 @@
(** Database of analysis results *)
open Utils
module F = Format
module L = Logging

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(** {2 Abstraction} *)

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
type sigma = Sil.hpred list

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module F = Format
module L = Logging

@ -10,7 +10,6 @@
(** Generate unit tests automatically from specs *)
open Utils
module L = Logging
module F = Format

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
let verbose = Config.trace_error

@ -10,8 +10,6 @@
(** Classify bugs into buckets *)
open Utils
(** Classify the bucket of an error desc using Location.access and nullable information *)
val classify_access :
Localise.error_desc -> Localise.access option -> Sil.dexp option -> bool -> Localise.error_desc

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module L = Logging
(** Module to register and invoke callbacks *)

@ -11,8 +11,6 @@
module L = Logging
module F = Format
open Utils (* No abbreviation for Utils, as every module can depend on it *)
(* ============== START of ADT node and proc_desc ============== *)
(* =============== START of module Node =============== *)

@ -10,8 +10,6 @@
(** Control Flow Graph for Interprocedural Analysis *)
open Utils
(** {2 ADT node and proc_desc} *)
type node

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
let pp_nodeset fmt set =
let f node = F.fprintf fmt "%a@ " Procname.pp node in

@ -10,8 +10,6 @@
(** Module for call graphs *)
open Utils
type in_out_calls =
{ in_calls: int; (** total number of in calls transitively *)
out_calls: int (** total number of out calls transitively *)

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

@ -9,7 +9,6 @@
module L = Logging
module F = Format
open Utils
(** Module to create a makefile with dependencies between clusters *)

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
(** Internal representation of data structure for Java, Objective-C and C++ classes,
C-style structs struct and union,
And Objective C protocol *)

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
let (++) = Sil.Int.add
let (--) = Sil.Int.sub

@ -10,8 +10,6 @@
(** Join and Meet Operators *)
open Utils
(** {2 Join Operators} *)
(** Join two pathsets *)

@ -10,7 +10,6 @@
module L = Logging
module F = Format
open Utils
(** {1 Dotty} *)

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(** Check whether the hpred is a |-> representing a resource in the Racquire state *)
let hpred_is_open_resource prop = function

@ -10,8 +10,6 @@
(** Create descriptions of analysis errors *)
open Utils
(** find the dexp, if any, where the given value is stored
also return the type of the value if found *)
val vpath_find : 'a Prop.t -> Sil.exp -> Sil.vpath * Sil.typ option

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module L = Logging
module F = Format

@ -9,8 +9,6 @@
(** Module for error logs. *)
open Utils
(** Element of a loc trace *)
type loc_trace_elem = {
lt_level : int; (** nesting level of procedure calls *)

@ -10,7 +10,6 @@
module L = Logging
module F = Format
open Utils
type exception_visibility = (** visibility of the exception *)
| Exn_user (** always add to error log *)

@ -8,8 +8,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
(** Functions for logging and printing exceptions *)
type exception_visibility = (** visibility of the exception *)

@ -10,7 +10,6 @@
(** Support for Execution environments *)
open Utils
module L = Logging
(** per-file data: type environment and cfg *)

@ -8,8 +8,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
(** Support for Execution environments *)
(** initial state, used to add cg's *)

@ -10,7 +10,6 @@
module L = Logging
module F = Format
open Utils
module WeightedPnameSet =
Set.Make(struct

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
type name = string

@ -10,8 +10,6 @@
(** Identifiers: program variables and logical variables *)
open Utils
(** Program and logical variables. *)
type t

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
open Yojson.Basic.Util
(* This module, unused by default, generates random c files with procedure calls *)

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
(** Name of the infer configuration file *)
let inferconfig_file = ".inferconfig"

@ -10,7 +10,6 @@
module L = Logging
module F = Format
open Utils
open Jsonbug_j
(** Outfile to save the latex report *)

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(** A node with a number of visits *)
type visitednode =

@ -11,7 +11,6 @@
(** Module to handle IO. Includes html and xml modules. *)
module F = Format
open Utils
(* =============== START of module Html =============== *)
module Html : sig

@ -9,7 +9,6 @@
*)
module F = Format
open Utils
(** Produce output in latex *)

@ -11,7 +11,6 @@
(** Support for localisation *)
module F = Format
open Utils
(** type of string used for localisation *)
type t = string

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module F = Format
module L = Logging

@ -11,8 +11,6 @@
(** log messages at different levels of verbosity *)
module F = Format
open Utils
(* =============== START of module MyErr =============== *)
(** type of printable elements *)

@ -8,8 +8,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
(** log messages at different levels of verbosity *)
(** type of printable elements *)

@ -11,7 +11,6 @@
(** Module for Mangled Names *)
module F = Format
open Utils
type t =
{ plain: string;

@ -10,8 +10,6 @@
(** Module for Mangled Names *)
open Utils
(** Type of mangled names *)
type t

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
let mem_idlist i l =
IList.exists (Ident.equal i) l

@ -14,8 +14,6 @@
See {{: http://dx.doi.org/10.1007/978-3-540-73368-3_22 } CAV 2007 } for the therory involved.
*)
open Utils
(* TODO: missing documentation *)
val hpara_match_with_impl : bool -> Sil.hpara -> Sil.hpara -> bool
val hpara_dll_match_with_impl : bool -> Sil.hpara_dll -> Sil.hpara_dll -> bool

@ -10,8 +10,6 @@
(** This module handles buckets of memory leaks in Objective-C/C++ *)
open Utils
let objc_arc_flag = "objc_arc"
let bucket_delimiter = ","

@ -9,8 +9,6 @@
(** This module handles C or Objective-C types for which there are special rules for memory management *)
open Utils
(** This module models special c struct types from the Apple's Core Foundation libraries
for which there are particular rules for memory management. *)

@ -10,8 +10,6 @@
(** This module models special c struct types from the Apple's Core Foundation libraries
for which there are particular rules for memory management. *)
open Utils
(** This module models special c struct types from the Apple's Core Foundation libraries
for which there are particular rules for memory management. *)

@ -11,7 +11,6 @@
module L = Logging
module F = Format
open Utils
let trace () = Config.from_env_variable "INFER_TRACE_ONDEMAND"
let one_cluster_per_procedure () = false

@ -9,8 +9,6 @@
(** Module for on-demand analysis. *)
open Utils
(** Optional set of source dirs to analyze in on-demand mode. *)
val read_dirs_to_analyze : unit -> StringSet.t option

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(* =============== START of the Path module ===============*)

@ -10,8 +10,6 @@
(** Execution Paths *)
open Utils
module Path : sig
(** type for paths *)
type t

@ -9,7 +9,6 @@
*)
module L = Logging
open Utils
(** find all the predecessors of nodes, using exception links *)
module AllPreds = struct

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils (* No abbreviation for Util, as every module can depend on it *)
(** return true if the node was visited during footprint and during re-execution*)
let is_visited_phase node =

@ -11,7 +11,6 @@
module L = Logging
module F = Format
open Utils
(** Type for ObjC accessors *)
type objc_accessor_type =

@ -9,8 +9,6 @@
(** Attributes of a procedure. *)
open Utils
type objc_accessor_type =
| Objc_getter of Ident.fieldname
| Objc_setter of Ident.fieldname

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
open Str
type java_type = string option * string (* e.g. ("", "int") for primitive types or ("java.io", "PrintWriter") for objects *)

@ -10,8 +10,6 @@
(** Module for Procedure Names *)
open Utils
(** Type of procedure names *)
type t

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(** type to describe different strategies for initializing fields of a structure. [No_init] does not
initialize any fields of the struct. [Fld_init] initializes the fields of the struct with fresh

@ -10,7 +10,6 @@
(** Functions for Propositions (i.e., Symbolic Heaps) *)
open Utils
open Sil
type normal (** kind for normal props, i.e. normalized *)

@ -12,7 +12,6 @@
module F = Format
module L = Logging
open Utils
type t = Prop.normal Prop.t

@ -10,8 +10,6 @@
(** Propositions seen as graphs *)
open Utils
type t (** prop considered as a graph *)
type node (** node of the graph *)

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(** {2 Sets of Propositions} *)

@ -10,8 +10,6 @@
(** Functions for Sets of Propositions with and without sharing *)
open Utils
(** {2 Sets of Propositions} *)
(** Sets of propositions.

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
let decrease_indent_when_exception thunk =
try (thunk ())

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
let (++) = Sil.Int.add

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module L = Logging
type log_t =

@ -10,7 +10,6 @@
module L = Logging
module F = Format
open Utils
(** Generic serializer *)
type 'a serializer = (string -> 'a option) * (DB.filename -> 'a option) * (DB.filename -> 'a -> unit)

@ -10,8 +10,6 @@
(** Serialization of data stuctures *)
open Utils
(** Generic serializer *)
type 'a serializer

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(** {2 Programs and Types} *)

@ -10,8 +10,6 @@
(** The Smallfoot Intermediate Language *)
open Utils
(** {2 Programs and Types} *)
(** Type to represent one @Annotation. *)

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
(* =============== START of support for spec tables =============== *)

@ -10,8 +10,6 @@
(** Specifications and spec table *)
open Utils
(** {2 Spec Tables} *)
(** Module for joined props: the result of joining together propositions repeatedly *)

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
type const_map = Cfg.Node.t -> Sil.exp -> Sil.const option

@ -10,8 +10,6 @@
(** State of symbolic execution *)
open Utils
(** Internal state *)
type t

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
let rec idlist_assoc id = function
| [] -> raise Not_found

@ -12,7 +12,6 @@
module L = Logging
module F = Format
open Utils
type splitting = {
sub: Sil.subst;

@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module F = Format
(** Named types. *)

@ -9,7 +9,6 @@
module F = Format
module L = Logging
open Utils
(** Annotations. *)

@ -14,7 +14,6 @@ module F = Format
module P = Printf
module IdSet = Ident.IdentSet
module FldSet = Ident.FieldSet
open Utils
(** set of instance fields belonging to the current file that are assigned to null literals *)
let fields_nullified = ref FldSet.empty

@ -9,7 +9,6 @@
module L = Logging
module F = Format
open Utils
open Dataflow
(** Simple check for dead code. *)

@ -11,7 +11,6 @@
module L = Logging
module F = Format
open Utils
let verbose = ref true

@ -11,7 +11,6 @@
module L = Logging
module F = Format
open Utils
let verbose = false
let query = ref None

@ -11,7 +11,6 @@
module L = Logging
module F = Format
open Utils
type expr =
| Null

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module L = Logging

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module L = Logging
type throws =

@ -10,7 +10,6 @@
(** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *)
module P = Printf
open Utils
let report_error fragment_typ fld fld_typ pname pdesc =
let retained_view = "CHECKERS_FRAGMENT_RETAINS_VIEW" in

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

@ -11,7 +11,6 @@
module L = Logging
module F = Format
open Utils
let object_name = Mangled.from_string "java.lang.Object"

@ -9,7 +9,6 @@
module L = Logging
module F = Format
open Utils
type printf_signature = {
unique_id: string;

@ -11,7 +11,6 @@
module L = Logging
module F = Format
open Utils
(** Flags to activate checkers. *)
let active_procedure_checkers () =

@ -9,7 +9,6 @@
module L = Logging
module F = Format
open Utils
let checkers_repeated_calls_name = "CHECKERS_REPEATED_CALLS"

@ -7,8 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*)
open Utils
module L = Logging

@ -10,9 +10,7 @@
(** Contains current class and current method to be translated as well as local variables, *)
(** and the cg, cfg, and tenv corresponding to the current file. *)
open Utils
open CFrontend_utils
module L = Logging
type curr_class =

@ -10,7 +10,6 @@
(** Translate an enumeration declaration by adding it to the tenv and *)
(** translating the code and adding it to a fake procdesc *)
open Utils
open CFrontend_utils
(*Check if the constant is in the map, in which case that means that all the *)

@ -9,7 +9,6 @@
(** Utility module to retrieve fields of structs of classes *)
open Utils
open CFrontend_utils
module L = Logging

@ -15,7 +15,6 @@
module L = Logging
open Utils
open CFrontend_utils
open CGen_trans

@ -14,7 +14,6 @@
* - loc: the location where is occurs
*)
open Utils
open CFrontend_utils
open General_utils

@ -10,8 +10,6 @@
(** Module for utility functions for the whole frontend. Includes functions for printing, *)
(** for transformations of ast nodes and general utility functions such as functions on lists *)
open Utils
module L = Logging
module F = Format

@ -10,7 +10,6 @@
(** Module for function to retrieve the location (file, line, etc) of instructions *)
open CFrontend_utils
open Utils
(* Inside the json there may be code or type definitions from other files *)
(* than the one passed as an argument. That current file in the translation is saved*)

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

Loading…
Cancel
Save