diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 885efc027..3eee492e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,3 @@ us a line at cla@fb.com. Thanks! `infer/tests/codetoanalyze/` and `infer/tests/{endtoend,frontend}/`. To run the all tests, execute `make test`. - -## Hacking - -* Be aware that the build system implicitly opens the Utils module. diff --git a/infer/.merlin b/infer/.merlin index cd02f8158..c12ac584e 100644 --- a/infer/.merlin +++ b/infer/.merlin @@ -10,6 +10,5 @@ PKG str PKG unix PKG yojson PKG zip -FLG -open Utils FLG -principal -safe-string -short-paths -strict-formats -strict-sequence FLG -w +a-4-9-40-41-42-45-48-50 diff --git a/infer/src/IR/attributesTable.ml b/infer/src/IR/attributesTable.ml index 167090a91..4a5bc2c97 100644 --- a/infer/src/IR/attributesTable.ml +++ b/infer/src/IR/attributesTable.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module L = Logging diff --git a/infer/src/IR/attributesTable.mli b/infer/src/IR/attributesTable.mli index e615d93d7..4203940a6 100644 --- a/infer/src/IR/attributesTable.mli +++ b/infer/src/IR/attributesTable.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module to manage the table of attributes. *) diff --git a/infer/src/IR/cfg.ml b/infer/src/IR/cfg.ml index 01f3d46d0..cb0c793a3 100644 --- a/infer/src/IR/cfg.ml +++ b/infer/src/IR/cfg.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/IR/cfg.mli b/infer/src/IR/cfg.mli index 57f71b0ab..5b8e6403b 100644 --- a/infer/src/IR/cfg.mli +++ b/infer/src/IR/cfg.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Control Flow Graph for Interprocedural Analysis *) (** {2 ADT node and proc_desc} *) diff --git a/infer/src/IR/cg.ml b/infer/src/IR/cg.ml index 05c08d035..de8349086 100644 --- a/infer/src/IR/cg.ml +++ b/infer/src/IR/cg.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for call graphs *) module L = Logging diff --git a/infer/src/IR/cg.mli b/infer/src/IR/cg.mli index d4f6ca6ba..a6ee313f5 100644 --- a/infer/src/IR/cg.mli +++ b/infer/src/IR/cg.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for call graphs *) type in_out_calls = diff --git a/infer/src/IR/csu.ml b/infer/src/IR/csu.ml index 2bb83efe0..9e1b43ec9 100644 --- a/infer/src/IR/csu.ml +++ b/infer/src/IR/csu.ml @@ -7,6 +7,8 @@ * 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 *) diff --git a/infer/src/IR/csu.mli b/infer/src/IR/csu.mli index 7cdc18378..5822dfa92 100644 --- a/infer/src/IR/csu.mli +++ b/infer/src/IR/csu.mli @@ -7,6 +7,8 @@ * 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 *) diff --git a/infer/src/IR/ident.ml b/infer/src/IR/ident.ml index 2bdb3bf27..bc055233f 100644 --- a/infer/src/IR/ident.ml +++ b/infer/src/IR/ident.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Names and Identifiers *) module L = Logging diff --git a/infer/src/IR/ident.mli b/infer/src/IR/ident.mli index ed4546af2..8013eeb70 100644 --- a/infer/src/IR/ident.mli +++ b/infer/src/IR/ident.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Identifiers: program variables and logical variables *) (** Program and logical variables. *) diff --git a/infer/src/IR/location.ml b/infer/src/IR/location.ml index 693edaac6..458fcf143 100644 --- a/infer/src/IR/location.ml +++ b/infer/src/IR/location.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module L = Logging diff --git a/infer/src/IR/location.mli b/infer/src/IR/location.mli index 5711df7f0..a260acc17 100644 --- a/infer/src/IR/location.mli +++ b/infer/src/IR/location.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Location in the original source file *) type t = { line: int; (** The line number. -1 means "do not know" *) diff --git a/infer/src/IR/mangled.ml b/infer/src/IR/mangled.ml index dcefdfdcc..c60bfe913 100644 --- a/infer/src/IR/mangled.ml +++ b/infer/src/IR/mangled.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Mangled Names *) module F = Format diff --git a/infer/src/IR/mangled.mli b/infer/src/IR/mangled.mli index a07bb3f0b..f2eff480a 100644 --- a/infer/src/IR/mangled.mli +++ b/infer/src/IR/mangled.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Mangled Names *) (** Type of mangled names *) diff --git a/infer/src/IR/procAttributes.ml b/infer/src/IR/procAttributes.ml index 480c037b8..3d4726391 100644 --- a/infer/src/IR/procAttributes.ml +++ b/infer/src/IR/procAttributes.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Attributes of a procedure. *) module L = Logging diff --git a/infer/src/IR/procAttributes.mli b/infer/src/IR/procAttributes.mli index 55dc3ccee..b379d31fb 100644 --- a/infer/src/IR/procAttributes.mli +++ b/infer/src/IR/procAttributes.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Attributes of a procedure. *) type objc_accessor_type = diff --git a/infer/src/IR/procname.ml b/infer/src/IR/procname.ml index f31f5a8d0..2d295b12b 100644 --- a/infer/src/IR/procname.ml +++ b/infer/src/IR/procname.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Procedure Names *) module L = Logging diff --git a/infer/src/IR/procname.mli b/infer/src/IR/procname.mli index c33bdef67..397bb3226 100644 --- a/infer/src/IR/procname.mli +++ b/infer/src/IR/procname.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Procedure Names. *) (** Type of java procedure names. *) diff --git a/infer/src/IR/pvar.ml b/infer/src/IR/pvar.ml index db73b24bb..0f444137e 100644 --- a/infer/src/IR/pvar.ml +++ b/infer/src/IR/pvar.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** The Smallfoot Intermediate Language *) module L = Logging diff --git a/infer/src/IR/pvar.mli b/infer/src/IR/pvar.mli index cc656d1ea..e5ad0555b 100644 --- a/infer/src/IR/pvar.mli +++ b/infer/src/IR/pvar.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Program variables. *) module F = Format diff --git a/infer/src/IR/sil.ml b/infer/src/IR/sil.ml index db963ea54..4bfcea446 100644 --- a/infer/src/IR/sil.ml +++ b/infer/src/IR/sil.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** The Smallfoot Intermediate Language *) module L = Logging diff --git a/infer/src/IR/sil.mli b/infer/src/IR/sil.mli index e22b564b6..d62d3fe51 100644 --- a/infer/src/IR/sil.mli +++ b/infer/src/IR/sil.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** The Smallfoot Intermediate Language *) module F = Format diff --git a/infer/src/IR/tenv.ml b/infer/src/IR/tenv.ml index f821a5c3b..be0d61f18 100644 --- a/infer/src/IR/tenv.ml +++ b/infer/src/IR/tenv.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Type Environments. *) (** Hash tables on strings. *) diff --git a/infer/src/IR/tenv.mli b/infer/src/IR/tenv.mli index 0e24c7821..c58cccd64 100644 --- a/infer/src/IR/tenv.mli +++ b/infer/src/IR/tenv.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Type Environments. *) type t (** Type for type environment. *) diff --git a/infer/src/IR/typename.ml b/infer/src/IR/typename.ml index 4aabe80af..b8e6a4213 100644 --- a/infer/src/IR/typename.ml +++ b/infer/src/IR/typename.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format (** Named types. *) diff --git a/infer/src/IR/typename.mli b/infer/src/IR/typename.mli index 25f04d46b..8cec9bd49 100644 --- a/infer/src/IR/typename.mli +++ b/infer/src/IR/typename.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Named types. *) type t = | TN_typedef of Mangled.t diff --git a/infer/src/Makefile.in b/infer/src/Makefile.in index b04ca1587..37b8c1974 100644 --- a/infer/src/Makefile.in +++ b/infer/src/Makefile.in @@ -40,7 +40,6 @@ OCAMLBUILD_OPTIONS = \ -cflags -strict-sequence \ -cflags -w,$(OCAML_FATAL_WARNINGS)-4-9-40-41-42-45-48-50 \ -tag-line "<*{clang/clang_ast_*,backend/jsonbug_*}>: warn(-27-32-35-39)" \ - -tag-line "not <**/{config,iList,utils}.*>: open(Utils)" \ -pkgs atdgen,extlib,oUnit,str,unix,yojson,zip ifeq (@ENABLE_OCAML_ANNOT@,yes) diff --git a/infer/src/backend/DB.ml b/infer/src/backend/DB.ml index b450280e3..43df75a93 100644 --- a/infer/src/backend/DB.ml +++ b/infer/src/backend/DB.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Database of analysis results *) module F = Format diff --git a/infer/src/backend/DB.mli b/infer/src/backend/DB.mli index 162b65b66..b0fc63a91 100644 --- a/infer/src/backend/DB.mli +++ b/infer/src/backend/DB.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Database of analysis results *) (** {2 Filename} *) diff --git a/infer/src/backend/abs.ml b/infer/src/backend/abs.ml index 88716a9d7..27532043d 100644 --- a/infer/src/backend/abs.ml +++ b/infer/src/backend/abs.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Implementation of Abstraction Functions *) module L = Logging diff --git a/infer/src/backend/abs.mli b/infer/src/backend/abs.mli index 14efa8249..c2d6231e0 100644 --- a/infer/src/backend/abs.mli +++ b/infer/src/backend/abs.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Implementation of Abstraction Functions *) (** Abstraction rules discovered *) diff --git a/infer/src/backend/absarray.ml b/infer/src/backend/absarray.ml index 58e5bf93c..c30602375 100644 --- a/infer/src/backend/absarray.ml +++ b/infer/src/backend/absarray.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Abstraction for Arrays *) module L = Logging diff --git a/infer/src/backend/absarray.mli b/infer/src/backend/absarray.mli index 15720762e..086d4340a 100644 --- a/infer/src/backend/absarray.mli +++ b/infer/src/backend/absarray.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Abstraction for Arrays *) (** Apply array abstraction and check the result *) diff --git a/infer/src/backend/autounit.ml b/infer/src/backend/autounit.ml index df6d6ec42..068c90849 100644 --- a/infer/src/backend/autounit.ml +++ b/infer/src/backend/autounit.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Generate unit tests automatically from specs *) module L = Logging diff --git a/infer/src/backend/autounit.mli b/infer/src/backend/autounit.mli index 672be197e..837c31e10 100644 --- a/infer/src/backend/autounit.mli +++ b/infer/src/backend/autounit.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Generate unit tests automatically from specs *) (** type of generated code *) diff --git a/infer/src/backend/buckets.ml b/infer/src/backend/buckets.ml index 85e5791ba..9e067af8b 100644 --- a/infer/src/backend/buckets.ml +++ b/infer/src/backend/buckets.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Classify bugs into buckets *) module L = Logging diff --git a/infer/src/backend/buckets.mli b/infer/src/backend/buckets.mli index bb43a05b4..8bece448e 100644 --- a/infer/src/backend/buckets.mli +++ b/infer/src/backend/buckets.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Classify bugs into buckets *) (** Classify the bucket of an error desc using Location.access and nullable information *) diff --git a/infer/src/backend/builtin.ml b/infer/src/backend/builtin.ml index 4f5189a5d..68614e7b1 100644 --- a/infer/src/backend/builtin.ml +++ b/infer/src/backend/builtin.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for builtin functions with their symbolic execution handler *) type args = { diff --git a/infer/src/backend/builtin.mli b/infer/src/backend/builtin.mli index bbc103e0c..6d73f34a3 100644 --- a/infer/src/backend/builtin.mli +++ b/infer/src/backend/builtin.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for builtin functions with their symbolic execution handler *) type args = { diff --git a/infer/src/backend/callbacks.ml b/infer/src/backend/callbacks.ml index d5dc53140..0b4c96ddb 100644 --- a/infer/src/backend/callbacks.ml +++ b/infer/src/backend/callbacks.ml @@ -7,6 +7,8 @@ * 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 *) diff --git a/infer/src/backend/callbacks.mli b/infer/src/backend/callbacks.mli index f7ddfd893..cde4b6e9d 100644 --- a/infer/src/backend/callbacks.mli +++ b/infer/src/backend/callbacks.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module to register and invoke callbacks *) type proc_callback_args = { diff --git a/infer/src/backend/cluster.ml b/infer/src/backend/cluster.ml index 8e7d9abbf..35c4193e9 100644 --- a/infer/src/backend/cluster.ml +++ b/infer/src/backend/cluster.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/cluster.mli b/infer/src/backend/cluster.mli index de42b1473..d63a0ab9f 100644 --- a/infer/src/backend/cluster.mli +++ b/infer/src/backend/cluster.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format (** Module to process clusters of procedures. *) diff --git a/infer/src/backend/clusterMakefile.ml b/infer/src/backend/clusterMakefile.ml index bc8c19120..5bcee503f 100644 --- a/infer/src/backend/clusterMakefile.ml +++ b/infer/src/backend/clusterMakefile.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/dom.ml b/infer/src/backend/dom.ml index 28eb024e9..2d257b593 100644 --- a/infer/src/backend/dom.ml +++ b/infer/src/backend/dom.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Operators for the abstract domain. In particular, join and meet. *) module L = Logging diff --git a/infer/src/backend/dom.mli b/infer/src/backend/dom.mli index e279bdd18..47ed59e45 100644 --- a/infer/src/backend/dom.mli +++ b/infer/src/backend/dom.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Join and Meet Operators *) (** {2 Join Operators} *) diff --git a/infer/src/backend/dotty.ml b/infer/src/backend/dotty.ml index 9968853ad..9c8f50382 100644 --- a/infer/src/backend/dotty.ml +++ b/infer/src/backend/dotty.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/dotty.mli b/infer/src/backend/dotty.mli index c6172c08e..788086c95 100644 --- a/infer/src/backend/dotty.mli +++ b/infer/src/backend/dotty.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Pretty printing functions in dot format. *) (** {2 Propositions} *) diff --git a/infer/src/backend/errdesc.ml b/infer/src/backend/errdesc.ml index f4256387b..5a6d7daa2 100644 --- a/infer/src/backend/errdesc.ml +++ b/infer/src/backend/errdesc.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Create descriptions of analysis errors *) module L = Logging diff --git a/infer/src/backend/errdesc.mli b/infer/src/backend/errdesc.mli index 40c5aafaf..164d83485 100644 --- a/infer/src/backend/errdesc.mli +++ b/infer/src/backend/errdesc.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Create descriptions of analysis errors *) (** find the dexp, if any, where the given value is stored diff --git a/infer/src/backend/errlog.ml b/infer/src/backend/errlog.ml index 500d213bd..515f26222 100644 --- a/infer/src/backend/errlog.ml +++ b/infer/src/backend/errlog.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/errlog.mli b/infer/src/backend/errlog.mli index 0329cbdc8..6031dd780 100644 --- a/infer/src/backend/errlog.mli +++ b/infer/src/backend/errlog.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for error logs. *) (** Element of a loc trace *) diff --git a/infer/src/backend/escape.ml b/infer/src/backend/escape.ml index 60279a2f8..78afb718d 100644 --- a/infer/src/backend/escape.ml +++ b/infer/src/backend/escape.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Escape a string for use in a CSV or XML file: replace reserved characters with escape sequences *) diff --git a/infer/src/backend/escape.mli b/infer/src/backend/escape.mli index 28a042321..0d062311c 100644 --- a/infer/src/backend/escape.mli +++ b/infer/src/backend/escape.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Escape a string for use in a CSV or XML file: replace reserved characters with escape sequences *) diff --git a/infer/src/backend/exceptions.ml b/infer/src/backend/exceptions.ml index 110eb846a..c0f49ec1b 100644 --- a/infer/src/backend/exceptions.ml +++ b/infer/src/backend/exceptions.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/exceptions.mli b/infer/src/backend/exceptions.mli index 77bf7d97c..188412959 100644 --- a/infer/src/backend/exceptions.mli +++ b/infer/src/backend/exceptions.mli @@ -8,6 +8,8 @@ * 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 *) diff --git a/infer/src/backend/exe_env.ml b/infer/src/backend/exe_env.ml index 63f81a29c..54a0cece2 100644 --- a/infer/src/backend/exe_env.ml +++ b/infer/src/backend/exe_env.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Support for Execution environments *) module L = Logging diff --git a/infer/src/backend/exe_env.mli b/infer/src/backend/exe_env.mli index 57e94c4ed..973873e63 100644 --- a/infer/src/backend/exe_env.mli +++ b/infer/src/backend/exe_env.mli @@ -8,6 +8,8 @@ * 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 *) diff --git a/infer/src/backend/inferanalyze.ml b/infer/src/backend/inferanalyze.ml index bd2949abe..c8efb3cc1 100644 --- a/infer/src/backend/inferanalyze.ml +++ b/infer/src/backend/inferanalyze.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Main module for the analysis after the capture phase *) module L = Logging diff --git a/infer/src/backend/inferanalyze.mli b/infer/src/backend/inferanalyze.mli index 1ef17bf40..af0a8667f 100644 --- a/infer/src/backend/inferanalyze.mli +++ b/infer/src/backend/inferanalyze.mli @@ -8,4 +8,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Main module for the analysis after the capture phase *) diff --git a/infer/src/backend/inferconfig.ml b/infer/src/backend/inferconfig.ml index 658c4e9ad..e7109f16b 100644 --- a/infer/src/backend/inferconfig.ml +++ b/infer/src/backend/inferconfig.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging (** Look up a key in a json file containing a list of strings *) diff --git a/infer/src/backend/inferconfig.mli b/infer/src/backend/inferconfig.mli index f5a1ad3b9..0aafeae2e 100644 --- a/infer/src/backend/inferconfig.mli +++ b/infer/src/backend/inferconfig.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** get the path to the .inferconfig file *) val inferconfig : unit -> string diff --git a/infer/src/backend/inferprint.ml b/infer/src/backend/inferprint.ml index 3df30e6a5..045c39c9d 100644 --- a/infer/src/backend/inferprint.ml +++ b/infer/src/backend/inferprint.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format open Jsonbug_j diff --git a/infer/src/backend/interproc.ml b/infer/src/backend/interproc.ml index 11443a8f4..35a12db2f 100644 --- a/infer/src/backend/interproc.ml +++ b/infer/src/backend/interproc.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Interprocedural Analysis *) module L = Logging diff --git a/infer/src/backend/interproc.mli b/infer/src/backend/interproc.mli index d060ed6af..0029a257c 100644 --- a/infer/src/backend/interproc.mli +++ b/infer/src/backend/interproc.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Interprocedural Analysis *) (** Perform the analysis of an exe_env *) diff --git a/infer/src/backend/io_infer.ml b/infer/src/backend/io_infer.ml index 7f5199ad0..f9f3d9b08 100644 --- a/infer/src/backend/io_infer.ml +++ b/infer/src/backend/io_infer.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module to handle IO. Includes html and xml modules. *) module F = Format diff --git a/infer/src/backend/io_infer.mli b/infer/src/backend/io_infer.mli index 668ee6bbe..2427d6af6 100644 --- a/infer/src/backend/io_infer.mli +++ b/infer/src/backend/io_infer.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module to handle IO. Includes html and xml modules. *) module Html : sig diff --git a/infer/src/backend/joinState.ml b/infer/src/backend/joinState.ml index d3ce0834b..e10650f71 100644 --- a/infer/src/backend/joinState.ml +++ b/infer/src/backend/joinState.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Object representing the status of the join operation *) type mode = diff --git a/infer/src/backend/joinState.mli b/infer/src/backend/joinState.mli index f74e2fe64..b89119792 100644 --- a/infer/src/backend/joinState.mli +++ b/infer/src/backend/joinState.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Object representing the status of the join operation *) type mode = diff --git a/infer/src/backend/latex.ml b/infer/src/backend/latex.ml index d882ba71f..24f56ff6a 100644 --- a/infer/src/backend/latex.ml +++ b/infer/src/backend/latex.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format (** Produce output in latex *) diff --git a/infer/src/backend/latex.mli b/infer/src/backend/latex.mli index 9ad5986c3..477584690 100644 --- a/infer/src/backend/latex.mli +++ b/infer/src/backend/latex.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type style = | Boldface | Roman diff --git a/infer/src/backend/localise.ml b/infer/src/backend/localise.ml index 6bcfb1d1e..f790981e6 100644 --- a/infer/src/backend/localise.ml +++ b/infer/src/backend/localise.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Support for localisation *) module F = Format diff --git a/infer/src/backend/localise.mli b/infer/src/backend/localise.mli index a295e2c6f..87279630f 100644 --- a/infer/src/backend/localise.mli +++ b/infer/src/backend/localise.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Support for localisation *) (** type of string used for localisation *) diff --git a/infer/src/backend/logging.ml b/infer/src/backend/logging.ml index 354e6ccfc..eef93cb0f 100644 --- a/infer/src/backend/logging.ml +++ b/infer/src/backend/logging.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** log messages at different levels of verbosity *) module F = Format diff --git a/infer/src/backend/logging.mli b/infer/src/backend/logging.mli index 75c1b7c6c..3eaf93cce 100644 --- a/infer/src/backend/logging.mli +++ b/infer/src/backend/logging.mli @@ -8,6 +8,8 @@ * 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 *) diff --git a/infer/src/backend/match.ml b/infer/src/backend/match.ml index 5c9ad8bb4..6f3306f9f 100644 --- a/infer/src/backend/match.ml +++ b/infer/src/backend/match.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Functions for "Smart" Pattern Matching *) module L = Logging diff --git a/infer/src/backend/match.mli b/infer/src/backend/match.mli index 3917a02bf..4606c2365 100644 --- a/infer/src/backend/match.mli +++ b/infer/src/backend/match.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Implementation of "Smart" Pattern Matching for higher order singly-linked list predicate. Used for detecting on a given program if some data scructures are matching some predefined higher-order list predicates. When it is the case, these predicates can be used as possible candidates for abstracting the data-structures. diff --git a/infer/src/backend/mergeCapture.ml b/infer/src/backend/mergeCapture.ml index c58ab76b8..b6d0c88be 100644 --- a/infer/src/backend/mergeCapture.ml +++ b/infer/src/backend/mergeCapture.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/mleak_buckets.ml b/infer/src/backend/mleak_buckets.ml index 2a6f7ed16..be70c58d1 100644 --- a/infer/src/backend/mleak_buckets.ml +++ b/infer/src/backend/mleak_buckets.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** This module handles buckets of memory leaks in Objective-C/C++ *) let objc_arc_flag = "objc_arc" diff --git a/infer/src/backend/mleak_buckets.mli b/infer/src/backend/mleak_buckets.mli index 112b2a9e4..8f28e3169 100644 --- a/infer/src/backend/mleak_buckets.mli +++ b/infer/src/backend/mleak_buckets.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** This module handles buckets of memory leaks in Objective-C *) val objc_arc_flag : string diff --git a/infer/src/backend/modelBuiltins.ml b/infer/src/backend/modelBuiltins.ml index 9ab61356c..b975802cd 100644 --- a/infer/src/backend/modelBuiltins.ml +++ b/infer/src/backend/modelBuiltins.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Models for the builtin functions supported *) open SymExec diff --git a/infer/src/backend/modelBuiltins.mli b/infer/src/backend/modelBuiltins.mli index fd29e4069..c0dc0894b 100644 --- a/infer/src/backend/modelBuiltins.mli +++ b/infer/src/backend/modelBuiltins.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Models for the builtin functions supported *) val __assert_fail : Procname.t diff --git a/infer/src/backend/objc_models.ml b/infer/src/backend/objc_models.ml index d8fbf0987..3b6ab4210 100644 --- a/infer/src/backend/objc_models.ml +++ b/infer/src/backend/objc_models.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** This module handles C or Objective-C types for which there are special rules for memory management *) (** This module models special c struct types from the Apple's Core Foundation libraries diff --git a/infer/src/backend/objc_models.mli b/infer/src/backend/objc_models.mli index ff65669a9..ffba9fde8 100644 --- a/infer/src/backend/objc_models.mli +++ b/infer/src/backend/objc_models.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +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. *) diff --git a/infer/src/backend/ondemand.ml b/infer/src/backend/ondemand.ml index 34e726095..bc0b4ce7b 100644 --- a/infer/src/backend/ondemand.ml +++ b/infer/src/backend/ondemand.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for on-demand analysis. *) module L = Logging diff --git a/infer/src/backend/ondemand.mli b/infer/src/backend/ondemand.mli index 3b5ef8698..d74cd98fb 100644 --- a/infer/src/backend/ondemand.mli +++ b/infer/src/backend/ondemand.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for on-demand analysis. *) (** Optional set of source dirs to analyze in on-demand mode. *) diff --git a/infer/src/backend/paths.ml b/infer/src/backend/paths.ml index ba9172424..b1aa40d3e 100644 --- a/infer/src/backend/paths.ml +++ b/infer/src/backend/paths.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Execution Paths *) module L = Logging diff --git a/infer/src/backend/paths.mli b/infer/src/backend/paths.mli index d9001cc11..8c807bc4f 100644 --- a/infer/src/backend/paths.mli +++ b/infer/src/backend/paths.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Execution Paths *) module Path : sig diff --git a/infer/src/backend/preanal.ml b/infer/src/backend/preanal.ml index 3a7e8cdf8..6a860d9f2 100644 --- a/infer/src/backend/preanal.ml +++ b/infer/src/backend/preanal.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging (** find all the predecessors of nodes, using exception links *) diff --git a/infer/src/backend/preanal.mli b/infer/src/backend/preanal.mli index 431cf6cd0..6570e003c 100644 --- a/infer/src/backend/preanal.mli +++ b/infer/src/backend/preanal.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Preanalysis for eliminating dead local variables *) (** Perform liveness analysis *) diff --git a/infer/src/backend/prettyPrintable.ml b/infer/src/backend/prettyPrintable.ml index c36f2d1f3..b31c70221 100644 --- a/infer/src/backend/prettyPrintable.ml +++ b/infer/src/backend/prettyPrintable.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format (** Wrappers for making pretty-printable modules *) diff --git a/infer/src/backend/prettyPrintable.mli b/infer/src/backend/prettyPrintable.mli index f33cdea2c..27dc17f79 100644 --- a/infer/src/backend/prettyPrintable.mli +++ b/infer/src/backend/prettyPrintable.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format (** Wrappers for making pretty-printable modules *) diff --git a/infer/src/backend/printer.ml b/infer/src/backend/printer.ml index 7de90697b..0e2268371 100644 --- a/infer/src/backend/printer.ml +++ b/infer/src/backend/printer.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Printers for the analysis results *) module L = Logging diff --git a/infer/src/backend/printer.mli b/infer/src/backend/printer.mli index bcd629c4f..c37a7772d 100644 --- a/infer/src/backend/printer.mli +++ b/infer/src/backend/printer.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Printers for the analysis results *) (** Module to read specific lines from files. diff --git a/infer/src/backend/prop.ml b/infer/src/backend/prop.ml index 4910b330c..95ff92367 100644 --- a/infer/src/backend/prop.ml +++ b/infer/src/backend/prop.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Functions for Propositions (i.e., Symbolic Heaps) *) module L = Logging diff --git a/infer/src/backend/prop.mli b/infer/src/backend/prop.mli index c2caed4e5..32c946397 100644 --- a/infer/src/backend/prop.mli +++ b/infer/src/backend/prop.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Functions for Propositions (i.e., Symbolic Heaps) *) open Sil diff --git a/infer/src/backend/propgraph.ml b/infer/src/backend/propgraph.ml index 64e3d3848..1e64c3e83 100644 --- a/infer/src/backend/propgraph.ml +++ b/infer/src/backend/propgraph.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Propositions seen as graphs *) module F = Format diff --git a/infer/src/backend/propgraph.mli b/infer/src/backend/propgraph.mli index 962055e47..dd8a7daad 100644 --- a/infer/src/backend/propgraph.mli +++ b/infer/src/backend/propgraph.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Propositions seen as graphs *) type t (** prop considered as a graph *) diff --git a/infer/src/backend/propset.ml b/infer/src/backend/propset.ml index 26c0601aa..91fce5b39 100644 --- a/infer/src/backend/propset.ml +++ b/infer/src/backend/propset.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Functions for Propositions (i.e., Symbolic Heaps) *) module L = Logging diff --git a/infer/src/backend/propset.mli b/infer/src/backend/propset.mli index c1e89cb7d..e71f830a1 100644 --- a/infer/src/backend/propset.mli +++ b/infer/src/backend/propset.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Functions for Sets of Propositions with and without sharing *) (** {2 Sets of Propositions} *) diff --git a/infer/src/backend/prover.ml b/infer/src/backend/prover.ml index bc5ddba04..3f9f9fbc4 100644 --- a/infer/src/backend/prover.ml +++ b/infer/src/backend/prover.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Functions for Propositions (i.e., Symbolic Heaps) *) module L = Logging diff --git a/infer/src/backend/prover.mli b/infer/src/backend/prover.mli index 012b718e4..919c238f9 100644 --- a/infer/src/backend/prover.mli +++ b/infer/src/backend/prover.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Functions for Theorem Proving *) open Sil diff --git a/infer/src/backend/rearrange.ml b/infer/src/backend/rearrange.ml index 7b505d053..468fd112a 100644 --- a/infer/src/backend/rearrange.ml +++ b/infer/src/backend/rearrange.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Re-arrangement and extension of structures with fresh variables *) module L = Logging diff --git a/infer/src/backend/rearrange.mli b/infer/src/backend/rearrange.mli index 366580685..a28f38e35 100644 --- a/infer/src/backend/rearrange.mli +++ b/infer/src/backend/rearrange.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Re-arrangement and extension of structures with fresh variables *) (* TODO: this description is not clear *) exception ARRAY_ACCESS diff --git a/infer/src/backend/reporting.ml b/infer/src/backend/reporting.ml index 368912d46..0b01d7b72 100644 --- a/infer/src/backend/reporting.ml +++ b/infer/src/backend/reporting.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging type log_t = diff --git a/infer/src/backend/reporting.mli b/infer/src/backend/reporting.mli index 6c7966aa7..b23d32eb4 100644 --- a/infer/src/backend/reporting.mli +++ b/infer/src/backend/reporting.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Type of functions to report issues to the error_log in a spec. *) type log_t = diff --git a/infer/src/backend/serialization.ml b/infer/src/backend/serialization.ml index 223441c60..738ecc28f 100644 --- a/infer/src/backend/serialization.ml +++ b/infer/src/backend/serialization.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/serialization.mli b/infer/src/backend/serialization.mli index 7a8ef67ba..824f04982 100644 --- a/infer/src/backend/serialization.mli +++ b/infer/src/backend/serialization.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Serialization of data stuctures *) (** Generic serializer *) diff --git a/infer/src/backend/specs.ml b/infer/src/backend/specs.ml index 482832c42..232cd5129 100644 --- a/infer/src/backend/specs.ml +++ b/infer/src/backend/specs.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Specifications and spec table *) module L = Logging diff --git a/infer/src/backend/specs.mli b/infer/src/backend/specs.mli index 5d7377b1a..9389ac604 100644 --- a/infer/src/backend/specs.mli +++ b/infer/src/backend/specs.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Specifications and spec table *) (** {2 Spec Tables} *) diff --git a/infer/src/backend/state.ml b/infer/src/backend/state.ml index b902de8c9..4920c0d43 100644 --- a/infer/src/backend/state.ml +++ b/infer/src/backend/state.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** State of symbolic execution *) module L = Logging diff --git a/infer/src/backend/state.mli b/infer/src/backend/state.mli index 959df4beb..eb3e21528 100644 --- a/infer/src/backend/state.mli +++ b/infer/src/backend/state.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** State of symbolic execution *) (** Internal state *) diff --git a/infer/src/backend/symExec.ml b/infer/src/backend/symExec.ml index b7f161bbb..0b7fe2e38 100644 --- a/infer/src/backend/symExec.ml +++ b/infer/src/backend/symExec.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Symbolic Execution *) module L = Logging diff --git a/infer/src/backend/symExec.mli b/infer/src/backend/symExec.mli index 0b72ee7a1..7d647b14d 100644 --- a/infer/src/backend/symExec.mli +++ b/infer/src/backend/symExec.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Symbolic Execution *) (** Symbolic execution of the instructions of a node, lifted to sets of propositions. *) diff --git a/infer/src/backend/tabulation.ml b/infer/src/backend/tabulation.ml index 4a1d5f58b..2d12bd2d9 100644 --- a/infer/src/backend/tabulation.ml +++ b/infer/src/backend/tabulation.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Interprocedural footprint analysis *) module L = Logging diff --git a/infer/src/backend/tabulation.mli b/infer/src/backend/tabulation.mli index 03e3f41b2..8879d0397 100644 --- a/infer/src/backend/tabulation.mli +++ b/infer/src/backend/tabulation.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Interprocedural footprint analysis *) (** Frame and anti-frame *) diff --git a/infer/src/backend/taint.ml b/infer/src/backend/taint.ml index 66110ace6..e6e1c3348 100644 --- a/infer/src/backend/taint.ml +++ b/infer/src/backend/taint.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging open PatternMatch diff --git a/infer/src/backend/taint.mli b/infer/src/backend/taint.mli index ba88e1a6d..3462c4f35 100644 --- a/infer/src/backend/taint.mli +++ b/infer/src/backend/taint.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** returns true if [callee_pname] returns a tainted value *) val returns_tainted : Procname.t -> bool diff --git a/infer/src/backend/timeout.ml b/infer/src/backend/timeout.ml index f71c6f1f2..0b25eacbf 100644 --- a/infer/src/backend/timeout.ml +++ b/infer/src/backend/timeout.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/backend/timeout.mli b/infer/src/backend/timeout.mli index 45b3dfdf5..1421002b1 100644 --- a/infer/src/backend/timeout.mli +++ b/infer/src/backend/timeout.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Handle timeout events *) (** Execute the function up to a given timeout. *) diff --git a/infer/src/backend/version.ml.in b/infer/src/backend/version.ml.in index ceaa74066..cd5b1ac3c 100644 --- a/infer/src/backend/version.ml.in +++ b/infer/src/backend/version.ml.in @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + let major = @INFER_MAJOR@ let minor = @INFER_MINOR@ let patch = @INFER_PATCH@ diff --git a/infer/src/backend/version.mli b/infer/src/backend/version.mli index c21c2895a..35b421ad4 100644 --- a/infer/src/backend/version.mli +++ b/infer/src/backend/version.mli @@ -7,5 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val versionString : string val versionJson : string diff --git a/infer/src/checkers/abstractDomain.ml b/infer/src/checkers/abstractDomain.ml index 5f839831a..c3360cc7d 100644 --- a/infer/src/checkers/abstractDomain.ml +++ b/infer/src/checkers/abstractDomain.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module type S = sig diff --git a/infer/src/checkers/abstractInterpreter.ml b/infer/src/checkers/abstractInterpreter.ml index 69d64c34e..c467c1922 100644 --- a/infer/src/checkers/abstractInterpreter.ml +++ b/infer/src/checkers/abstractInterpreter.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module Make diff --git a/infer/src/checkers/addressTaken.ml b/infer/src/checkers/addressTaken.ml index 30dfc398a..5a8d7fa44 100644 --- a/infer/src/checkers/addressTaken.ml +++ b/infer/src/checkers/addressTaken.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module PvarSet = PrettyPrintable.MakePPSet(struct type t = Pvar.t let compare = Pvar.compare diff --git a/infer/src/checkers/annotations.ml b/infer/src/checkers/annotations.ml index 13c1940d6..dc5059a3a 100644 --- a/infer/src/checkers/annotations.ml +++ b/infer/src/checkers/annotations.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module L = Logging diff --git a/infer/src/checkers/annotations.mli b/infer/src/checkers/annotations.mli index b7f23ddec..97a579848 100644 --- a/infer/src/checkers/annotations.mli +++ b/infer/src/checkers/annotations.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Annotations. *) val suppressLint : string diff --git a/infer/src/checkers/callbackChecker.ml b/infer/src/checkers/callbackChecker.ml index 08267f18c..0e84d719b 100644 --- a/infer/src/checkers/callbackChecker.ml +++ b/infer/src/checkers/callbackChecker.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *) module L = Logging diff --git a/infer/src/checkers/callbackChecker.mli b/infer/src/checkers/callbackChecker.mli index 12845b556..80643c0cf 100644 --- a/infer/src/checkers/callbackChecker.mli +++ b/infer/src/checkers/callbackChecker.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *) val callback_checker_main : Callbacks.proc_callback_t diff --git a/infer/src/checkers/checkDeadCode.ml b/infer/src/checkers/checkDeadCode.ml index b8153453a..14f1f38b9 100644 --- a/infer/src/checkers/checkDeadCode.ml +++ b/infer/src/checkers/checkDeadCode.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format open Dataflow diff --git a/infer/src/checkers/checkDeadCode.mli b/infer/src/checkers/checkDeadCode.mli index 0f28d7f49..d5661e7da 100644 --- a/infer/src/checkers/checkDeadCode.mli +++ b/infer/src/checkers/checkDeadCode.mli @@ -7,5 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Simple check for dead code. *) val callback_check_dead_code: Callbacks.proc_callback_t diff --git a/infer/src/checkers/checkTraceCallSequence.ml b/infer/src/checkers/checkTraceCallSequence.ml index 97839c931..bc31d043d 100644 --- a/infer/src/checkers/checkTraceCallSequence.ml +++ b/infer/src/checkers/checkTraceCallSequence.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format open Dataflow diff --git a/infer/src/checkers/checkTraceCallSequence.mli b/infer/src/checkers/checkTraceCallSequence.mli index 221965659..161efdcee 100644 --- a/infer/src/checkers/checkTraceCallSequence.mli +++ b/infer/src/checkers/checkTraceCallSequence.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Check the sequence of calls to tracing APIs in a method (intraprocedural). *) val callback_check_trace_call_sequence: Callbacks.proc_callback_t diff --git a/infer/src/checkers/checkers.ml b/infer/src/checkers/checkers.ml index d8d137e83..da8e11d37 100644 --- a/infer/src/checkers/checkers.ml +++ b/infer/src/checkers/checkers.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for user-defined checkers. *) module L = Logging diff --git a/infer/src/checkers/checkers.mli b/infer/src/checkers/checkers.mli index aa3099eb4..0483c59d2 100644 --- a/infer/src/checkers/checkers.mli +++ b/infer/src/checkers/checkers.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for user-defined checkers. *) diff --git a/infer/src/checkers/codeQuery.ml b/infer/src/checkers/codeQuery.ml index 0d39ea293..8e472c9f1 100644 --- a/infer/src/checkers/codeQuery.ml +++ b/infer/src/checkers/codeQuery.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for code queries. *) module L = Logging diff --git a/infer/src/checkers/codeQuery.mli b/infer/src/checkers/codeQuery.mli index 59cc15341..137d20427 100644 --- a/infer/src/checkers/codeQuery.mli +++ b/infer/src/checkers/codeQuery.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for code queries. *) val code_query_callback : Callbacks.proc_callback_t diff --git a/infer/src/checkers/codeQueryAst.ml b/infer/src/checkers/codeQueryAst.ml index 1f1ecaf16..44e8c7eb8 100644 --- a/infer/src/checkers/codeQueryAst.ml +++ b/infer/src/checkers/codeQueryAst.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Abstract synyax tree for code queries. *) module L = Logging diff --git a/infer/src/checkers/constantPropagation.ml b/infer/src/checkers/constantPropagation.ml index 58f800be3..86eff5656 100644 --- a/infer/src/checkers/constantPropagation.ml +++ b/infer/src/checkers/constantPropagation.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging diff --git a/infer/src/checkers/constantPropagation.mli b/infer/src/checkers/constantPropagation.mli index d11b81640..ce85c8d16 100644 --- a/infer/src/checkers/constantPropagation.mli +++ b/infer/src/checkers/constantPropagation.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type const_map = Cfg.Node.t -> Sil.exp -> Sil.const option (** Build a const map lazily. *) diff --git a/infer/src/checkers/copyPropagation.ml b/infer/src/checkers/copyPropagation.ml index f615578e8..565829374 100644 --- a/infer/src/checkers/copyPropagation.ml +++ b/infer/src/checkers/copyPropagation.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module L = Logging diff --git a/infer/src/checkers/dataflow.ml b/infer/src/checkers/dataflow.ml index bcb413c34..3ced387a9 100644 --- a/infer/src/checkers/dataflow.ml +++ b/infer/src/checkers/dataflow.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging type throws = diff --git a/infer/src/checkers/dataflow.mli b/infer/src/checkers/dataflow.mli index 0ce0f0063..39612477f 100644 --- a/infer/src/checkers/dataflow.mli +++ b/infer/src/checkers/dataflow.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type throws = | DontKnow (** May or may not throw an exception. *) | Throws (** Definitely throws an exception. *) diff --git a/infer/src/checkers/fragmentRetainsViewChecker.ml b/infer/src/checkers/fragmentRetainsViewChecker.ml index ad73ba579..79030cc32 100644 --- a/infer/src/checkers/fragmentRetainsViewChecker.ml +++ b/infer/src/checkers/fragmentRetainsViewChecker.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *) module P = Printf diff --git a/infer/src/checkers/idenv.ml b/infer/src/checkers/idenv.ml index 2ad5de673..e5e9cbc15 100644 --- a/infer/src/checkers/idenv.ml +++ b/infer/src/checkers/idenv.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Environment for temporary identifiers used in instructions. Lazy implementation: only created when actually used. *) diff --git a/infer/src/checkers/idenv.mli b/infer/src/checkers/idenv.mli index 5e48646ba..c168db5c1 100644 --- a/infer/src/checkers/idenv.mli +++ b/infer/src/checkers/idenv.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Environment for temporary identifiers used in instructions. Lazy implementation: only created when actually used. *) diff --git a/infer/src/checkers/immutableChecker.ml b/infer/src/checkers/immutableChecker.ml index 0165f0b59..f2705a19d 100644 --- a/infer/src/checkers/immutableChecker.ml +++ b/infer/src/checkers/immutableChecker.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/checkers/immutableChecker.mli b/infer/src/checkers/immutableChecker.mli index 5e3e04a63..ddf7217a7 100644 --- a/infer/src/checkers/immutableChecker.mli +++ b/infer/src/checkers/immutableChecker.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val callback_check_immutable_cast : Callbacks.proc_callback_t diff --git a/infer/src/checkers/liveness.ml b/infer/src/checkers/liveness.ml index 712718270..192a37bff 100644 --- a/infer/src/checkers/liveness.ml +++ b/infer/src/checkers/liveness.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module L = Logging diff --git a/infer/src/checkers/patternMatch.ml b/infer/src/checkers/patternMatch.ml index 6550da50d..fe1a54ab8 100644 --- a/infer/src/checkers/patternMatch.ml +++ b/infer/src/checkers/patternMatch.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Pattern matching. *) module L = Logging diff --git a/infer/src/checkers/patternMatch.mli b/infer/src/checkers/patternMatch.mli index ddc343ebe..782a1df9c 100644 --- a/infer/src/checkers/patternMatch.mli +++ b/infer/src/checkers/patternMatch.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Pattern matching. *) type method_str = { diff --git a/infer/src/checkers/performanceCritical.ml b/infer/src/checkers/performanceCritical.ml index 1409926bc..1075d2ade 100644 --- a/infer/src/checkers/performanceCritical.ml +++ b/infer/src/checkers/performanceCritical.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging (* Warning name when a performance critical method directly or indirectly diff --git a/infer/src/checkers/performanceCritical.mli b/infer/src/checkers/performanceCritical.mli index 9e47924b1..5b5b144f5 100644 --- a/infer/src/checkers/performanceCritical.mli +++ b/infer/src/checkers/performanceCritical.mli @@ -7,5 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val callback_performance_checker : Callbacks.proc_callback_t diff --git a/infer/src/checkers/printfArgs.ml b/infer/src/checkers/printfArgs.ml index 38d00ea91..66e396987 100644 --- a/infer/src/checkers/printfArgs.ml +++ b/infer/src/checkers/printfArgs.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/checkers/printfArgs.mli b/infer/src/checkers/printfArgs.mli index ae2865981..5b3d6de96 100644 --- a/infer/src/checkers/printfArgs.mli +++ b/infer/src/checkers/printfArgs.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type printf_signature = { unique_id: string; diff --git a/infer/src/checkers/procCfg.ml b/infer/src/checkers/procCfg.ml index bda5fb9fa..112430bd4 100644 --- a/infer/src/checkers/procCfg.ml +++ b/infer/src/checkers/procCfg.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format diff --git a/infer/src/checkers/procData.ml b/infer/src/checkers/procData.ml index 53a834003..288a32732 100644 --- a/infer/src/checkers/procData.ml +++ b/infer/src/checkers/procData.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type t = { pdesc : Cfg.Procdesc.t; tenv : Tenv.t } let make pdesc tenv = { pdesc; tenv } diff --git a/infer/src/checkers/registerCheckers.ml b/infer/src/checkers/registerCheckers.ml index 0c2ada52d..5cfb42fac 100644 --- a/infer/src/checkers/registerCheckers.ml +++ b/infer/src/checkers/registerCheckers.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for registering checkers. *) module L = Logging diff --git a/infer/src/checkers/repeatedCallsChecker.ml b/infer/src/checkers/repeatedCallsChecker.ml index b176b29b1..501b6a356 100644 --- a/infer/src/checkers/repeatedCallsChecker.ml +++ b/infer/src/checkers/repeatedCallsChecker.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/checkers/repeatedCallsChecker.mli b/infer/src/checkers/repeatedCallsChecker.mli index e1c240c54..604e56546 100644 --- a/infer/src/checkers/repeatedCallsChecker.mli +++ b/infer/src/checkers/repeatedCallsChecker.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val callback_check_repeated_calls : Callbacks.proc_callback_t diff --git a/infer/src/checkers/scheduler.ml b/infer/src/checkers/scheduler.ml index 26fa4f6c8..73e302d97 100644 --- a/infer/src/checkers/scheduler.ml +++ b/infer/src/checkers/scheduler.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module L = Logging diff --git a/infer/src/checkers/sqlChecker.ml b/infer/src/checkers/sqlChecker.ml index 03d4d1bbf..00c4d7c65 100644 --- a/infer/src/checkers/sqlChecker.ml +++ b/infer/src/checkers/sqlChecker.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging diff --git a/infer/src/checkers/sqlChecker.mli b/infer/src/checkers/sqlChecker.mli index dcfaa1785..5d1ed3d80 100644 --- a/infer/src/checkers/sqlChecker.mli +++ b/infer/src/checkers/sqlChecker.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val callback_sql : Callbacks.proc_callback_t diff --git a/infer/src/checkers/summary.ml b/infer/src/checkers/summary.ml index 35bbfedca..0f6351dc7 100644 --- a/infer/src/checkers/summary.ml +++ b/infer/src/checkers/summary.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module type Helper = sig type summary diff --git a/infer/src/checkers/transferFunctions.ml b/infer/src/checkers/transferFunctions.ml index 0627081ff..cb3b81975 100644 --- a/infer/src/checkers/transferFunctions.ml +++ b/infer/src/checkers/transferFunctions.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module type S = sig type astate diff --git a/infer/src/checkers/var.ml b/infer/src/checkers/var.ml index fc461beaf..c8a46484d 100644 --- a/infer/src/checkers/var.ml +++ b/infer/src/checkers/var.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** single abstraction for all the kinds of variables in SIL *) type var = diff --git a/infer/src/clang/ast_expressions.ml b/infer/src/clang/ast_expressions.ml index df31ede7b..5d01f48cb 100644 --- a/infer/src/clang/ast_expressions.ml +++ b/infer/src/clang/ast_expressions.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open CFrontend_utils (** This module creates extra ast constructs that are needed for the translation *) diff --git a/infer/src/clang/ast_expressions.mli b/infer/src/clang/ast_expressions.mli index cc797b723..81f1d7877 100644 --- a/infer/src/clang/ast_expressions.mli +++ b/infer/src/clang/ast_expressions.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Clang_ast_t (** This module creates extra ast constructs that are needed for the translation *) diff --git a/infer/src/clang/cArithmetic_trans.ml b/infer/src/clang/cArithmetic_trans.ml index 1fe12c306..2bb912b52 100644 --- a/infer/src/clang/cArithmetic_trans.ml +++ b/infer/src/clang/cArithmetic_trans.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility module for translating unary and binary operations and compound assignments *) open CFrontend_utils diff --git a/infer/src/clang/cArithmetic_trans.mli b/infer/src/clang/cArithmetic_trans.mli index 7422a6c43..b3afb93f1 100644 --- a/infer/src/clang/cArithmetic_trans.mli +++ b/infer/src/clang/cArithmetic_trans.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility module for translating unary and binary operations and compound assignments *) val bin_op_to_string : Clang_ast_t.binary_operator_info -> string diff --git a/infer/src/clang/cContext.ml b/infer/src/clang/cContext.ml index e47f0b464..64e52a4a3 100644 --- a/infer/src/clang/cContext.ml +++ b/infer/src/clang/cContext.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** 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. *) diff --git a/infer/src/clang/cContext.mli b/infer/src/clang/cContext.mli index 261cb4fdc..2c2baa85b 100644 --- a/infer/src/clang/cContext.mli +++ b/infer/src/clang/cContext.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** 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. *) diff --git a/infer/src/clang/cEnum_decl.ml b/infer/src/clang/cEnum_decl.ml index cee9d54e6..da1e62b6f 100644 --- a/infer/src/clang/cEnum_decl.ml +++ b/infer/src/clang/cEnum_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Translate an enumeration declaration by adding it to the tenv and *) (** translating the code and adding it to a fake procdesc *) diff --git a/infer/src/clang/cEnum_decl.mli b/infer/src/clang/cEnum_decl.mli index 56941919b..6bda1c472 100644 --- a/infer/src/clang/cEnum_decl.mli +++ b/infer/src/clang/cEnum_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Translate an enumeration declaration by adding it to the tenv and *) (** translating the code and adding it to a fake procdesc *) diff --git a/infer/src/clang/cField_decl.ml b/infer/src/clang/cField_decl.ml index bb726b22f..4897798e5 100644 --- a/infer/src/clang/cField_decl.ml +++ b/infer/src/clang/cField_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility module to retrieve fields of structs of classes *) open CFrontend_utils diff --git a/infer/src/clang/cField_decl.mli b/infer/src/clang/cField_decl.mli index 9f5fdcb4b..d5e69e45e 100644 --- a/infer/src/clang/cField_decl.mli +++ b/infer/src/clang/cField_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility module to retrieve fields of structs of classes *) open CFrontend_utils diff --git a/infer/src/clang/cFrontend.ml b/infer/src/clang/cFrontend.ml index 4d6112b8b..58fcc410d 100644 --- a/infer/src/clang/cFrontend.ml +++ b/infer/src/clang/cFrontend.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging diff --git a/infer/src/clang/cFrontend.mli b/infer/src/clang/cFrontend.mli index 4c9d2cc80..87d855bea 100644 --- a/infer/src/clang/cFrontend.mli +++ b/infer/src/clang/cFrontend.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Translate one file into a cfg. Create a tenv, cg and cfg file for a source file *) (** given its ast in json format. Translate the json file into a cfg by adding all *) (** the type and class declarations to the tenv, adding all the functions and methods *) diff --git a/infer/src/clang/cFrontend_checkers.ml b/infer/src/clang/cFrontend_checkers.ml index ad177a28b..8b30b558b 100644 --- a/infer/src/clang/cFrontend_checkers.ml +++ b/infer/src/clang/cFrontend_checkers.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open CFrontend_utils (* To create a new checker you should: *) diff --git a/infer/src/clang/cFrontend_checkers.mli b/infer/src/clang/cFrontend_checkers.mli index 71ba38357..7ae8b333f 100644 --- a/infer/src/clang/cFrontend_checkers.mli +++ b/infer/src/clang/cFrontend_checkers.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type warning_desc = { name : string; (* name for the checker, this will be a kind of bug *) description : string; (* Description in the error message *) diff --git a/infer/src/clang/cFrontend_config.ml b/infer/src/clang/cFrontend_config.ml index 3c293680d..6f26769e8 100644 --- a/infer/src/clang/cFrontend_config.ml +++ b/infer/src/clang/cFrontend_config.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module that contains constants and variables used in the frontend *) let no_translate_libs = ref true diff --git a/infer/src/clang/cFrontend_config.mli b/infer/src/clang/cFrontend_config.mli index 3d59ac7e1..5a6d955ba 100644 --- a/infer/src/clang/cFrontend_config.mli +++ b/infer/src/clang/cFrontend_config.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module that contains constants and variables used in the frontend *) val global_translation_unit_decls : Clang_ast_t.decl list ref diff --git a/infer/src/clang/cFrontend_decl.ml b/infer/src/clang/cFrontend_decl.ml index 9265a2796..4658f5b81 100644 --- a/infer/src/clang/cFrontend_decl.ml +++ b/infer/src/clang/cFrontend_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Translate declarations **) module L = Logging diff --git a/infer/src/clang/cFrontend_decl.mli b/infer/src/clang/cFrontend_decl.mli index 4c0f86aac..d38aa1254 100644 --- a/infer/src/clang/cFrontend_decl.mli +++ b/infer/src/clang/cFrontend_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Translate declarations **) module type CFrontend_decl = sig diff --git a/infer/src/clang/cFrontend_errors.ml b/infer/src/clang/cFrontend_errors.ml index 860528664..d9c6f2b54 100644 --- a/infer/src/clang/cFrontend_errors.ml +++ b/infer/src/clang/cFrontend_errors.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open CFrontend_utils (* List of checkers on properties *) diff --git a/infer/src/clang/cFrontend_errors.mli b/infer/src/clang/cFrontend_errors.mli index 17714a2e6..0f45235c3 100644 --- a/infer/src/clang/cFrontend_errors.mli +++ b/infer/src/clang/cFrontend_errors.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (* Module for warnings detected at translation time by the frontend *) diff --git a/infer/src/clang/cFrontend_utils.ml b/infer/src/clang/cFrontend_utils.ml index f3c60641f..a161b20d3 100644 --- a/infer/src/clang/cFrontend_utils.ml +++ b/infer/src/clang/cFrontend_utils.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** 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 *) diff --git a/infer/src/clang/cFrontend_utils.mli b/infer/src/clang/cFrontend_utils.mli index 7aa3cc1ea..a07d0ae46 100644 --- a/infer/src/clang/cFrontend_utils.mli +++ b/infer/src/clang/cFrontend_utils.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** 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 *) diff --git a/infer/src/clang/cLocation.ml b/infer/src/clang/cLocation.ml index 058af4911..a6efa03a1 100644 --- a/infer/src/clang/cLocation.ml +++ b/infer/src/clang/cLocation.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for function to retrieve the location (file, line, etc) of instructions *) open CFrontend_utils diff --git a/infer/src/clang/cLocation.mli b/infer/src/clang/cLocation.mli index 4d7370345..3c2b25be0 100644 --- a/infer/src/clang/cLocation.mli +++ b/infer/src/clang/cLocation.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for function to retrieve the location (file, line, etc) of instructions *) (* Inside the json there may be code or type definitions from other files *) diff --git a/infer/src/clang/cMain.ml b/infer/src/clang/cMain.ml index 724765bdc..0ae344245 100644 --- a/infer/src/clang/cMain.ml +++ b/infer/src/clang/cMain.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (* Take as input an ast file and a C or ObjectiveC file such that the ast file corresponds to the compilation of the C file with clang. Parse the ast file into a data structure and translates it into a cfg. *) diff --git a/infer/src/clang/cMain.mli b/infer/src/clang/cMain.mli index b20b53fce..0160ff0c5 100644 --- a/infer/src/clang/cMain.mli +++ b/infer/src/clang/cMain.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Main module of InferClang. Take as input AST files produced by clang during compilation *) (** and their corresponding C/C++/ObjectiveC source files. *) (** Parse the arguments, parse and validate the input AST into a data structure *) diff --git a/infer/src/clang/cMethod_signature.ml b/infer/src/clang/cMethod_signature.ml index e4b0c285c..dec40ebea 100644 --- a/infer/src/clang/cMethod_signature.ml +++ b/infer/src/clang/cMethod_signature.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Define the signature of a method consisting of its name, its arguments, *) (** return type, location and whether its an instance method. *) diff --git a/infer/src/clang/cMethod_signature.mli b/infer/src/clang/cMethod_signature.mli index 6c49e4c6b..ced30bdcf 100644 --- a/infer/src/clang/cMethod_signature.mli +++ b/infer/src/clang/cMethod_signature.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Define the signature of a method consisting of its name, its arguments, *) (** return type, location and whether its an instance method. *) diff --git a/infer/src/clang/cMethod_trans.ml b/infer/src/clang/cMethod_trans.ml index 6135abd78..091835bcb 100644 --- a/infer/src/clang/cMethod_trans.ml +++ b/infer/src/clang/cMethod_trans.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Methods for creating a procdesc from a method or function declaration *) (** and for resolving a method call and finding the right callee *) diff --git a/infer/src/clang/cMethod_trans.mli b/infer/src/clang/cMethod_trans.mli index 7ca08901f..d84881ef7 100644 --- a/infer/src/clang/cMethod_trans.mli +++ b/infer/src/clang/cMethod_trans.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Methods for creating a procdesc from a method or function declaration and for resolving a method call and finding the right callee *) diff --git a/infer/src/clang/cModule_type.ml b/infer/src/clang/cModule_type.ml index d6ad2a957..a7409460a 100644 --- a/infer/src/clang/cModule_type.ml +++ b/infer/src/clang/cModule_type.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type block_data = CContext.t * Clang_ast_t.type_ptr * Procname.t * (Pvar.t * Sil.typ) list type instr_type = [ diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 874d5adf2..4916f6cd0 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Translates instructions: (statements and expressions) from the ast into sil *) open CTrans_utils diff --git a/infer/src/clang/cTrans.mli b/infer/src/clang/cTrans.mli index 5e74265e5..e4906a282 100644 --- a/infer/src/clang/cTrans.mli +++ b/infer/src/clang/cTrans.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module type CTrans = sig (** Translates instructions: (statements and expressions) from the ast into sil *) diff --git a/infer/src/clang/cTrans_models.ml b/infer/src/clang/cTrans_models.ml index fab44bd9e..f80792dbd 100644 --- a/infer/src/clang/cTrans_models.ml +++ b/infer/src/clang/cTrans_models.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open CFrontend_utils open Objc_models diff --git a/infer/src/clang/cTrans_models.mli b/infer/src/clang/cTrans_models.mli index 12a354e43..d4232a9c2 100644 --- a/infer/src/clang/cTrans_models.mli +++ b/infer/src/clang/cTrans_models.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val is_cf_non_null_alloc : Procname.t option -> bool val is_alloc : Procname.t option -> bool diff --git a/infer/src/clang/cTrans_utils.ml b/infer/src/clang/cTrans_utils.ml index f0d01a8f0..6ece4fdb3 100644 --- a/infer/src/clang/cTrans_utils.ml +++ b/infer/src/clang/cTrans_utils.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility methods to support the translation of clang ast constructs into sil instructions. *) open CFrontend_utils diff --git a/infer/src/clang/cTrans_utils.mli b/infer/src/clang/cTrans_utils.mli index b1cbfe7aa..31340d85c 100644 --- a/infer/src/clang/cTrans_utils.mli +++ b/infer/src/clang/cTrans_utils.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility methods to support the translation of clang ast constructs into sil instructions. *) type continuation = { diff --git a/infer/src/clang/cType_to_sil_type.ml b/infer/src/clang/cType_to_sil_type.ml index f6e4abaa4..6e88963b7 100644 --- a/infer/src/clang/cType_to_sil_type.ml +++ b/infer/src/clang/cType_to_sil_type.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open CFrontend_utils let get_builtin_objc_typename builtin_type = diff --git a/infer/src/clang/cType_to_sil_type.mli b/infer/src/clang/cType_to_sil_type.mli index f80a38475..c50bc2ba4 100644 --- a/infer/src/clang/cType_to_sil_type.mli +++ b/infer/src/clang/cType_to_sil_type.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val get_builtin_objc_typename : [< `ObjCClass | `ObjCId ] -> Typename.t val get_builtin_objc_type : [< `ObjCClass | `ObjCId ] -> Sil.typ diff --git a/infer/src/clang/cTypes.ml b/infer/src/clang/cTypes.ml index b4919d40b..79b9956a6 100644 --- a/infer/src/clang/cTypes.ml +++ b/infer/src/clang/cTypes.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility module for retrieving types *) open CFrontend_utils diff --git a/infer/src/clang/cTypes.mli b/infer/src/clang/cTypes.mli index 2c7405c52..fb7760d66 100644 --- a/infer/src/clang/cTypes.mli +++ b/infer/src/clang/cTypes.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Utility module for retrieving types *) val add_pointer_to_typ : Sil.typ -> Sil.typ diff --git a/infer/src/clang/cTypes_decl.ml b/infer/src/clang/cTypes_decl.ml index f52d9b34e..3adb28e2b 100644 --- a/infer/src/clang/cTypes_decl.ml +++ b/infer/src/clang/cTypes_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Processes types and record declarations by adding them to the tenv *) open CFrontend_utils diff --git a/infer/src/clang/cTypes_decl.mli b/infer/src/clang/cTypes_decl.mli index 64f4c6b68..c48be6a23 100644 --- a/infer/src/clang/cTypes_decl.mli +++ b/infer/src/clang/cTypes_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Processes types and record declarations by adding them to the tenv *) val add_struct_to_tenv : Tenv.t -> Sil.typ -> unit diff --git a/infer/src/clang/cVar_decl.ml b/infer/src/clang/cVar_decl.ml index 2619d0ebb..6caec31b8 100644 --- a/infer/src/clang/cVar_decl.ml +++ b/infer/src/clang/cVar_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Process variable declarations by saving them as local or global variables. *) (** Computes the local variables of a function or method to be added to the procdesc *) diff --git a/infer/src/clang/cVar_decl.mli b/infer/src/clang/cVar_decl.mli index 662af8018..30e4b8101 100644 --- a/infer/src/clang/cVar_decl.mli +++ b/infer/src/clang/cVar_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Process variable declarations by saving them as local or global variables. *) (** Computes the local variables of a function or method to be added to the procdesc *) diff --git a/infer/src/clang/clang_ast_types.ml b/infer/src/clang/clang_ast_types.ml index 0521439cf..a615f8732 100644 --- a/infer/src/clang/clang_ast_types.ml +++ b/infer/src/clang/clang_ast_types.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (* This module adds more structure to some fields in AST *) (* The implementation is replacement of default one from *) (* facebook-clang-plugins repository *) diff --git a/infer/src/clang/objcCategory_decl.ml b/infer/src/clang/objcCategory_decl.ml index 38ccbca72..b03ef30df 100644 --- a/infer/src/clang/objcCategory_decl.ml +++ b/infer/src/clang/objcCategory_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open CFrontend_utils module L = Logging diff --git a/infer/src/clang/objcCategory_decl.mli b/infer/src/clang/objcCategory_decl.mli index fc72edb4a..d99f77bf5 100644 --- a/infer/src/clang/objcCategory_decl.mli +++ b/infer/src/clang/objcCategory_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** In this module an ObjC category declaration or implementation is processed. The category *) (** is saved in the tenv as a struct with the corresponding fields and methods , and the class it belongs to *) diff --git a/infer/src/clang/objcInterface_decl.ml b/infer/src/clang/objcInterface_decl.ml index a77c620a4..3919163ec 100644 --- a/infer/src/clang/objcInterface_decl.ml +++ b/infer/src/clang/objcInterface_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** In this module an ObjC interface declaration or implementation is processed. The class *) (** is saved in the tenv as a struct with the corresponding fields, potential superclass and *) (** list of defined methods *) diff --git a/infer/src/clang/objcInterface_decl.mli b/infer/src/clang/objcInterface_decl.mli index 54481a5b7..65700d706 100644 --- a/infer/src/clang/objcInterface_decl.mli +++ b/infer/src/clang/objcInterface_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** In this module an ObjC interface declaration is processed. The class *) (** is saved in the tenv as a struct with the corresponding fields, potential superclass and *) (** list of defined methods *) diff --git a/infer/src/clang/objcProperty_decl.ml b/infer/src/clang/objcProperty_decl.ml index 42cbdf045..39e0ea56d 100644 --- a/infer/src/clang/objcProperty_decl.ml +++ b/infer/src/clang/objcProperty_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Process properties by creating their getters and setters in the case that they need to be syntethized *) (** or in the case of dynamic. *) (* How it works: *) diff --git a/infer/src/clang/objcProperty_decl.mli b/infer/src/clang/objcProperty_decl.mli index 507be9830..87413a199 100644 --- a/infer/src/clang/objcProperty_decl.mli +++ b/infer/src/clang/objcProperty_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Process properties by creating their getters and setters in the case that they need to be syntethized *) (** or in the case of dynamic. *) diff --git a/infer/src/clang/objcProtocol_decl.ml b/infer/src/clang/objcProtocol_decl.ml index 495162514..e18227614 100644 --- a/infer/src/clang/objcProtocol_decl.ml +++ b/infer/src/clang/objcProtocol_decl.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open CFrontend_utils module L = Logging diff --git a/infer/src/clang/objcProtocol_decl.mli b/infer/src/clang/objcProtocol_decl.mli index ded0b9b22..f5b640cab 100644 --- a/infer/src/clang/objcProtocol_decl.mli +++ b/infer/src/clang/objcProtocol_decl.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** In this module an ObjC protocol declaration or implementation is processed. The protocol *) (** is saved in the tenv as a struct with the corresponding methods *) diff --git a/infer/src/eradicate/eradicate.ml b/infer/src/eradicate/eradicate.ml index 5102dbe28..6304e8d68 100644 --- a/infer/src/eradicate/eradicate.ml +++ b/infer/src/eradicate/eradicate.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Eradicate NPEs. *) module L = Logging diff --git a/infer/src/eradicate/eradicate.mli b/infer/src/eradicate/eradicate.mli index 2d4c3607d..599143888 100644 --- a/infer/src/eradicate/eradicate.mli +++ b/infer/src/eradicate/eradicate.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Eradicate NPEs. *) val callback_eradicate : Callbacks.proc_callback_t diff --git a/infer/src/eradicate/eradicateChecks.ml b/infer/src/eradicate/eradicateChecks.ml index c26105832..c856d29e4 100644 --- a/infer/src/eradicate/eradicateChecks.ml +++ b/infer/src/eradicate/eradicateChecks.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging (** Module for the checks called by Eradicate. *) diff --git a/infer/src/eradicate/modelTables.ml b/infer/src/eradicate/modelTables.ml index 32db8b988..811265310 100644 --- a/infer/src/eradicate/modelTables.ml +++ b/infer/src/eradicate/modelTables.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (* * This file is a big bunch of tables; they read better with really long lines. * @nolint diff --git a/infer/src/eradicate/modelTables.mli b/infer/src/eradicate/modelTables.mli index 77cab0698..734b9ff05 100644 --- a/infer/src/eradicate/modelTables.mli +++ b/infer/src/eradicate/modelTables.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type model_table_t = (string, bool * bool list) Hashtbl.t (** Name of this file. *) diff --git a/infer/src/eradicate/models.ml b/infer/src/eradicate/models.ml index 22fa40e2e..0ad355299 100644 --- a/infer/src/eradicate/models.ml +++ b/infer/src/eradicate/models.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open ModelTables module L = Logging diff --git a/infer/src/eradicate/typeAnnotation.ml b/infer/src/eradicate/typeAnnotation.ml index 8707e3538..1173d6f24 100644 --- a/infer/src/eradicate/typeAnnotation.ml +++ b/infer/src/eradicate/typeAnnotation.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format module P = Printf diff --git a/infer/src/eradicate/typeAnnotation.mli b/infer/src/eradicate/typeAnnotation.mli index f42bd8f3c..1b25c7842 100644 --- a/infer/src/eradicate/typeAnnotation.mli +++ b/infer/src/eradicate/typeAnnotation.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Nodule to represent annotations on types. *) type t diff --git a/infer/src/eradicate/typeCheck.ml b/infer/src/eradicate/typeCheck.ml index 9278ebadc..0a7e5b73e 100644 --- a/infer/src/eradicate/typeCheck.ml +++ b/infer/src/eradicate/typeCheck.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/eradicate/typeCheck.mli b/infer/src/eradicate/typeCheck.mli index 6362b83f3..ade239c3b 100644 --- a/infer/src/eradicate/typeCheck.mli +++ b/infer/src/eradicate/typeCheck.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module type for the type checking functions. *) diff --git a/infer/src/eradicate/typeErr.ml b/infer/src/eradicate/typeErr.ml index 2e87b9e61..0a574baa8 100644 --- a/infer/src/eradicate/typeErr.ml +++ b/infer/src/eradicate/typeErr.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module P = Printf diff --git a/infer/src/eradicate/typeErr.mli b/infer/src/eradicate/typeErr.mli index 228ca10c8..b3276f1a2 100644 --- a/infer/src/eradicate/typeErr.mli +++ b/infer/src/eradicate/typeErr.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for Type Error messages. *) diff --git a/infer/src/eradicate/typeOrigin.ml b/infer/src/eradicate/typeOrigin.ml index 846604fa5..1270819c5 100644 --- a/infer/src/eradicate/typeOrigin.ml +++ b/infer/src/eradicate/typeOrigin.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module P = Printf diff --git a/infer/src/eradicate/typeOrigin.mli b/infer/src/eradicate/typeOrigin.mli index 2f5186598..b11c14178 100644 --- a/infer/src/eradicate/typeOrigin.mli +++ b/infer/src/eradicate/typeOrigin.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Case Proc *) type proc_origin = { diff --git a/infer/src/eradicate/typeState.ml b/infer/src/eradicate/typeState.ml index 8dd0b4ce7..2ba4be3ee 100644 --- a/infer/src/eradicate/typeState.ml +++ b/infer/src/eradicate/typeState.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format module P = Printf diff --git a/infer/src/eradicate/typeState.mli b/infer/src/eradicate/typeState.mli index 85323c0a0..0220d08c7 100644 --- a/infer/src/eradicate/typeState.mli +++ b/infer/src/eradicate/typeState.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for typestates: maps from expressions to annotated types, with extensions. *) (** Parameters of a call. *) diff --git a/infer/src/harness/androidFramework.ml b/infer/src/harness/androidFramework.ml index 3350f1919..22436bef7 100644 --- a/infer/src/harness/androidFramework.ml +++ b/infer/src/harness/androidFramework.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format module TypSet = Sil.TypSet diff --git a/infer/src/harness/androidFramework.mli b/infer/src/harness/androidFramework.mli index a8a1a7389..2e197a182 100644 --- a/infer/src/harness/androidFramework.mli +++ b/infer/src/harness/androidFramework.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Android lifecycle types and their lifecycle methods that are called by the framework *) (** return the complete list of (package, lifecycle_classname, lifecycle_methods) trios *) diff --git a/infer/src/harness/harness.ml b/infer/src/harness/harness.ml index a5d13a8be..1ccfcc8ea 100644 --- a/infer/src/harness/harness.ml +++ b/infer/src/harness/harness.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/harness/harness.mli b/infer/src/harness/harness.mli index 7994698b0..bb2191fa9 100644 --- a/infer/src/harness/harness.mli +++ b/infer/src/harness/harness.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Automatically create a harness method to exercise code under test *) (** Generate a harness method for exe_env and add it to the execution environment *) diff --git a/infer/src/harness/inhabit.ml b/infer/src/harness/inhabit.ml index e9d2b43a1..28ec9ab7d 100644 --- a/infer/src/harness/inhabit.ml +++ b/infer/src/harness/inhabit.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Generate a procedure that calls a given sequence of methods. Useful for harness/test * generation. *) diff --git a/infer/src/harness/inhabit.mli b/infer/src/harness/inhabit.mli index 167c7f3d5..9d5909d9e 100644 --- a/infer/src/harness/inhabit.mli +++ b/infer/src/harness/inhabit.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Generate a procedure that calls a given sequence of methods. Useful for harness/test generation. *) type lifecycle_trace = (Procname.t * Sil.typ option) list diff --git a/infer/src/harness/stacktrace.ml b/infer/src/harness/stacktrace.ml index 0dbd61bd4..8b2aa76a1 100644 --- a/infer/src/harness/stacktrace.ml +++ b/infer/src/harness/stacktrace.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for parsing stack traces and using them to guide Infer analysis *) module L = Logging diff --git a/infer/src/harness/stacktrace.mli b/infer/src/harness/stacktrace.mli index 6c663cc89..cdfe9734e 100644 --- a/infer/src/harness/stacktrace.mli +++ b/infer/src/harness/stacktrace.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Module for parsing stack traces and using them to guide Infer analysis *) type stack_trace diff --git a/infer/src/java/jAnnotation.ml b/infer/src/java/jAnnotation.ml index 806925b16..98ac50217 100644 --- a/infer/src/java/jAnnotation.ml +++ b/infer/src/java/jAnnotation.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack diff --git a/infer/src/java/jAnnotation.mli b/infer/src/java/jAnnotation.mli index be5f1eb5d..2586b764e 100644 --- a/infer/src/java/jAnnotation.mli +++ b/infer/src/java/jAnnotation.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack diff --git a/infer/src/java/jClasspath.ml b/infer/src/java/jClasspath.ml index 85ed9f830..e19e1f283 100644 --- a/infer/src/java/jClasspath.ml +++ b/infer/src/java/jClasspath.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack module L = Logging diff --git a/infer/src/java/jClasspath.mli b/infer/src/java/jClasspath.mli index dbee611bd..e1a73d12a 100644 --- a/infer/src/java/jClasspath.mli +++ b/infer/src/java/jClasspath.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack (** Jar file containing the models *) diff --git a/infer/src/java/jConfig.ml b/infer/src/java/jConfig.ml index aecff99bc..23fb64e96 100644 --- a/infer/src/java/jConfig.ml +++ b/infer/src/java/jConfig.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack (** {2 Class names and types} *) diff --git a/infer/src/java/jContext.ml b/infer/src/java/jContext.ml index 97648c932..3fa675f17 100644 --- a/infer/src/java/jContext.ml +++ b/infer/src/java/jContext.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jContext.mli b/infer/src/java/jContext.mli index 6ea809c4f..a93164bda 100644 --- a/infer/src/java/jContext.mli +++ b/infer/src/java/jContext.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jFrontend.ml b/infer/src/java/jFrontend.ml index 33d120a2d..4999ce3f7 100644 --- a/infer/src/java/jFrontend.ml +++ b/infer/src/java/jFrontend.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jFrontend.mli b/infer/src/java/jFrontend.mli index b3b797bef..6a6a329cd 100644 --- a/infer/src/java/jFrontend.mli +++ b/infer/src/java/jFrontend.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack (** [path_of_cached_classname cn] returns the path of a cached classname *) diff --git a/infer/src/java/jMain.ml b/infer/src/java/jMain.ml index d94aee972..9cb97a4ff 100644 --- a/infer/src/java/jMain.ml +++ b/infer/src/java/jMain.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack module L = Logging diff --git a/infer/src/java/jTrans.ml b/infer/src/java/jTrans.ml index d39b7767f..0574a7786 100644 --- a/infer/src/java/jTrans.ml +++ b/infer/src/java/jTrans.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTrans.mli b/infer/src/java/jTrans.mli index ff1574f3e..76ecd7500 100644 --- a/infer/src/java/jTrans.mli +++ b/infer/src/java/jTrans.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransExn.ml b/infer/src/java/jTransExn.ml index c413fcb40..1ceaf370d 100644 --- a/infer/src/java/jTransExn.ml +++ b/infer/src/java/jTransExn.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransExn.mli b/infer/src/java/jTransExn.mli index e5832af79..6f1cb2b0f 100644 --- a/infer/src/java/jTransExn.mli +++ b/infer/src/java/jTransExn.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Sawja_pack diff --git a/infer/src/java/jTransStaticField.ml b/infer/src/java/jTransStaticField.ml index 6a5de59dd..ee161770b 100644 --- a/infer/src/java/jTransStaticField.ml +++ b/infer/src/java/jTransStaticField.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransStaticField.mli b/infer/src/java/jTransStaticField.mli index 2fa64c83e..7f31d663d 100644 --- a/infer/src/java/jTransStaticField.mli +++ b/infer/src/java/jTransStaticField.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransType.ml b/infer/src/java/jTransType.ml index ae63ad30a..cf6f2319a 100644 --- a/infer/src/java/jTransType.ml +++ b/infer/src/java/jTransType.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransType.mli b/infer/src/java/jTransType.mli index 0dc2c59b8..b021cefc1 100644 --- a/infer/src/java/jTransType.mli +++ b/infer/src/java/jTransType.mli @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jUtils.ml b/infer/src/java/jUtils.ml index 2f998d560..53a277c65 100644 --- a/infer/src/java/jUtils.ml +++ b/infer/src/java/jUtils.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + let rec log fmt = if !JConfig.debug_mode then diff --git a/infer/src/java/jUtils.mli b/infer/src/java/jUtils.mli index b2cdb0e31..9af66bf72 100644 --- a/infer/src/java/jUtils.mli +++ b/infer/src/java/jUtils.mli @@ -8,5 +8,7 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** TODO: replace by a Infer-wide debug mode printing *) val log : ('a, Format.formatter, unit) format -> 'a diff --git a/infer/src/java/jVerbose.ml b/infer/src/java/jVerbose.ml index a43ec5d1b..eb0efff4c 100644 --- a/infer/src/java/jVerbose.ml +++ b/infer/src/java/jVerbose.ml @@ -8,6 +8,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + type parsed_data = | Source of string | Class of string diff --git a/infer/src/llvm/lAst.ml b/infer/src/llvm/lAst.ml index a7bb15d62..6a416a3a1 100644 --- a/infer/src/llvm/lAst.ml +++ b/infer/src/llvm/lAst.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** Representation of LLVM constructs *) module MetadataMap = IntMap;; diff --git a/infer/src/llvm/lConfig.ml b/infer/src/llvm/lConfig.ml index ca31ec15a..a89bdbc8f 100644 --- a/infer/src/llvm/lConfig.ml +++ b/infer/src/llvm/lConfig.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** arguments for InferLLVM *) let debug_mode = ref false diff --git a/infer/src/llvm/lConfig.mli b/infer/src/llvm/lConfig.mli index 665974613..1a8b3c1e5 100644 --- a/infer/src/llvm/lConfig.mli +++ b/infer/src/llvm/lConfig.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** arguments for InferLLVM *) val debug_mode : bool ref diff --git a/infer/src/llvm/lMain.ml b/infer/src/llvm/lMain.ml index 975de3bac..0f57fc716 100644 --- a/infer/src/llvm/lMain.ml +++ b/infer/src/llvm/lMain.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + let arg_desc = let options_to_keep = ["-results_dir"; "-project_root"] in let desc = diff --git a/infer/src/llvm/lPretty.ml b/infer/src/llvm/lPretty.ml index ab6b8fdad..4238a9594 100644 --- a/infer/src/llvm/lPretty.ml +++ b/infer/src/llvm/lPretty.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open LAst let concatmap (sep : string) (f : 'a -> string) (l : 'a list) : string = diff --git a/infer/src/llvm/lTrans.ml b/infer/src/llvm/lTrans.ml index 0413700d8..3a20343f1 100644 --- a/infer/src/llvm/lTrans.ml +++ b/infer/src/llvm/lTrans.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + open LAst exception ImproperTypeError of string diff --git a/infer/src/opensource/fbTaint.ml b/infer/src/opensource/fbTaint.ml index de06c2edc..c93364364 100644 --- a/infer/src/opensource/fbTaint.ml +++ b/infer/src/opensource/fbTaint.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + let sources = [] let sinks = [] let functions_with_tainted_params = [] diff --git a/infer/src/opensource/fbTaint.mli b/infer/src/opensource/fbTaint.mli index 61a503971..cdb23ab2c 100644 --- a/infer/src/opensource/fbTaint.mli +++ b/infer/src/opensource/fbTaint.mli @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val sources : PatternMatch.method_str list val sinks : (PatternMatch.method_str * int list) list diff --git a/infer/src/opensource/fbTraceCalls.ml b/infer/src/opensource/fbTraceCalls.ml index 8c1cb8edd..1ed081de5 100644 --- a/infer/src/opensource/fbTraceCalls.ml +++ b/infer/src/opensource/fbTraceCalls.ml @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + let tracing_methods = [] diff --git a/infer/src/opensource/fbTraceCalls.mli b/infer/src/opensource/fbTraceCalls.mli index c45238366..0a1480022 100644 --- a/infer/src/opensource/fbTraceCalls.mli +++ b/infer/src/opensource/fbTraceCalls.mli @@ -7,4 +7,6 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + val tracing_methods : (string * string * string * string) list diff --git a/infer/src/scripts/checkCopyright.ml b/infer/src/scripts/checkCopyright.ml index 656caff9c..c4595346a 100644 --- a/infer/src/scripts/checkCopyright.ml +++ b/infer/src/scripts/checkCopyright.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module L = Logging module F = Format diff --git a/infer/src/unit/abstractInterpreterTests.ml b/infer/src/unit/abstractInterpreterTests.ml index 836e839f1..6778c96ca 100644 --- a/infer/src/unit/abstractInterpreterTests.ml +++ b/infer/src/unit/abstractInterpreterTests.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format (** Test the generic abstract interpreter by using a simple path counting domain. Path counting is diff --git a/infer/src/unit/addressTakenTests.ml b/infer/src/unit/addressTakenTests.ml index 90fda4584..8b3f05da2 100644 --- a/infer/src/unit/addressTakenTests.ml +++ b/infer/src/unit/addressTakenTests.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module TestInterpreter = AnalyzerTester.Make diff --git a/infer/src/unit/analyzerTester.ml b/infer/src/unit/analyzerTester.ml index 97f6bf0e5..0cfc374dc 100644 --- a/infer/src/unit/analyzerTester.ml +++ b/infer/src/unit/analyzerTester.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module L = Logging diff --git a/infer/src/unit/copyPropagationTests.ml b/infer/src/unit/copyPropagationTests.ml index ca4931359..e8238e32b 100644 --- a/infer/src/unit/copyPropagationTests.ml +++ b/infer/src/unit/copyPropagationTests.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module TestInterpreter = AnalyzerTester.Make diff --git a/infer/src/unit/inferunit.ml b/infer/src/unit/inferunit.ml index 459885233..36854d337 100644 --- a/infer/src/unit/inferunit.ml +++ b/infer/src/unit/inferunit.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + (** module for running OCaml unit tests *) let () = diff --git a/infer/src/unit/livenessTests.ml b/infer/src/unit/livenessTests.ml index ae0c6145f..4d1486f95 100644 --- a/infer/src/unit/livenessTests.ml +++ b/infer/src/unit/livenessTests.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format module TestInterpreter = AnalyzerTester.Make diff --git a/infer/src/unit/schedulerTests.ml b/infer/src/unit/schedulerTests.ml index 5af423375..a1218023b 100644 --- a/infer/src/unit/schedulerTests.ml +++ b/infer/src/unit/schedulerTests.ml @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. *) +open! Utils + module F = Format