From 6911a1516c87024fc4886153e005f78a8a80b3ad Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 24 Jul 2015 13:57:23 -0100 Subject: [PATCH] [whitespace] ocp-indent the code Summary: This commit is the result of `find infer/src -name '*.ml' -or -name '*.mli' -exec ocp-indent -i \{\} \;` and `INFER_CHECK_COPYRIGHT=1 InferPrint` --- infer/src/backend/CRC.ml | 16 +- infer/src/backend/CRC.mli | 16 +- infer/src/backend/DB.ml | 16 +- infer/src/backend/DB.mli | 24 +-- infer/src/backend/abs.ml | 16 +- infer/src/backend/abs.mli | 20 +-- infer/src/backend/absarray.ml | 16 +- infer/src/backend/absarray.mli | 16 +- infer/src/backend/autounit.ml | 16 +- infer/src/backend/autounit.mli | 16 +- infer/src/backend/buckets.ml | 16 +- infer/src/backend/buckets.mli | 18 +-- infer/src/backend/callbacks.ml | 14 +- infer/src/backend/callbacks.mli | 24 +-- infer/src/backend/cfg.ml | 16 +- infer/src/backend/cfg.mli | 24 +-- infer/src/backend/cg.ml | 16 +- infer/src/backend/cg.mli | 22 +-- infer/src/backend/checkCopyright.ml | 18 +-- infer/src/backend/config.ml | 16 +- infer/src/backend/dom.ml | 16 +- infer/src/backend/dom.mli | 24 +-- infer/src/backend/dotty.ml | 16 +- infer/src/backend/dotty.mli | 16 +- infer/src/backend/errdesc.ml | 16 +- infer/src/backend/errdesc.mli | 42 ++--- infer/src/backend/errlog.ml | 14 +- infer/src/backend/errlog.mli | 20 +-- infer/src/backend/exceptions.ml | 16 +- infer/src/backend/exceptions.mli | 24 +-- infer/src/backend/exe_env.ml | 16 +- infer/src/backend/exe_env.mli | 16 +- infer/src/backend/fork.ml | 16 +- infer/src/backend/fork.mli | 26 +-- infer/src/backend/ident.ml | 16 +- infer/src/backend/ident.mli | 16 +- infer/src/backend/inferanalyze.ml | 16 +- infer/src/backend/inferconfig.ml | 14 +- infer/src/backend/inferconfig.mli | 14 +- infer/src/backend/inferprint.ml | 16 +- infer/src/backend/interproc.ml | 16 +- infer/src/backend/interproc.mli | 28 ++-- infer/src/backend/io_infer.ml | 16 +- infer/src/backend/io_infer.mli | 34 ++-- infer/src/backend/latex.ml | 16 +- infer/src/backend/latex.mli | 16 +- infer/src/backend/localise.ml | 16 +- infer/src/backend/localise.mli | 16 +- infer/src/backend/logging.ml | 16 +- infer/src/backend/logging.mli | 18 +-- infer/src/backend/mangled.ml | 16 +- infer/src/backend/mangled.mli | 16 +- infer/src/backend/match.ml | 16 +- infer/src/backend/match.mli | 116 ++++++------- infer/src/backend/mleak_buckets.ml | 16 +- infer/src/backend/mleak_buckets.mli | 14 +- infer/src/backend/objc_models.ml | 14 +- infer/src/backend/objc_models.mli | 18 +-- infer/src/backend/objc_preanal.ml | 14 +- infer/src/backend/objc_preanal.mli | 14 +- infer/src/backend/paths.ml | 16 +- infer/src/backend/paths.mli | 22 +-- infer/src/backend/preanal.ml | 16 +- infer/src/backend/preanal.mli | 16 +- infer/src/backend/printer.ml | 16 +- infer/src/backend/printer.mli | 18 +-- infer/src/backend/procname.ml | 16 +- infer/src/backend/procname.mli | 24 +-- infer/src/backend/prop.ml | 16 +- infer/src/backend/prop.mli | 56 +++---- infer/src/backend/propgraph.ml | 16 +- infer/src/backend/propgraph.mli | 30 ++-- infer/src/backend/propset.ml | 16 +- infer/src/backend/propset.mli | 24 +-- infer/src/backend/prover.ml | 16 +- infer/src/backend/prover.mli | 34 ++-- infer/src/backend/rearrange.ml | 16 +- infer/src/backend/rearrange.mli | 28 ++-- infer/src/backend/reporting.ml | 14 +- infer/src/backend/reporting.mli | 14 +- infer/src/backend/serialization.ml | 16 +- infer/src/backend/serialization.mli | 16 +- infer/src/backend/sil.ml | 16 +- infer/src/backend/sil.mli | 170 ++++++++++---------- infer/src/backend/specs.ml | 16 +- infer/src/backend/specs.mli | 60 +++---- infer/src/backend/state.ml | 16 +- infer/src/backend/state.mli | 22 +-- infer/src/backend/symExec.ml | 16 +- infer/src/backend/symExec.mli | 24 +-- infer/src/backend/tabulation.ml | 16 +- infer/src/backend/tabulation.mli | 18 +-- infer/src/backend/type_prop.ml | 16 +- infer/src/backend/type_prop.mli | 16 +- infer/src/backend/utils.ml | 16 +- infer/src/backend/utils.mli | 48 +++--- infer/src/backend/version.ml.in | 16 +- infer/src/checkers/annotations.ml | 14 +- infer/src/checkers/annotations.mli | 28 ++-- infer/src/checkers/callbackChecker.ml | 14 +- infer/src/checkers/callbackChecker.mli | 14 +- infer/src/checkers/checkDeadCode.ml | 14 +- infer/src/checkers/checkDeadCode.mli | 14 +- infer/src/checkers/checkers.ml | 14 +- infer/src/checkers/checkers.mli | 42 ++--- infer/src/checkers/codeQuery.ml | 14 +- infer/src/checkers/codeQuery.mli | 14 +- infer/src/checkers/codeQueryAst.ml | 14 +- infer/src/checkers/codequeryLexer.mll | 14 +- infer/src/checkers/constantPropagation.ml | 14 +- infer/src/checkers/constantPropagation.mli | 14 +- infer/src/checkers/dataflow.ml | 14 +- infer/src/checkers/dataflow.mli | 14 +- infer/src/checkers/eradicate.ml | 14 +- infer/src/checkers/eradicate.mli | 20 +-- infer/src/checkers/eradicateChecks.ml | 14 +- infer/src/checkers/idenv.ml | 14 +- infer/src/checkers/idenv.mli | 16 +- infer/src/checkers/immutableChecker.ml | 14 +- infer/src/checkers/immutableChecker.mli | 14 +- infer/src/checkers/models.ml | 14 +- infer/src/checkers/patternMatch.ml | 14 +- infer/src/checkers/patternMatch.mli | 22 +-- infer/src/checkers/printfArgs.ml | 14 +- infer/src/checkers/printfArgs.mli | 14 +- infer/src/checkers/registerCheckers.ml | 14 +- infer/src/checkers/repeatedCallsChecker.ml | 14 +- infer/src/checkers/repeatedCallsChecker.mli | 14 +- infer/src/checkers/sqlChecker.ml | 14 +- infer/src/checkers/sqlChecker.mli | 14 +- infer/src/checkers/typeAnnotation.ml | 14 +- infer/src/checkers/typeAnnotation.mli | 14 +- infer/src/checkers/typeCheck.ml | 14 +- infer/src/checkers/typeCheck.mli | 24 +-- infer/src/checkers/typeErr.ml | 14 +- infer/src/checkers/typeErr.mli | 24 +-- infer/src/checkers/typeOrigin.ml | 14 +- infer/src/checkers/typeOrigin.mli | 14 +- infer/src/checkers/typeState.ml | 14 +- infer/src/checkers/typeState.mli | 18 +-- infer/src/clang/ast_expressions.ml | 14 +- infer/src/clang/ast_expressions.mli | 14 +- infer/src/clang/ast_lexer.mll | 14 +- infer/src/clang/cArithmetic_trans.ml | 14 +- infer/src/clang/cArithmetic_trans.mli | 20 +-- infer/src/clang/cAstProcessor.ml | 14 +- infer/src/clang/cAstProcessor.mli | 18 +-- infer/src/clang/cContext.ml | 14 +- infer/src/clang/cContext.mli | 16 +- infer/src/clang/cEnum_decl.ml | 14 +- infer/src/clang/cEnum_decl.mli | 16 +- infer/src/clang/cField_decl.ml | 14 +- infer/src/clang/cField_decl.mli | 18 +-- infer/src/clang/cFrontend.ml | 14 +- infer/src/clang/cFrontend.mli | 14 +- infer/src/clang/cFrontend_config.ml | 14 +- infer/src/clang/cFrontend_config.mli | 14 +- infer/src/clang/cFrontend_utils.ml | 14 +- infer/src/clang/cFrontend_utils.mli | 20 +-- infer/src/clang/cGen_trans.ml | 14 +- infer/src/clang/cGlobal_vars.ml | 14 +- infer/src/clang/cGlobal_vars.mli | 20 +-- infer/src/clang/cLocation.ml | 14 +- infer/src/clang/cLocation.mli | 16 +- infer/src/clang/cMain.ml | 14 +- infer/src/clang/cMain.mli | 14 +- infer/src/clang/cMethod_decl.ml | 14 +- infer/src/clang/cMethod_decl.mli | 26 +-- infer/src/clang/cMethod_signature.ml | 14 +- infer/src/clang/cMethod_signature.mli | 16 +- infer/src/clang/cMethod_trans.ml | 14 +- infer/src/clang/cMethod_trans.mli | 20 +-- infer/src/clang/cModule_type.ml | 14 +- infer/src/clang/cTrans.ml | 14 +- infer/src/clang/cTrans.mli | 20 +-- infer/src/clang/cTrans_models.ml | 14 +- infer/src/clang/cTrans_models.mli | 14 +- infer/src/clang/cTrans_utils.ml | 14 +- infer/src/clang/cTrans_utils.mli | 30 ++-- infer/src/clang/cTypes.ml | 14 +- infer/src/clang/cTypes.mli | 14 +- infer/src/clang/cTypes_decl.ml | 14 +- infer/src/clang/cTypes_decl.mli | 24 +-- infer/src/clang/cVar_decl.ml | 14 +- infer/src/clang/cVar_decl.mli | 16 +- infer/src/clang/objcCategory_decl.ml | 14 +- infer/src/clang/objcCategory_decl.mli | 18 +-- infer/src/clang/objcInterface_decl.ml | 14 +- infer/src/clang/objcInterface_decl.mli | 18 +-- infer/src/clang/objcProperty_decl.ml | 14 +- infer/src/clang/objcProperty_decl.mli | 20 +-- infer/src/clang/objcProtocol_decl.ml | 14 +- infer/src/clang/objcProtocol_decl.mli | 14 +- infer/src/harness/androidFramework.ml | 14 +- infer/src/harness/androidFramework.mli | 18 +-- infer/src/harness/harness.ml | 14 +- infer/src/harness/harness.mli | 14 +- infer/src/harness/inhabit.ml | 14 +- infer/src/harness/inhabit.mli | 18 +-- infer/src/harness/stacktrace.ml | 14 +- infer/src/harness/stacktrace.mli | 14 +- infer/src/java/jAnnotation.ml | 16 +- infer/src/java/jAnnotation.mli | 16 +- infer/src/java/jClasspath.ml | 16 +- infer/src/java/jClasspath.mli | 18 +-- infer/src/java/jConfig.ml | 16 +- infer/src/java/jContext.ml | 16 +- infer/src/java/jContext.mli | 48 +++--- infer/src/java/jFrontend.ml | 16 +- infer/src/java/jFrontend.mli | 46 +++--- infer/src/java/jMain.ml | 16 +- infer/src/java/jTrans.ml | 16 +- infer/src/java/jTrans.mli | 16 +- infer/src/java/jTransExn.ml | 16 +- infer/src/java/jTransExn.mli | 16 +- infer/src/java/jTransStaticField.ml | 16 +- infer/src/java/jTransStaticField.mli | 18 +-- infer/src/java/jTransType.ml | 16 +- infer/src/java/jTransType.mli | 22 +-- infer/src/java/jUtils.ml | 16 +- infer/src/java/jUtils.mli | 16 +- infer/src/java/jVerbose.ml | 16 +- infer/src/llvm/lAst.ml | 14 +- infer/src/llvm/lLexer.mll | 14 +- infer/src/llvm/lMain.ml | 14 +- infer/src/llvm/lParser.mly | 14 +- infer/src/llvm/lPretty.ml | 14 +- infer/src/llvm/lTrans.ml | 14 +- infer/src/opensource/facebook.ml | 14 +- 229 files changed, 2133 insertions(+), 2133 deletions(-) diff --git a/infer/src/backend/CRC.ml b/infer/src/backend/CRC.ml index 3c6d8964a..029061006 100644 --- a/infer/src/backend/CRC.ml +++ b/infer/src/backend/CRC.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) let vecH = [| 0x00; 0xC1; 0x81; 0x40; 0x01; 0xC0; 0x80; 0x41; 0x01; 0xC0; 0x80; 0x41; 0x00; 0xC1; 0x81; diff --git a/infer/src/backend/CRC.mli b/infer/src/backend/CRC.mli index aed199c62..bdb31d6e0 100644 --- a/infer/src/backend/CRC.mli +++ b/infer/src/backend/CRC.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) val crc16 : string -> string diff --git a/infer/src/backend/DB.ml b/infer/src/backend/DB.ml index 3828e535b..59196c366 100644 --- a/infer/src/backend/DB.ml +++ b/infer/src/backend/DB.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Database of analysis results *) diff --git a/infer/src/backend/DB.mli b/infer/src/backend/DB.mli index 32118efd4..dad9c3bdd 100644 --- a/infer/src/backend/DB.mli +++ b/infer/src/backend/DB.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Database of analysis results *) @@ -31,7 +31,7 @@ val file_modified_time : filename -> float (** Return the time when a file was l (** {2 Results Directory} *) module Results_dir : sig -(** path expressed as a list of strings *) + (** path expressed as a list of strings *) type path = string list (** kind of path: specifies how to interpret a path *) @@ -138,9 +138,9 @@ val create_dir : string -> unit val read_file_with_lock : string -> string -> string option (** Update the file contents with the update function provided. -If the directory does not exist, it is created. -If the file does not exist, it is created, and update is given the empty string. -A lock is used to allow write attempts in parallel. *) + If the directory does not exist, it is created. + If the file does not exist, it is created, and update is given the empty string. + A lock is used to allow write attempts in parallel. *) val update_file_with_lock : string -> string -> (string -> string) -> unit (** get the path of the global type environment (only used in Java) *) diff --git a/infer/src/backend/abs.ml b/infer/src/backend/abs.ml index 707ba4473..e4a0f1bb0 100644 --- a/infer/src/backend/abs.ml +++ b/infer/src/backend/abs.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Implementation of Abstraction Functions *) diff --git a/infer/src/backend/abs.mli b/infer/src/backend/abs.mli index 0e122295f..ade1e7db8 100644 --- a/infer/src/backend/abs.mli +++ b/infer/src/backend/abs.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Implementation of Abstraction Functions *) @@ -14,12 +14,12 @@ val create_absrules_from_tdecl : Sil.tenv -> Sil.typename -> unit (** Check whether the prop contains junk. -If it does, and [Config.allowleak] is true, remove the junk, otherwise raise a Leak exception. *) + If it does, and [Config.allowleak] is true, remove the junk, otherwise raise a Leak exception. *) val abstract_junk : ?original_prop:Prop.normal Prop.t -> Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.normal Prop.t (** Remove redundant elements in an array, and check for junk afterwards *) val remove_redundant_array_elements : -Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.normal Prop.t + Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.normal Prop.t (** Abstract a proposition. *) val abstract : Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.normal Prop.t diff --git a/infer/src/backend/absarray.ml b/infer/src/backend/absarray.ml index beff1040d..bf5eb314a 100644 --- a/infer/src/backend/absarray.ml +++ b/infer/src/backend/absarray.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Abstraction for Arrays *) diff --git a/infer/src/backend/absarray.mli b/infer/src/backend/absarray.mli index da5b5dddf..15720762e 100644 --- a/infer/src/backend/absarray.mli +++ b/infer/src/backend/absarray.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Abstraction for Arrays *) diff --git a/infer/src/backend/autounit.ml b/infer/src/backend/autounit.ml index 2539331cc..063db1373 100644 --- a/infer/src/backend/autounit.ml +++ b/infer/src/backend/autounit.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Generate unit tests automatically from specs *) diff --git a/infer/src/backend/autounit.mli b/infer/src/backend/autounit.mli index 37f1be0c2..cf3184e8b 100644 --- a/infer/src/backend/autounit.mli +++ b/infer/src/backend/autounit.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Generate unit tests automatically from specs *) diff --git a/infer/src/backend/buckets.ml b/infer/src/backend/buckets.ml index 1fe748e1d..5f9dafc03 100644 --- a/infer/src/backend/buckets.ml +++ b/infer/src/backend/buckets.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Classify bugs into buckets *) diff --git a/infer/src/backend/buckets.mli b/infer/src/backend/buckets.mli index cb9e6d488..cda0559c5 100644 --- a/infer/src/backend/buckets.mli +++ b/infer/src/backend/buckets.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Classify bugs into buckets *) @@ -14,4 +14,4 @@ open Utils (** Classify the bucket of an error desc using Location.access and nullable information *) val classify_access : -Localise.error_desc -> Localise.access option -> Sil.dexp option -> bool -> Localise.error_desc + Localise.error_desc -> Localise.access option -> Sil.dexp option -> bool -> Localise.error_desc diff --git a/infer/src/backend/callbacks.ml b/infer/src/backend/callbacks.ml index 6f86dc5cc..118f3d245 100644 --- a/infer/src/backend/callbacks.ml +++ b/infer/src/backend/callbacks.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils module L = Logging diff --git a/infer/src/backend/callbacks.mli b/infer/src/backend/callbacks.mli index db60b0de3..f3ffc4f8d 100644 --- a/infer/src/backend/callbacks.mli +++ b/infer/src/backend/callbacks.mli @@ -1,21 +1,21 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module to register and invoke callbacks *) (** Type of a procedure callback: -- List of all the procedures the callback will be called on. -- get_proc_desc to get a proc desc from a proc name. -- Idenv to look up the definition of ids in a cfg. -- Type environment. -- Procedure for the callback to act on. *) + - List of all the procedures the callback will be called on. + - get_proc_desc to get a proc desc from a proc name. + - Idenv to look up the definition of ids in a cfg. + - Type environment. + - Procedure for the callback to act on. *) type proc_callback_t = Procname.t list -> (Procname.t -> Cfg.Procdesc.t option) -> diff --git a/infer/src/backend/cfg.ml b/infer/src/backend/cfg.ml index 54fbe9267..18baf8f35 100644 --- a/infer/src/backend/cfg.ml +++ b/infer/src/backend/cfg.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/backend/cfg.mli b/infer/src/backend/cfg.mli index 586ea8998..7f16f1d7b 100644 --- a/infer/src/backend/cfg.mli +++ b/infer/src/backend/cfg.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Control Flow Graph for Interprocedural Analysis *) @@ -25,7 +25,7 @@ val store_cfg_to_file: DB.filename -> bool -> cfg -> unit (** proc description *) module Procdesc : sig -(** proc description *) + (** proc description *) type t (** Compute the distance of each node to the exit node, if not computed already *) @@ -171,8 +171,8 @@ module Node : sig val compare : t -> t -> int (** [create cfg loc kind instrs proc_desc temps] create a new cfg node - with the given location, kind, list of instructions, - procdesc and list of temporary variables *) + with the given location, kind, list of instructions, + procdesc and list of temporary variables *) val create : cfg -> Sil.location -> nodekind -> Sil.instr list -> Procdesc.t -> Ident.t list -> t (** create a new empty cfg *) @@ -319,7 +319,7 @@ val remove_ret : Procdesc.t -> Prop.normal Prop.t -> Prop.normal Prop.t val remove_locals_ret : Procdesc.t -> Prop.normal Prop.t -> Prop.normal Prop.t (** Deallocate the stack variables in [pvars], and replace them by normal variables. -Return the list of stack variables whose address was still present after deallocation. *) + Return the list of stack variables whose address was still present after deallocation. *) val remove_locals_formals : Procdesc.t -> Prop.normal Prop.t -> Sil.pvar list * Prop.normal Prop.t (** remove seed vars from a prop *) diff --git a/infer/src/backend/cg.ml b/infer/src/backend/cg.ml index 8034e499f..db1f58168 100644 --- a/infer/src/backend/cg.ml +++ b/infer/src/backend/cg.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for call graphs *) diff --git a/infer/src/backend/cg.mli b/infer/src/backend/cg.mli index 27be7eba0..15c9b011d 100644 --- a/infer/src/backend/cg.mli +++ b/infer/src/backend/cg.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for call graphs *) @@ -20,9 +20,9 @@ type in_out_calls = type t (** the type of a call graph *) (** A call graph consists of a set of nodes (Procname.t), and edges between them. -A node can be defined or undefined (to represent whether we have code for it). -In an edge from [n1] to [n2], indicating that [n1] calls [n2], [n1] is the parent and [n2] is the child. -Node [n1] is dependent on [n2] if there is a path from [n1] to [n2] using the child relationship. *) + A node can be defined or undefined (to represent whether we have code for it). + In an edge from [n1] to [n2], indicating that [n1] calls [n2], [n1] is the parent and [n2] is the child. + Node [n1] is dependent on [n2] if there is a path from [n1] to [n2] using the child relationship. *) (** [add_edge cg f t] adds an edge from [f] to [t] in the call graph [cg]. The nodes are also added as undefined, unless already present. *) val add_edge : t -> Procname.t -> Procname.t -> unit diff --git a/infer/src/backend/checkCopyright.ml b/infer/src/backend/checkCopyright.ml index b3adba48b..33592c2d8 100644 --- a/infer/src/backend/checkCopyright.ml +++ b/infer/src/backend/checkCopyright.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format @@ -171,7 +171,7 @@ let update_file fname mono fb_year com_style prefix cstart cend lines_arr = let file_should_have_copyright fname lines = let extensions = [".ml"; ".mli"; ".ml"; ".mly"; ".java"; ".c"; - ".h"; ".cpp"; ".m"; ".mm"; ".py"; ".sh"] in + ".h"; ".cpp"; ".m"; ".mm"; ".py"; ".sh"] in list_exists (Filename.check_suffix fname) extensions @@ -208,7 +208,7 @@ let check_copyright () = | None -> L.stderr "Can't find fb year: %s@." fname | Some fb_year -> - let prefix = "" in + let prefix = if com_style = comment_style_ocaml then " " else "" in if copyright_has_changed mono fb_year com_style prefix cstart cend lines_arr then begin let range = cend - cstart in diff --git a/infer/src/backend/config.ml b/infer/src/backend/config.ml index 69f313323..a48c5c9f2 100644 --- a/infer/src/backend/config.ml +++ b/infer/src/backend/config.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module F = Format;; diff --git a/infer/src/backend/dom.ml b/infer/src/backend/dom.ml index f82677508..6e17741ab 100644 --- a/infer/src/backend/dom.ml +++ b/infer/src/backend/dom.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Operators for the abstract domain. In particular, join and meet. *) diff --git a/infer/src/backend/dom.mli b/infer/src/backend/dom.mli index ca705f645..fba9263f4 100644 --- a/infer/src/backend/dom.mli +++ b/infer/src/backend/dom.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Join and Meet Operators *) @@ -16,7 +16,7 @@ open Utils (** Join two pathsets *) val pathset_join : -Procname.t -> Sil.tenv -> Paths.PathSet.t -> Paths.PathSet.t -> Paths.PathSet.t * Paths.PathSet.t + Procname.t -> Sil.tenv -> Paths.PathSet.t -> Paths.PathSet.t -> Paths.PathSet.t * Paths.PathSet.t val join_time : float ref @@ -30,7 +30,7 @@ val pathset_collapse_impl : Procname.t -> Sil.tenv -> Paths.PathSet.t -> Paths.P (** {2 Meet Operators} *) (** [propset_meet_generate_pre] generates new symbolic heaps (i.e., props) -by applying the partial meet operator, adds the generated heaps -to the argument propset, and returns the resulting propset. This function -is tuned for combining preconditions. *) + by applying the partial meet operator, adds the generated heaps + to the argument propset, and returns the resulting propset. This function + is tuned for combining preconditions. *) val propset_meet_generate_pre : Propset.t -> Prop.normal Prop.t list diff --git a/infer/src/backend/dotty.ml b/infer/src/backend/dotty.ml index 64cbae157..80c289f56 100644 --- a/infer/src/backend/dotty.ml +++ b/infer/src/backend/dotty.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/backend/dotty.mli b/infer/src/backend/dotty.mli index aa70e5835..db61da2ab 100644 --- a/infer/src/backend/dotty.mli +++ b/infer/src/backend/dotty.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Pretty printing functions in dot format. *) diff --git a/infer/src/backend/errdesc.ml b/infer/src/backend/errdesc.ml index 698a22c5f..6cdaae72b 100644 --- a/infer/src/backend/errdesc.ml +++ b/infer/src/backend/errdesc.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Create descriptions of analysis errors *) diff --git a/infer/src/backend/errdesc.mli b/infer/src/backend/errdesc.mli index 06ab18d94..9744a7b3d 100644 --- a/infer/src/backend/errdesc.mli +++ b/infer/src/backend/errdesc.mli @@ -1,19 +1,19 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Create descriptions of analysis errors *) open Utils (** find the dexp, if any, where the given value is stored -also return the type of the value if found *) + also return the type of the value if found *) val vpath_find : 'a Prop.t -> Sil.exp -> Sil.vpath * Sil.typ option (** Return true if [id] is assigned to a program variable which is then nullified *) @@ -23,9 +23,9 @@ val id_is_assigned_then_dead : Cfg.Node.t -> Ident.t -> bool val hpred_is_open_resource : 'a Prop.t -> Sil.hpred -> Sil.resource option (** Find the function call instruction used to initialize normal variable [id], -and return the function name and arguments *) + and return the function name and arguments *) val find_normal_variable_funcall : -Cfg.Node.t -> Ident.t -> (Sil.exp * (Sil.exp list) * Sil.location * Sil.call_flags) option + Cfg.Node.t -> Ident.t -> (Sil.exp * (Sil.exp list) * Sil.location * Sil.call_flags) option (** Find a program variable assignment in the current node or straightline predecessor. *) val find_program_variable_assignment : Cfg.Node.t -> Sil.pvar -> (Cfg.Node.t * Ident.t) option @@ -34,7 +34,7 @@ val find_program_variable_assignment : Cfg.Node.t -> Sil.pvar -> (Cfg.Node.t * I val find_ident_assignment : Cfg.Node.t -> Ident.t -> (Cfg.Node.t * Sil.exp) option (** Find a boolean assignment to a temporary variable holding a boolean condition. -The boolean parameter indicates whether the true or false branch is required. *) + The boolean parameter indicates whether the true or false branch is required. *) val find_boolean_assignment : Cfg.Node.t -> Sil.pvar -> bool -> Cfg.Node.t option (** describe rvalue [e] as a dexp *) @@ -57,15 +57,15 @@ val explain_deallocate_constant_string : string -> Sil.res_action -> Localise.er (** Produce a description of which expression is dereferenced in the current instruction, if any. *) val explain_dereference : -?use_buckets:bool -> ?is_nullable:bool -> ?is_premature_nil:bool -> -Localise.deref_str -> 'a Prop.t -> Sil.location -> Localise.error_desc + ?use_buckets:bool -> ?is_nullable:bool -> ?is_premature_nil:bool -> + Localise.deref_str -> 'a Prop.t -> Sil.location -> Localise.error_desc (** return a description explaining value [exp] in [prop] in terms of a source expression -using the formal parameters of the call *) + using the formal parameters of the call *) val explain_dereference_as_caller_expression : -?use_buckets:bool -> -Localise.deref_str -> 'a Prop.t -> 'b Prop.t -> Sil.exp -> -Cfg.Node.t -> Sil.location -> Sil.pvar list -> Localise.error_desc + ?use_buckets:bool -> + Localise.deref_str -> 'a Prop.t -> 'b Prop.t -> Sil.exp -> + Cfg.Node.t -> Sil.location -> Sil.pvar list -> Localise.error_desc (** explain a division by zero *) val explain_divide_by_zero : Sil.exp -> Cfg.Node.t -> Sil.location -> Localise.error_desc @@ -98,9 +98,9 @@ val explain_unary_minus_applied_to_unsigned_expression : Sil.exp -> Sil.typ -> C val explain_tainted_value_reaching_sensitive_function : Sil.exp -> Sil.location -> Localise.error_desc (** Produce a description of a leak by looking at the current state. -If the current instruction is a variable nullify, blame the variable. -If it is an abstraction, blame any variable nullify at the current node. -If there is an alloc attribute, print the function call and line number. *) + If the current instruction is a variable nullify, blame the variable. + If it is an abstraction, blame any variable nullify at the current node. + If there is an alloc attribute, print the function call and line number. *) val explain_leak : Sil.tenv -> Sil.hpred -> 'a Prop.t -> Sil.attribute option -> string option -> Exceptions.exception_visibility * Localise.error_desc (** Produce a description of the memory access performed in the current instruction, if any. *) diff --git a/infer/src/backend/errlog.ml b/infer/src/backend/errlog.ml index 44d82f3a7..eaffe1948 100644 --- a/infer/src/backend/errlog.ml +++ b/infer/src/backend/errlog.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils module L = Logging diff --git a/infer/src/backend/errlog.mli b/infer/src/backend/errlog.mli index f35d4df55..caf6543ab 100644 --- a/infer/src/backend/errlog.mli +++ b/infer/src/backend/errlog.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for error logs. *) @@ -47,9 +47,9 @@ val size : (Exceptions.err_kind -> bool -> bool) -> t -> int val update : t -> t -> unit val log_issue : -Exceptions.err_kind -> -t -> Sil.location -> (int * int) -> int -> loc_trace -> -(Prop.normal Prop.t) option -> exn -> unit + Exceptions.err_kind -> + t -> Sil.location -> (int * int) -> int -> loc_trace -> + (Prop.normal Prop.t) option -> exn -> unit (** {2 Functions for manipulating per-file error tables} *) diff --git a/infer/src/backend/exceptions.ml b/infer/src/backend/exceptions.ml index cfd046bd3..9fec8e468 100644 --- a/infer/src/backend/exceptions.ml +++ b/infer/src/backend/exceptions.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/backend/exceptions.mli b/infer/src/backend/exceptions.mli index e1209caed..373042cbd 100644 --- a/infer/src/backend/exceptions.mli +++ b/infer/src/backend/exceptions.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils @@ -91,10 +91,10 @@ val print_exception_html : string -> exn -> unit (** pretty print an error given its (id,key), location, kind, name, description, and optional ml location *) val pp_err : int * int -> Sil.location -> err_kind -> Localise.t -> Localise.error_desc -> -Utils.ml_location option -> Format.formatter -> unit -> unit + Utils.ml_location option -> Format.formatter -> unit -> unit (** Turn an exception into an error name, error description, -location in ml source, and category *) + location in ml source, and category *) val recognize_exception : exn -> -(Localise.t * Localise.error_desc * (ml_location option) * exception_visibility * -exception_severity * err_kind option * err_class) + (Localise.t * Localise.error_desc * (ml_location option) * exception_visibility * + exception_severity * err_kind option * err_class) diff --git a/infer/src/backend/exe_env.ml b/infer/src/backend/exe_env.ml index 2d5038aa1..4656d24f7 100644 --- a/infer/src/backend/exe_env.ml +++ b/infer/src/backend/exe_env.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Support for Execution environments *) diff --git a/infer/src/backend/exe_env.mli b/infer/src/backend/exe_env.mli index 21a164afe..6a0089d4a 100644 --- a/infer/src/backend/exe_env.mli +++ b/infer/src/backend/exe_env.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils diff --git a/infer/src/backend/fork.ml b/infer/src/backend/fork.ml index 42edc1468..081ae63a2 100644 --- a/infer/src/backend/fork.ml +++ b/infer/src/backend/fork.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/backend/fork.mli b/infer/src/backend/fork.mli index 09cb81a06..2634e2cb1 100644 --- a/infer/src/backend/fork.mli +++ b/infer/src/backend/fork.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Implementation of the Parallel Interprocedural Footprint Analysis Algorithm *) @@ -26,7 +26,7 @@ val procs_become_done : Cg.t -> Procname.t -> Procname.t list val post_process_procs : Exe_env.t -> Procname.t list -> unit (** Return the list of procedures which should perform a phase -transition from [FOOTPRINT] to [RE_EXECUTION] *) + transition from [FOOTPRINT] to [RE_EXECUTION] *) val should_perform_transition : Cg.t -> Procname.t -> Procname.t list (** Perform the transition from [FOOTPRINT] to [RE_EXECUTION] in spec table *) @@ -36,10 +36,10 @@ val transition_footprint_re_exe : Procname.t -> Prop.normal Specs.Jprop.t list - val update_specs : Procname.t -> Specs.NormSpec.t list -> Specs.NormSpec.t list * bool (** [parallel_iter_nodes tenv cfg call_graph analyze_proc process_result filter_out] -executes [analyze_proc] in parallel as much as possible as allowed -by the call graph, and applies [process_result] to the result as -soon as it is returned by a child process. If [filter_out] returns -true, no execution. *) + executes [analyze_proc] in parallel as much as possible as allowed + by the call graph, and applies [process_result] to the result as + soon as it is returned by a child process. If [filter_out] returns + true, no execution. *) val parallel_iter_nodes : Exe_env.t -> (Exe_env.t -> Procname.t -> Specs.summary) -> (Exe_env.t -> (Procname.t * Cg.in_out_calls) -> Specs.summary -> unit) -> (Cg.t -> Procname.t -> bool) -> unit (** print the timing stats, and generate timing.dot if in dotty mode *) diff --git a/infer/src/backend/ident.ml b/infer/src/backend/ident.ml index acb6444ff..8ff76a9d0 100644 --- a/infer/src/backend/ident.ml +++ b/infer/src/backend/ident.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Names and Identifiers *) diff --git a/infer/src/backend/ident.mli b/infer/src/backend/ident.mli index 13a2b9454..3b0e287e3 100644 --- a/infer/src/backend/ident.mli +++ b/infer/src/backend/ident.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Identifiers: program variables and logical variables *) diff --git a/infer/src/backend/inferanalyze.ml b/infer/src/backend/inferanalyze.ml index 81be30f2c..d82f65f98 100644 --- a/infer/src/backend/inferanalyze.ml +++ b/infer/src/backend/inferanalyze.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Main module for the analysis after the capture phase *) diff --git a/infer/src/backend/inferconfig.ml b/infer/src/backend/inferconfig.ml index 8c892494d..fd8f4bd50 100644 --- a/infer/src/backend/inferconfig.ml +++ b/infer/src/backend/inferconfig.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils diff --git a/infer/src/backend/inferconfig.mli b/infer/src/backend/inferconfig.mli index 075fc3751..254cd7f46 100644 --- a/infer/src/backend/inferconfig.mli +++ b/infer/src/backend/inferconfig.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Filter type for a source file *) type path_filter = DB.source_file -> bool diff --git a/infer/src/backend/inferprint.ml b/infer/src/backend/inferprint.ml index e389a45b0..d7e0d6bbe 100644 --- a/infer/src/backend/inferprint.ml +++ b/infer/src/backend/inferprint.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/backend/interproc.ml b/infer/src/backend/interproc.ml index bf7665288..966f669bc 100644 --- a/infer/src/backend/interproc.ml +++ b/infer/src/backend/interproc.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Interprocedural Analysis *) diff --git a/infer/src/backend/interproc.mli b/infer/src/backend/interproc.mli index ed4bbd6ce..0c8316107 100644 --- a/infer/src/backend/interproc.mli +++ b/infer/src/backend/interproc.mli @@ -1,28 +1,28 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Interprocedural Analysis *) (** Analyze [proc_name] and return the updated summary. Use module -{!Timeout } to call {!perform_analysis_phase } with a time limit, and -then return the updated summary. Executed as a child process. *) + {!Timeout } to call {!perform_analysis_phase } with a time limit, and + then return the updated summary. Executed as a child process. *) val analyze_proc : Exe_env.t -> Procname.t -> Specs.summary (** Process the result of the analysis of [proc_name]: update the -returned summary and add it to the spec table. Executed in the -parent process as soon as a child process returns a result. *) + returned summary and add it to the spec table. Executed in the + parent process as soon as a child process returns a result. *) val process_result : Exe_env.t -> (Procname.t * Cg.in_out_calls) -> Specs.summary -> unit (** Return true if the analysis of [proc_name] should be -skipped. Called by the parent process before attempting to analyze a -proc. *) + skipped. Called by the parent process before attempting to analyze a + proc. *) val filter_out : Cg.t -> Procname.t -> bool (** Perform the analysis of an exe_env *) diff --git a/infer/src/backend/io_infer.ml b/infer/src/backend/io_infer.ml index 4d13ae240..4023ebb6b 100644 --- a/infer/src/backend/io_infer.ml +++ b/infer/src/backend/io_infer.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module to handle IO. Includes html and xml modules. *) diff --git a/infer/src/backend/io_infer.mli b/infer/src/backend/io_infer.mli index a642828d7..1e9a38588 100644 --- a/infer/src/backend/io_infer.mli +++ b/infer/src/backend/io_infer.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module to handle IO. Includes html and xml modules. *) @@ -18,13 +18,13 @@ module Html : sig val pp_line_link : ?with_name: bool -> ?text: (string option) -> DB.Results_dir.path -> Format.formatter -> int -> unit (** Print an html link to the given line number of the current source file *) val pp_hline : Format.formatter -> unit -> unit (** Print a horizontal line *) val pp_end_color : Format.formatter -> unit -> unit (** Print end color *) - + (** [pp_node_link path_to_root description isvisited isproof fmt id] prints an html link to the given node. - [path_to_root] is the path to the dir for the procedure in the spec db. - [description] is a string description. - [is_visited] indicates whether the node should be active or greyed out. - [is_proof] indicates whether the node is part of a proof and should be green. - [id] is the node identifier. *) + [path_to_root] is the path to the dir for the procedure in the spec db. + [description] is a string description. + [is_visited] indicates whether the node should be active or greyed out. + [is_proof] indicates whether the node is part of a proof and should be green. + [id] is the node identifier. *) val pp_node_link : DB.Results_dir.path -> string -> int list -> int list -> int list -> bool -> bool -> Format.formatter -> int -> unit val pp_proc_link : DB.Results_dir.path -> Procname.t -> Format.formatter -> string -> unit (** Print an html link to the given proc *) val pp_session_link : ?with_name: bool -> string list -> Format.formatter -> int * int * int -> unit (** Print an html link given node id and session *) @@ -75,16 +75,16 @@ module Xml : sig val tag_trace : string val tag_type : string val tag_weight : string - + type tree = { name: string; attributes: (string * string) list; forest: node list } and node = | Tree of tree | String of string - (** create a tree *) + (** create a tree *) val create_tree : string -> (string * string) list -> node list -> node (** print an xml document, if the first parameter is false on a single line without preamble *) val pp_document : bool -> Format.formatter -> node -> unit - + (** print the opening lines of an xml document consisting of a main tree with the given name *) val pp_open : Format.formatter -> string -> unit (** print the closing lines of an xml document consisting of a main tree with the given name *) diff --git a/infer/src/backend/latex.ml b/infer/src/backend/latex.ml index e19bb970d..04153c9ab 100644 --- a/infer/src/backend/latex.ml +++ b/infer/src/backend/latex.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module F = Format open Utils diff --git a/infer/src/backend/latex.mli b/infer/src/backend/latex.mli index 380416a33..acb31e62e 100644 --- a/infer/src/backend/latex.mli +++ b/infer/src/backend/latex.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type style = | Boldface diff --git a/infer/src/backend/localise.ml b/infer/src/backend/localise.ml index 2e10244e6..7471162d6 100644 --- a/infer/src/backend/localise.ml +++ b/infer/src/backend/localise.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Support for localisation *) diff --git a/infer/src/backend/localise.mli b/infer/src/backend/localise.mli index 5ba1da5b2..0fb8d3671 100644 --- a/infer/src/backend/localise.mli +++ b/infer/src/backend/localise.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Support for localisation *) diff --git a/infer/src/backend/logging.ml b/infer/src/backend/logging.ml index 11595c68d..473d2f167 100644 --- a/infer/src/backend/logging.ml +++ b/infer/src/backend/logging.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** log messages at different levels of verbosity *) diff --git a/infer/src/backend/logging.mli b/infer/src/backend/logging.mli index 3721eeda6..e05757e82 100644 --- a/infer/src/backend/logging.mli +++ b/infer/src/backend/logging.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils @@ -115,7 +115,7 @@ val set_err_formatter : Format.formatter -> unit val flush_streams : unit -> unit (** print a warning with information of the position in the ml source where it oririnated. -use as: warning_position "description" (try assert false with Assert_failure x -> x); *) + use as: warning_position "description" (try assert false with Assert_failure x -> x); *) val warning_position: string -> ml_location -> unit (** dump a string *) diff --git a/infer/src/backend/mangled.ml b/infer/src/backend/mangled.ml index 33148ab2e..8cff125f9 100644 --- a/infer/src/backend/mangled.ml +++ b/infer/src/backend/mangled.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Mangled Names *) diff --git a/infer/src/backend/mangled.mli b/infer/src/backend/mangled.mli index aec434bf1..853eb4a04 100644 --- a/infer/src/backend/mangled.mli +++ b/infer/src/backend/mangled.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Mangled Names *) diff --git a/infer/src/backend/match.ml b/infer/src/backend/match.ml index 2395cf53f..317ed228d 100644 --- a/infer/src/backend/match.ml +++ b/infer/src/backend/match.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Functions for "Smart" Pattern Matching *) diff --git a/infer/src/backend/match.mli b/infer/src/backend/match.mli index 48826fe40..c508cbffa 100644 --- a/infer/src/backend/match.mli +++ b/infer/src/backend/match.mli @@ -1,18 +1,18 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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. -See {{: http://dx.doi.org/10.1007/978-3-540-73368-3_22 } CAV 2007 } for the therory involved. - *) + 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. + See {{: http://dx.doi.org/10.1007/978-3-540-73368-3_22 } CAV 2007 } for the therory involved. +*) open Utils @@ -21,8 +21,8 @@ val hpara_match_with_impl : bool -> Sil.hpara -> Sil.hpara -> bool val hpara_dll_match_with_impl : bool -> Sil.hpara_dll -> Sil.hpara_dll -> bool (** Type for a hpred pattern. [flag=false] means that the implication -between hpreds is not considered, and [flag = true] means that it is -considered during pattern matching. *) + between hpreds is not considered, and [flag = true] means that it is + considered during pattern matching. *) type hpred_pat = { hpred : Sil.hpred; flag : bool } val pp_hpat : printenv -> Format.formatter -> hpred_pat -> unit @@ -32,44 +32,44 @@ val pp_hpat_list : printenv -> Format.formatter -> hpred_pat list -> unit type sidecondition = Prop.normal Prop.t -> Sil.subst -> bool (** [prop_match_with_impl p condition vars hpat hpats] -returns [(subst, p_leftover)] such that -1) [dom(subst) = vars] -2) [p |- (hpat.hpred * hpats.hpred)[subst] * p_leftover]. -Using the flag [field], we can control the strength of |-. *) + returns [(subst, p_leftover)] such that + 1) [dom(subst) = vars] + 2) [p |- (hpat.hpred * hpats.hpred)[subst] * p_leftover]. + Using the flag [field], we can control the strength of |-. *) val prop_match_with_impl : Prop.normal Prop.t -> sidecondition -> Ident.t list -> hpred_pat -> hpred_pat list -> (Sil.subst * Prop.normal Prop.t) option (** [find_partial_iso] finds disjoint isomorphic sub-sigmas inside a given sigma. -The first argument is an equality checker. -The function returns a partial iso and three sigmas. The first sigma is the first -copy of the two isomorphic sigmas, so it uses expressions in the domain of -the returned isomorphism. The second is the second copy of the two isomorphic sigmas, -and it uses expressions in the range of the isomorphism. The third is the unused -part of the input sigma. *) + The first argument is an equality checker. + The function returns a partial iso and three sigmas. The first sigma is the first + copy of the two isomorphic sigmas, so it uses expressions in the domain of + the returned isomorphism. The second is the second copy of the two isomorphic sigmas, + and it uses expressions in the range of the isomorphism. The third is the unused + part of the input sigma. *) val find_partial_iso : -(Sil.exp -> Sil.exp -> bool) -> -(Sil.exp * Sil.exp) list -> -(Sil.exp * Sil.exp) list -> -Sil.hpred list -> -((Sil.exp * Sil.exp) list * Sil.hpred list * Sil.hpred list * Sil.hpred list) option + (Sil.exp -> Sil.exp -> bool) -> + (Sil.exp * Sil.exp) list -> + (Sil.exp * Sil.exp) list -> + Sil.hpred list -> + ((Sil.exp * Sil.exp) list * Sil.hpred list * Sil.hpred list * Sil.hpred list) option (** This mode expresses the flexibility allowed during the isomorphism check *) type iso_mode = Exact | LFieldForget | RFieldForget (** [find_partial_iso_from_two_sigmas] finds isomorphic sub-sigmas inside two -given sigmas. The second argument is an equality checker. -The function returns a partial iso and four sigmas. The first -sigma is the first copy of the two isomorphic sigmas, so it uses expressions in the domain of -the returned isomorphism. The second is the second copy of the two isomorphic sigmas, -and it uses expressions in the range of the isomorphism. The third and fourth -are the unused parts of the two input sigmas. *) + given sigmas. The second argument is an equality checker. + The function returns a partial iso and four sigmas. The first + sigma is the first copy of the two isomorphic sigmas, so it uses expressions in the domain of + the returned isomorphism. The second is the second copy of the two isomorphic sigmas, + and it uses expressions in the range of the isomorphism. The third and fourth + are the unused parts of the two input sigmas. *) val find_partial_iso_from_two_sigmas : -iso_mode -> -(Sil.exp -> Sil.exp -> bool) -> -(Sil.exp * Sil.exp) list -> -(Sil.exp * Sil.exp) list -> -Sil.hpred list -> -Sil.hpred list -> -((Sil.exp * Sil.exp) list * Sil.hpred list * Sil.hpred list * (Sil.hpred list * Sil.hpred list)) option + iso_mode -> + (Sil.exp -> Sil.exp -> bool) -> + (Sil.exp * Sil.exp) list -> + (Sil.exp * Sil.exp) list -> + Sil.hpred list -> + Sil.hpred list -> + ((Sil.exp * Sil.exp) list * Sil.hpred list * Sil.hpred list * (Sil.hpred list * Sil.hpred list)) option (** [hpara_iso] soundly checks whether two hparas are isomorphic. *) val hpara_iso : Sil.hpara -> Sil.hpara -> bool @@ -79,24 +79,24 @@ val hpara_dll_iso : Sil.hpara_dll -> Sil.hpara_dll -> bool (** [hpara_create] takes a correspondence, and a sigma, a root -and a next for the first part of this correspondence. Then, it creates a -hpara and discovers a list of shared expressions that are -passed as arguments to hpara. Both of them are returned as a result. *) + and a next for the first part of this correspondence. Then, it creates a + hpara and discovers a list of shared expressions that are + passed as arguments to hpara. Both of them are returned as a result. *) val hpara_create : -(Sil.exp * Sil.exp) list -> -Sil.hpred list -> -Sil.exp -> -Sil.exp -> -Sil.hpara * Sil.exp list + (Sil.exp * Sil.exp) list -> + Sil.hpred list -> + Sil.exp -> + Sil.exp -> + Sil.hpara * Sil.exp list (** [hpara_dll_create] takes a correspondence, and a sigma, a root, -a blink and a flink for the first part of this correspondence. Then, -it creates a hpara_dll and discovers a list of shared expressions that are -passed as arguments to hpara. Both of them are returned as a result. *) + a blink and a flink for the first part of this correspondence. Then, + it creates a hpara_dll and discovers a list of shared expressions that are + passed as arguments to hpara. Both of them are returned as a result. *) val hpara_dll_create : -(Sil.exp * Sil.exp) list -> -Sil.hpred list -> -Sil.exp -> -Sil.exp -> -Sil.exp -> -Sil.hpara_dll * Sil.exp list + (Sil.exp * Sil.exp) list -> + Sil.hpred list -> + Sil.exp -> + Sil.exp -> + Sil.exp -> + Sil.hpara_dll * Sil.exp list diff --git a/infer/src/backend/mleak_buckets.ml b/infer/src/backend/mleak_buckets.ml index 882d78d50..4eac2ec0d 100644 --- a/infer/src/backend/mleak_buckets.ml +++ b/infer/src/backend/mleak_buckets.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** This module handles buckets of memory leaks in Objective-C *) open Utils diff --git a/infer/src/backend/mleak_buckets.mli b/infer/src/backend/mleak_buckets.mli index 27bd80583..6f3095528 100644 --- a/infer/src/backend/mleak_buckets.mli +++ b/infer/src/backend/mleak_buckets.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** This module handles buckets of memory leaks in Objective-C *) diff --git a/infer/src/backend/objc_models.ml b/infer/src/backend/objc_models.ml index 6bdae3d27..b0b50596a 100644 --- a/infer/src/backend/objc_models.ml +++ b/infer/src/backend/objc_models.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** This module handles C or Objective-C types for which there are special rules for memory management *) diff --git a/infer/src/backend/objc_models.mli b/infer/src/backend/objc_models.mli index 407fea203..08cac3461 100644 --- a/infer/src/backend/objc_models.mli +++ b/infer/src/backend/objc_models.mli @@ -1,19 +1,19 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** This module models special c struct types from the Apple's Core Foundation libraries -for which there are particular rules for memory management. *) + for which there are particular rules for memory management. *) open Utils (** This module models special c struct types from the Apple's Core Foundation libraries -for which there are particular rules for memory management. *) + for which there are particular rules for memory management. *) module Core_foundation_model : sig diff --git a/infer/src/backend/objc_preanal.ml b/infer/src/backend/objc_preanal.ml index c61d10e69..b90c27c74 100644 --- a/infer/src/backend/objc_preanal.ml +++ b/infer/src/backend/objc_preanal.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils diff --git a/infer/src/backend/objc_preanal.mli b/infer/src/backend/objc_preanal.mli index 9c1ebe9c9..2f8ba40ae 100644 --- a/infer/src/backend/objc_preanal.mli +++ b/infer/src/backend/objc_preanal.mli @@ -1,10 +1,10 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) val do_objc_preanalysis : unit -> unit diff --git a/infer/src/backend/paths.ml b/infer/src/backend/paths.ml index 9f6eec9a5..42d3086a5 100644 --- a/infer/src/backend/paths.ml +++ b/infer/src/backend/paths.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Execution Paths *) diff --git a/infer/src/backend/paths.mli b/infer/src/backend/paths.mli index bf85c2497..36da1747b 100644 --- a/infer/src/backend/paths.mli +++ b/infer/src/backend/paths.mli @@ -1,19 +1,19 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Execution Paths *) open Utils module Path : sig -(** type for paths *) + (** type for paths *) type t type session = int @@ -48,8 +48,8 @@ module Path : sig val iter_all_nodes_nocalls : (Cfg.node -> unit) -> t -> unit (** iterate over the longest sequence belonging to the path, restricting to those containing the given position if given. - Do not iterate past the given position. - [f level path session exn_opt] is passed the current nesting [level] and [path] and previous [session] and possible exception [exn_opt] *) + Do not iterate past the given position. + [f level path session exn_opt] is passed the current nesting [level] and [path] and previous [session] and possible exception [exn_opt] *) val iter_longest_sequence : (int -> t -> int -> Mangled.t option -> unit) -> Sil.path_pos option -> t -> unit (** join two paths *) diff --git a/infer/src/backend/preanal.ml b/infer/src/backend/preanal.ml index 2bdd659a1..e9c98b05f 100644 --- a/infer/src/backend/preanal.ml +++ b/infer/src/backend/preanal.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging open Utils diff --git a/infer/src/backend/preanal.mli b/infer/src/backend/preanal.mli index 8a99e429e..dd99ae005 100644 --- a/infer/src/backend/preanal.mli +++ b/infer/src/backend/preanal.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Preanalysis for eliminating dead local variables *) diff --git a/infer/src/backend/printer.ml b/infer/src/backend/printer.ml index ea0758760..cb0ff60bc 100644 --- a/infer/src/backend/printer.ml +++ b/infer/src/backend/printer.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Printers for the analysis results *) diff --git a/infer/src/backend/printer.mli b/infer/src/backend/printer.mli index 0920d9572..8137576ca 100644 --- a/infer/src/backend/printer.mli +++ b/infer/src/backend/printer.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Printers for the analysis results *) @@ -29,7 +29,7 @@ val finish_session : Cfg.node -> unit val proc_write_log : bool -> Cfg.cfg -> Procname.t -> unit (** Module to read specific lines from files. -The data from any file will stay in memory until the handle is collected by the gc *) + The data from any file will stay in memory until the handle is collected by the gc *) module LineReader : sig type t diff --git a/infer/src/backend/procname.ml b/infer/src/backend/procname.ml index 966a0a656..2dc3fbd1a 100644 --- a/infer/src/backend/procname.ml +++ b/infer/src/backend/procname.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Procedure Names *) diff --git a/infer/src/backend/procname.mli b/infer/src/backend/procname.mli index edf85d161..1a292c348 100644 --- a/infer/src/backend/procname.mli +++ b/infer/src/backend/procname.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Procedure Names *) @@ -91,8 +91,8 @@ val java_get_parameters : t -> string list val java_is_static : t -> bool (** Check if the last parameter is a hidden inner class, and remove it if present. -This is used in private constructors, where a proxy constructor is generated -with an extra parameter and calls the normal constructor. *) + This is used in private constructors, where a proxy constructor is generated + with an extra parameter and calls the normal constructor. *) val java_remove_hidden_inner_class_parameter : t -> t option (** Check if a class string is an anoynmous inner class name *) @@ -117,11 +117,11 @@ val java_is_anonymous_inner_class : t -> bool val java_is_anonymous_inner_class_constructor : t -> bool (** Check if the procedure name is an acess method (e.g. access$100 used to -access private members from a nested class. *) + access private members from a nested class. *) val java_is_access_method : t -> bool (** Check if the proc name has the type of a java vararg. -Note: currently only checks that the last argument has type Object[]. *) + Note: currently only checks that the last argument has type Object[]. *) val java_is_vararg : t -> bool (** Convert a proc name to a string for the user to see *) diff --git a/infer/src/backend/prop.ml b/infer/src/backend/prop.ml index e23be24eb..1d0bd4d86 100644 --- a/infer/src/backend/prop.ml +++ b/infer/src/backend/prop.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Functions for Propositions (i.e., Symbolic Heaps) *) diff --git a/infer/src/backend/prop.mli b/infer/src/backend/prop.mli index af7a50f4b..5abb7b270 100644 --- a/infer/src/backend/prop.mli +++ b/infer/src/backend/prop.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Functions for Propositions (i.e., Symbolic Heaps) *) @@ -20,8 +20,8 @@ type exposed (** kind for exposed props *) type 'a t (** the kind 'a should range over [normal] and [exposed] *) (** type to describe different strategies for initializing fields of a structure. [No_init] does not -initialize any fields of the struct. [Fld_init] initializes the fields of the struct with fresh -variables (C) or default values (Java). *) + initialize any fields of the struct. [Fld_init] initializes the fields of the struct with fresh + variables (C) or default values (Java). *) type struct_init_mode = | No_init | Fld_init @@ -61,7 +61,7 @@ val d_sigma : Sil.hpred list -> unit val d_pi_sigma: Sil.atom list -> Sil.hpred list -> unit (** Split sigma into stack and nonstack parts. -The boolean indicates whether the stack should only include local variales. *) + The boolean indicates whether the stack should only include local variales. *) val sigma_get_stack_nonstack : bool -> Sil.hpred list -> Sil.hpred list * Sil.hpred list (** Update the object substitution given the stack variables in the prop *) @@ -98,7 +98,7 @@ val sigma_fav_add : fav -> hpred list -> unit val sigma_fav : hpred list -> fav (** returns free non-program variables that are used to express -the contents of stack variables *) + the contents of stack variables *) val sigma_fav_in_pvars_add : fav -> hpred list -> unit (** Compute free non-program variables of prop *) @@ -131,8 +131,8 @@ val prop_sub : subst -> 'a t -> exposed t val prop_expmap : (Sil.exp -> Sil.exp) -> 'a t -> exposed t (** Relaces all expressions in the [hpred list] using the first argument. -Assume that the first parameter defines a partial function. -No expressions inside hpara are replaced. *) + Assume that the first parameter defines a partial function. + No expressions inside hpara are replaced. *) val sigma_replace_exp : (exp * exp) list -> hpred list -> hpred list val sigma_map : 'a t -> (hpred -> hpred) -> 'a t @@ -163,20 +163,20 @@ type arith_problem = val find_arithmetic_problem : path_pos -> normal t -> Sil.exp -> arith_problem option * normal t (** Normalize [exp] using the pure part of [prop]. Later, we should -change this such that the normalization exposes offsets of [exp] -as much as possible. *) + change this such that the normalization exposes offsets of [exp] + as much as possible. *) val exp_normalize_prop : 'a t -> Sil.exp -> Sil.exp (** Normalize the expression without abstracting complex subexpressions *) val exp_normalize_noabs : Sil.subst -> Sil.exp -> Sil.exp (** Collapse consecutive indices that should be added. For instance, -this function reduces x[1][1] to x[2]. The [typ] argument is used -to ensure the soundness of this collapsing. *) + this function reduces x[1][1] to x[2]. The [typ] argument is used + to ensure the soundness of this collapsing. *) val exp_collapse_consecutive_indices_prop : 'a t -> Sil.typ -> Sil.exp -> Sil.exp (** Normalize [exp] used for the address of a heap cell. -This normalization does not combine two offsets inside [exp]. *) + This normalization does not combine two offsets inside [exp]. *) val lexp_normalize_prop : 'a t -> exp -> exp val atom_normalize_prop : 'a t -> atom -> atom @@ -219,11 +219,11 @@ val create_strexp_of_type: Sil.tenv option -> struct_init_mode -> Sil.typ -> Sil val mk_ptsto : exp -> strexp -> exp -> hpred (** Construct a points-to predicate for an expression using either the provided expression [name] as -base for fresh identifiers. *) + base for fresh identifiers. *) val mk_ptsto_exp : Sil.tenv option -> struct_init_mode -> exp * exp * exp option -> Sil.inst -> hpred (** Construct a points-to predicate for a single program variable. -If [expand_structs] is true, initialize the fields of structs with fresh variables. *) + If [expand_structs] is true, initialize the fields of structs with fresh variables. *) val mk_ptsto_lvar : Sil.tenv option -> struct_init_mode -> Sil.inst -> pvar * exp * exp option -> hpred (** Construct a lseg predicate *) @@ -330,7 +330,7 @@ val get_pi_footprint : 'a t -> atom list val get_sigma_footprint : 'a t -> hpred list (** Deallocate the stack variables in [pvars], and replace them by normal variables. -Return the list of stack variables whose address was still present after deallocation. *) + Return the list of stack variables whose address was still present after deallocation. *) val deallocate_stack_vars : normal t -> pvar list -> Sil.pvar list * normal t (** Canonicalize the names of primed variables. *) @@ -407,12 +407,12 @@ val prop_iter_create : normal t -> unit prop_iter option val prop_iter_to_prop : 'a prop_iter -> normal t (** Add an atom to the pi part of prop iter. The -first parameter records whether it is done -during footprint or during re - execution. *) + first parameter records whether it is done + during footprint or during re - execution. *) val prop_iter_add_atom : bool -> 'a prop_iter -> atom -> 'a prop_iter (** Remove the current element from the iterator, and return the prop -associated to the resulting iterator. *) + associated to the resulting iterator. *) val prop_iter_remove_curr_then_to_prop : 'a prop_iter -> normal t (** Return the current hpred and state. *) @@ -462,12 +462,12 @@ val find_equal_formal_path : exp -> 'a t -> Sil.exp option (** {2 Internal modules} *) module Metrics : sig -(** Compute a size value for the prop, which indicates its complexity *) + (** Compute a size value for the prop, which indicates its complexity *) val prop_size : 'a t -> int (** Approximate the size of the longest chain by counting the max - number of |-> with the same type and whose lhs is primed or - footprint *) + number of |-> with the same type and whose lhs is primed or + footprint *) val prop_chain_size : 'a t -> int end diff --git a/infer/src/backend/propgraph.ml b/infer/src/backend/propgraph.ml index 14e4444c4..f2d50d6f4 100644 --- a/infer/src/backend/propgraph.ml +++ b/infer/src/backend/propgraph.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Propositions seen as graphs *) diff --git a/infer/src/backend/propgraph.mli b/infer/src/backend/propgraph.mli index 6922a238e..0e66016b8 100644 --- a/infer/src/backend/propgraph.mli +++ b/infer/src/backend/propgraph.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Propositions seen as graphs *) @@ -34,22 +34,22 @@ val edge_get_source : edge -> node val edge_get_succs : edge -> node list (** [edge_from_source g n footprint_part is_hpred] finds and edge with the given source [n] in prop [g]. -[footprint_part] indicates whether to search the edge in the footprint part, and [is_pred] whether it is an hpred edge. *) + [footprint_part] indicates whether to search the edge in the footprint part, and [is_pred] whether it is an hpred edge. *) val edge_from_source : t -> node -> bool -> bool -> edge option (** [get_succs g n footprint_part is_hpred] returns the successor nodes of [n] in [g]. -[footprint_part] indicates whether to search the successors in the footprint part, and [is_pred] whether to follow hpred edges. *) + [footprint_part] indicates whether to search the successors in the footprint part, and [is_pred] whether to follow hpred edges. *) val get_succs : t -> node -> bool -> bool -> node list (** [get_edges footprint_part g] returns the list of edges in [g], in the footprint part if [fotprint_part] is true *) val get_edges : bool -> t -> edge list (** [contains_edge footprint_part g e] returns true if the graph [g] contains edge [e], -searching the footprint part if [footprint_part] is true. *) + searching the footprint part if [footprint_part] is true. *) val contains_edge : bool -> t -> edge -> bool (** [iter_edges footprint_part f g] iterates function [f] on the edges in [g] in the same order as returned by [get_edges]; -if [footprint_part] is true the edges are taken from the footprint part. *) + if [footprint_part] is true the edges are taken from the footprint part. *) val iter_edges : bool -> (edge -> unit) -> t -> unit (** Graph annotated with the differences w.r.t. a previous graph *) @@ -59,12 +59,12 @@ type diff val compute_diff : color -> t -> t -> diff (** [diff_get_colormap footprint_part diff] returns the colormap of a computed diff, -selecting the footprint colormap if [footprint_part] is true. *) + selecting the footprint colormap if [footprint_part] is true. *) val diff_get_colormap : bool -> diff -> Utils.colormap (** Print a list of propositions, prepending each one with the given string, -If !Config.pring_using_diff is true, print the diff w.r.t. the given prop, -extracting its local stack vars if the boolean is true. *) + If !Config.pring_using_diff is true, print the diff w.r.t. the given prop, + extracting its local stack vars if the boolean is true. *) val pp_proplist : printenv -> string -> (Prop.normal Prop.t * bool) -> Format.formatter -> Prop.normal Prop.t list -> unit (** dump a prop list coming form the given initial prop *) diff --git a/infer/src/backend/propset.ml b/infer/src/backend/propset.ml index 79f467f4a..25bbd6e44 100644 --- a/infer/src/backend/propset.ml +++ b/infer/src/backend/propset.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Functions for Propositions (i.e., Symbolic Heaps) *) diff --git a/infer/src/backend/propset.mli b/infer/src/backend/propset.mli index cfce4df8c..176fc33c8 100644 --- a/infer/src/backend/propset.mli +++ b/infer/src/backend/propset.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Functions for Sets of Propositions with and without sharing *) @@ -15,7 +15,7 @@ open Utils (** {2 Sets of Propositions} *) (** Sets of propositions. -The invariant is maintaned that Prop.prop_rename_primed_footprint_vars is called on any prop added to the set. *) + The invariant is maintaned that Prop.prop_rename_primed_footprint_vars is called on any prop added to the set. *) type t (** Compare propsets *) @@ -56,12 +56,12 @@ val map : (Prop.normal Prop.t -> Prop.normal Prop.t) -> t -> t val map_option : (Prop.normal Prop.t -> Prop.normal Prop.t option) -> t -> t (** [fold f pset a] computes [(f pN ... (f p2 (f p1 a))...)], -where [p1 ... pN] are the elements of pset, in increasing -order. *) + where [p1 ... pN] are the elements of pset, in increasing + order. *) val fold : ('a -> Prop.normal Prop.t -> 'a) -> 'a -> t -> 'a (** [iter f pset] computes (f p1;f p2;..;f pN) -where [p1 ... pN] are the elements of pset, in increasing order. *) + where [p1 ... pN] are the elements of pset, in increasing order. *) val iter : (Prop.normal Prop.t -> unit) -> t -> unit val partition : (Prop.normal Prop.t -> bool) -> t -> t * t diff --git a/infer/src/backend/prover.ml b/infer/src/backend/prover.ml index 5d133af14..db924d37e 100644 --- a/infer/src/backend/prover.ml +++ b/infer/src/backend/prover.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Functions for Propositions (i.e., Symbolic Heaps) *) diff --git a/infer/src/backend/prover.mli b/infer/src/backend/prover.mli index 8b9614570..edd8b51f1 100644 --- a/infer/src/backend/prover.mli +++ b/infer/src/backend/prover.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Functions for Theorem Proving *) @@ -48,13 +48,13 @@ val check_inconsistency : Prop.normal Prop.t -> bool val check_allocatedness : Prop.normal Prop.t -> exp -> bool (** [is_root prop base_exp exp] checks whether [base_exp = -exp.offlist] for some list of offsets [offlist]. If so, it returns -[Some(offlist)]. Otherwise, it returns [None]. Assumes that -[base_exp] points to the beginning of a structure, not the middle. *) + exp.offlist] for some list of offsets [offlist]. If so, it returns + [Some(offlist)]. Otherwise, it returns [None]. Assumes that + [base_exp] points to the beginning of a structure, not the middle. *) val is_root : Prop.normal Prop.t -> exp -> exp -> offset list option (** [expand_hpred_pointer calc_index_frame hpred] expands [hpred] if it is a |-> whose lhs is a Lfield or Lindex or ptr+off. -Return [(changed, calc_index_frame', hpred')] where [changed] indicates whether the predicate has changed. *) + Return [(changed, calc_index_frame', hpred')] where [changed] indicates whether the predicate has changed. *) val expand_hpred_pointer : bool -> Sil.hpred -> bool * bool * Sil.hpred (** Get upper and lower bounds of an expression, if any *) @@ -76,11 +76,11 @@ type implication_result = | ImplFail of check list (** [check_implication_for_footprint p1 p2] returns -[Some(sub, frame, missing)] if [sub(p1 * missing) |- sub(p2 * -frame)] where [sub] is a substitution which instantiates the -primed vars of [p1] and [p2], which are assumed to be disjoint. *) + [Some(sub, frame, missing)] if [sub(p1 * missing) |- sub(p2 * + frame)] where [sub] is a substitution which instantiates the + primed vars of [p1] and [p2], which are assumed to be disjoint. *) val check_implication_for_footprint : -Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.exposed Prop.t -> implication_result + Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.exposed Prop.t -> implication_result (** {2 Cover: miminum set of pi's whose disjunction is equivalent to true} *) @@ -99,7 +99,7 @@ val compute_upper_bound_of_exp : Prop.normal Prop.t -> Sil.exp -> Sil.Int.t opti val check_subtype : Sil.tenv -> Sil.typ -> Sil.typ -> bool (** subtype_case_analysis tenv tecp1 texp2 performs case analysis on [texp1 <: texp2], -and returns the updated types in the true and false case, if they are possible *) + and returns the updated types in the true and false case, if they are possible *) val subtype_case_analysis : Sil.tenv -> Sil.exp -> Sil.exp -> Sil.exp option * Sil.exp option diff --git a/infer/src/backend/rearrange.ml b/infer/src/backend/rearrange.ml index 7632814d8..22d52b73b 100644 --- a/infer/src/backend/rearrange.ml +++ b/infer/src/backend/rearrange.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Re-arrangement and extension of structures with fresh variables *) diff --git a/infer/src/backend/rearrange.mli b/infer/src/backend/rearrange.mli index 8e5af8638..f162970ff 100644 --- a/infer/src/backend/rearrange.mli +++ b/infer/src/backend/rearrange.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Re-arrangement and extension of structures with fresh variables *) (* TODO: this description is not clear *) @@ -14,16 +14,16 @@ exception ARRAY_ACCESS (** Check for dereference errors: dereferencing 0, a freed value, or an undefined value *) val check_dereference_error : -Cfg.Procdesc.t -> Prop.normal Prop.t -> Sil.exp -> Sil.location -> unit + Cfg.Procdesc.t -> Prop.normal Prop.t -> Sil.exp -> Sil.location -> unit (** Check that an expression representing an objc block can be null and raise a [B1] null exception.*) (** It's used to check that we don't call possibly null blocks *) val check_call_to_objc_block_error : Cfg.Procdesc.t -> Prop.normal Prop.t -> Sil.exp -> Sil.location -> unit (** [rearrange lexp prop] rearranges [prop] into the form [prop' * lexp|->strexp:typ]. -It returns an iterator with [lexp |-> strexp: typ] as current predicate -and the path (an [offsetlist]) which leads to [lexp] as the iterator state. *) + It returns an iterator with [lexp |-> strexp: typ] as current predicate + and the path (an [offsetlist]) which leads to [lexp] as the iterator state. *) val rearrange : -Cfg.Procdesc.t -> Sil.tenv -> Sil.exp -> -Sil.typ -> Prop.normal Prop.t -> -Sil.location -> (Sil.offset list) Prop.prop_iter list + Cfg.Procdesc.t -> Sil.tenv -> Sil.exp -> + Sil.typ -> Prop.normal Prop.t -> + Sil.location -> (Sil.offset list) Prop.prop_iter list diff --git a/infer/src/backend/reporting.ml b/infer/src/backend/reporting.ml index 7afa1e6c6..b951cdf04 100644 --- a/infer/src/backend/reporting.ml +++ b/infer/src/backend/reporting.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils module L = Logging diff --git a/infer/src/backend/reporting.mli b/infer/src/backend/reporting.mli index 1c2003dbe..deffcc780 100644 --- a/infer/src/backend/reporting.mli +++ b/infer/src/backend/reporting.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Type of functions to report issues to the error_log in a spec. *) type log_issue = diff --git a/infer/src/backend/serialization.ml b/infer/src/backend/serialization.ml index 62bbb4fe9..f62a70d6e 100644 --- a/infer/src/backend/serialization.ml +++ b/infer/src/backend/serialization.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/backend/serialization.mli b/infer/src/backend/serialization.mli index 1e0db333a..dd30b89dd 100644 --- a/infer/src/backend/serialization.mli +++ b/infer/src/backend/serialization.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Serialization of data stuctures *) diff --git a/infer/src/backend/sil.ml b/infer/src/backend/sil.ml index 2e7309460..c1bfc6925 100644 --- a/infer/src/backend/sil.ml +++ b/infer/src/backend/sil.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** The Smallfoot Intermediate Language *) diff --git a/infer/src/backend/sil.mli b/infer/src/backend/sil.mli index 4f1e228ea..e7663da82 100644 --- a/infer/src/backend/sil.mli +++ b/infer/src/backend/sil.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** The Smallfoot Intermediate Language *) @@ -72,10 +72,10 @@ type proc_attributes = val copy_proc_attributes : proc_attributes -> proc_attributes (** Type for program variables. There are 4 kinds of variables: -1) local variables, used for local variables and formal parameters -2) callee program variables, used to handle recursion ([x | callee] is distinguished from [x]) -3) global variables -4) seed variables, used to store the initial value of formal parameters + 1) local variables, used for local variables and formal parameters + 2) callee program variables, used to handle recursion ([x | callee] is distinguished from [x]) + 3) global variables + 4) seed variables, used to store the initial value of formal parameters *) type pvar @@ -189,10 +189,10 @@ module Subtype : sig val subtypes_instof : t val join : t -> t -> t (** [case_analysis (c1, st1) (c2,st2) f] performs case analysis on [c1 <: c2] according to [st1] and [st2] - where f c1 c2 is true if c1 is a subtype of c2. - get_subtypes returning a pair: - - whether [st1] and [st2] admit [c1 <: c2], and in case return the updated subtype [st1] - - whether [st1] and [st2] admit [not(c1 <: c2)], and in case return the updated subtype [st1] *) + where f c1 c2 is true if c1 is a subtype of c2. + get_subtypes returning a pair: + - whether [st1] and [st2] admit [c1 <: c2], and in case return the updated subtype [st1] + - whether [st1] and [st2] admit [not(c1 <: c2)], and in case return the updated subtype [st1] *) val case_analysis : (Mangled.t * t) -> (Mangled.t * t) -> (Mangled.t -> Mangled.t -> bool) -> (Mangled.t -> bool) -> t option * t option val check_subtype : (Mangled.t -> Mangled.t -> bool) -> Mangled.t -> Mangled.t -> bool val subtypes_to_string : t -> string @@ -270,7 +270,7 @@ type dexp = | Dretcall of dexp * dexp list * location * call_flags (** Value paths: identify an occurrence of a value in a symbolic heap -each expression represents a path, with Dpvar being the simplest one *) + each expression represents a path, with Dpvar being the simplest one *) and vpath = dexp option @@ -327,9 +327,9 @@ and typ = | Tptr of typ * ptr_kind (** pointer type *) | Tstruct of struct_fields * struct_fields * csu * Mangled.t option * (csu * Mangled.t) list * Procname.t list * item_annotation (** Structure type with nonstatic and static fields, class/struct/union flag, name, list of superclasses, - methods defined, and annotations. - The fld - typ pairs are always sorted. This means that we don't support programs that exploit specific layouts - of C structs. *) + methods defined, and annotations. + The fld - typ pairs are always sorted. This means that we don't support programs that exploit specific layouts + of C structs. *) | Tarray of typ * exp (** array type with fixed size *) | Tenum of (Mangled.t * const) list @@ -386,7 +386,7 @@ type instr = | Prune of exp * location * bool * if_kind (** prune the state based on [exp=1], the boolean indicates whether true branch *) | Call of Ident.t list * exp * (exp * typ) list * location * call_flags (** [Call (ret_id1..ret_idn, e_fun, arg_ts, loc, call_flags)] represents an instructions - [ret_id1..ret_idn = e_fun(arg_ts);] where n = 0 for void return and n > 1 for struct return *) + [ret_id1..ret_idn = e_fun(arg_ts);] where n = 0 for void return and n > 1 for struct return *) | Nullify of pvar * location * bool (** nullify stack variable, the bool parameter indicates whether to deallocate the variable *) | Abstract of location (** apply abstraction *) | Remove_temps of Ident.t list * location (** remove temporaries *) @@ -469,31 +469,31 @@ type strexp = | Estruct of (Ident.fieldname * strexp) list * inst (** C structure *) | Earray of exp * (exp * strexp) list * inst (** Array of given size. *) (** There are two conditions imposed / used in the array case. -First, if some index and value pair appears inside an array -in a strexp, then the index is less than the size of the array. -For instance, x |->[10 | e1: v1] implies that e1 <= 9. -Second, if two indices appear in an array, they should be different. -For instance, x |->[10 | e1: v1, e2: v2] implies that e1 != e2. *) + First, if some index and value pair appears inside an array + in a strexp, then the index is less than the size of the array. + For instance, x |->[10 | e1: v1] implies that e1 <= 9. + Second, if two indices appear in an array, they should be different. + For instance, x |->[10 | e1: v1, e2: v2] implies that e1 != e2. *) (** an atomic heap predicate *) and hpred = | Hpointsto of exp * strexp * exp (** represents [exp|->strexp:typexp] where [typexp] - is an expression representing a type, e.h. [sizeof(t)]. *) + is an expression representing a type, e.h. [sizeof(t)]. *) | Hlseg of lseg_kind * hpara * exp * exp * exp list (** higher - order predicate for singly - linked lists. - Should ensure that exp1!= exp2 implies that exp1 is allocated. - This assumption is used in the rearrangement. The last [exp list] parameter - is used to denote the shared links by all the nodes in the list.*) + Should ensure that exp1!= exp2 implies that exp1 is allocated. + This assumption is used in the rearrangement. The last [exp list] parameter + is used to denote the shared links by all the nodes in the list.*) | Hdllseg of lseg_kind * hpara_dll * exp * exp * exp * exp * exp list -(** higher-order predicate for doubly-linked lists. *) + (** higher-order predicate for doubly-linked lists. *) (** parameter for the higher-order singly-linked list predicate. -Means "lambda (root,next,svars). Exists evars. body". -Assume that root, next, svars, evars are disjoint sets of -primed identifiers, and include all the free primed identifiers in body. -body should not contain any non - primed identifiers or program -variables (i.e. pvars). *) + Means "lambda (root,next,svars). Exists evars. body". + Assume that root, next, svars, evars are disjoint sets of + primed identifiers, and include all the free primed identifiers in body. + body should not contain any non - primed identifiers or program + variables (i.e. pvars). *) and hpara = { root: Ident.t; next: Ident.t; @@ -502,8 +502,8 @@ and hpara = body: hpred list } (** parameter for the higher-order doubly-linked list predicates. -Assume that all the free identifiers in body_dll should belong to -cell, blink, flink, svars_dll, evars_dll. *) + Assume that all the free identifiers in body_dll should belong to + cell, blink, flink, svars_dll, evars_dll. *) and hpara_dll = { cell: Ident.t; (** address cell *) blink: Ident.t; (** backward link *) @@ -692,21 +692,21 @@ val unop_equal : unop -> unop -> bool val binop_equal : binop -> binop -> bool (** This function returns true if the operation is injective -wrt. each argument: op(e,-) and op(-, e) is injective for all e. -The return value false means "don't know". *) + wrt. each argument: op(e,-) and op(-, e) is injective for all e. + The return value false means "don't know". *) val binop_injective : binop -> bool (** This function returns true if the operation can be inverted. *) val binop_invertible : binop -> bool (** This function inverts an injective binary operator -with respect to the first argument. It returns an expression [e'] such that -BinOp([binop], [e'], [exp1]) = [exp2]. If the [binop] operation is not invertible, -the function raises an exception by calling "assert false". *) + with respect to the first argument. It returns an expression [e'] such that + BinOp([binop], [e'], [exp1]) = [exp2]. If the [binop] operation is not invertible, + the function raises an exception by calling "assert false". *) val binop_invert : binop -> exp -> exp -> exp (** This function returns true if 0 is the right unit of [binop]. -The return value false means "don't know". *) + The return value false means "don't know". *) val binop_is_zero_runit : binop -> bool val mem_kind_compare : mem_kind -> mem_kind -> int @@ -846,11 +846,11 @@ val pp_typ_full : printenv -> Format.formatter -> typ -> unit val typ_to_string : typ -> string (** [pp_type_decl pe pp_base pp_size f typ] pretty prints a type declaration. -pp_base prints the variable for a declaration, or can be skip to print only the type -pp_size prints the expression for the array size *) + pp_base prints the variable for a declaration, or can be skip to print only the type + pp_size prints the expression for the array size *) val pp_type_decl: printenv -> (Format.formatter -> unit -> unit) -> -(printenv -> Format.formatter -> exp -> unit) -> -Format.formatter -> typ -> unit + (printenv -> Format.formatter -> exp -> unit) -> + Format.formatter -> typ -> unit (** Dump a type with all the details. *) val d_typ_full : typ -> unit @@ -982,9 +982,9 @@ val pp_hpara_dll : printenv -> Format.formatter -> hpara_dll -> unit val pp_hpara_dll_list : printenv -> Format.formatter -> hpara_dll list -> unit (** Module Predicates records the occurrences of predicates as parameters -of (doubly -)linked lists and Epara. Provides unique numbering for predicates and an iterator. *) + of (doubly -)linked lists and Epara. Provides unique numbering for predicates and an iterator. *) module Predicates : sig -(** predicate environment *) + (** predicate environment *) type env (** create an empty predicate environment *) val empty_env : unit -> env @@ -995,7 +995,7 @@ module Predicates : sig (** return the id of the hpara_dll *) val get_hpara_dll_id : env -> hpara_dll -> int (** [iter env f f_dll] iterates [f] and [f_dll] on all the hpara and hpara_dll, - passing the unique id to the functions. The iterator can only be used once. *) + passing the unique id to the functions. The iterator can only be used once. *) val iter : env -> (int -> hpara -> unit) -> (int -> hpara_dll -> unit) -> unit (** Process one hpred, updating the predicate environment *) val process_hpred : env -> hpred -> unit @@ -1007,9 +1007,9 @@ val pp_hpred_env : printenv -> Predicates.env option -> Format.formatter -> hpre (** {2 Functions for traversing SIL data types} *) (** This function should be used before adding a new -index to Earray. The [exp] is the newly created -index. This function "cleans" [exp] according to whether it is the footprint or current part of the prop. -The function faults in the re - execution mode, as an internal check of the tool. *) + index to Earray. The [exp] is the newly created + index. This function "cleans" [exp] according to whether it is the footprint or current part of the prop. + The function faults in the re - execution mode, as an internal check of the tool. *) val array_clean_new_index : bool -> exp -> exp (** Change exps in strexp using [f]. *) @@ -1042,15 +1042,15 @@ val hpred_list_get_lexps : (exp -> bool) -> hpred list -> exp list (** {2 Utility Functions for Expressions} *) (** Turn an expression representing a type into the type it represents -If not a sizeof, return the default type if given, otherwise raise an exception *) + If not a sizeof, return the default type if given, otherwise raise an exception *) val texp_to_typ : typ option -> exp -> typ (** If a struct type with field f, return the type of f. -If not, return the default type if given, otherwise raise an exception *) + If not, return the default type if given, otherwise raise an exception *) val struct_typ_fld : typ option -> Ident.fieldname -> typ -> typ (** If an array type, return the type of the element. -If not, return the default type if given, otherwise raise an exception *) + If not, return the default type if given, otherwise raise an exception *) val array_typ_elem : typ option -> typ -> typ (** Return the root of [lexp]. *) @@ -1060,7 +1060,7 @@ val root_of_lexp : exp -> exp val exp_get_undefined : bool -> exp (** Checks whether an expression denotes a location using pointer arithmetic. -Currently, catches array - indexing expressions such as a[i] only. *) + Currently, catches array - indexing expressions such as a[i] only. *) val exp_pointer_arith : exp -> bool (** Integer constant 0 *) @@ -1138,7 +1138,7 @@ val fav_mem : fav -> Ident.t -> bool val fav_from_list : Ident.t list -> fav (** Convert a [fav] to a list of identifiers while preserving the order -that identifiers were added to [fav]. *) + that identifiers were added to [fav]. *) val fav_to_list : fav -> Ident.t list (** Copy a [fav]. *) @@ -1154,7 +1154,7 @@ val fav_filter_ident : fav -> (Ident.t -> bool) -> unit val fav_copy_filter_ident : fav -> (Ident.t -> bool) -> fav (** [fav_subset_ident fav1 fav2] returns true if every ident in [fav1] -is in [fav2].*) + is in [fav2].*) val fav_subset_ident : fav -> fav -> bool (** add identifier list to fav *) @@ -1190,9 +1190,9 @@ val hpara_dll_shallow_av : hpara_dll -> fav (** {2 Functions for computing all free or bound non-program variables} *) (** Non-program variables include all of primed, normal and footprint -variables. Thus, the functions essentially compute all the -identifiers occuring in a parameter. Some variables can appear more -than once in the result. *) + variables. Thus, the functions essentially compute all the + identifiers occuring in a parameter. Some variables can appear more + than once in the result. *) val exp_av_add : fav -> exp -> unit @@ -1209,8 +1209,8 @@ val hpara_av_add : fav -> hpara -> unit type subst (** Create a substitution from a list of pairs. -For all (id1, e1), (id2, e2) in the input list, -if id1 = id2, then e1 = e2. *) + For all (id1, e1), (id2, e2) in the input list, + if id1 = id2, then e1 = e2. *) val sub_of_list : (Ident.t * exp) list -> subst (** like sub_of_list, but allow duplicate ids and only keep the first occurrence *) @@ -1229,34 +1229,34 @@ val sub_compare : subst -> subst -> int val sub_equal : subst -> subst -> bool (** Compute the common id-exp part of two inputs [subst1] and [subst2]. -The first component of the output is this common part. -The second and third components are the remainder of [subst1] -and [subst2], respectively. *) + The first component of the output is this common part. + The second and third components are the remainder of [subst1] + and [subst2], respectively. *) val sub_join : subst -> subst -> subst (** Compute the common id-exp part of two inputs [subst1] and [subst2]. -The first component of the output is this common part. -The second and third components are the remainder of [subst1] -and [subst2], respectively. *) + The first component of the output is this common part. + The second and third components are the remainder of [subst1] + and [subst2], respectively. *) val sub_symmetric_difference : subst -> subst -> subst * subst * subst (** [sub_find filter sub] returns the expression associated to the first identifier that satisfies [filter]. Raise [Not_found] if there isn't one. *) val sub_find : (Ident.t -> bool) -> subst -> exp (** [sub_filter filter sub] restricts the domain of [sub] to the -identifiers satisfying [filter]. *) + identifiers satisfying [filter]. *) val sub_filter : (Ident.t -> bool) -> subst -> subst (** [sub_filter_exp filter sub] restricts the domain of [sub] to the -identifiers satisfying [filter(id, sub(id))]. *) + identifiers satisfying [filter(id, sub(id))]. *) val sub_filter_pair : (Ident.t * exp -> bool) -> subst -> subst (** [sub_range_partition filter sub] partitions [sub] according to -whether range expressions satisfy [filter]. *) + whether range expressions satisfy [filter]. *) val sub_range_partition : (exp -> bool) -> subst -> subst * subst (** [sub_domain_partition filter sub] partitions [sub] according to -whether domain identifiers satisfy [filter]. *) + whether domain identifiers satisfy [filter]. *) val sub_domain_partition : (Ident.t -> bool) -> subst -> subst * subst (** Return the list of identifiers in the domain of the substitution. *) @@ -1269,7 +1269,7 @@ val sub_range : subst -> exp list val sub_range_map : (exp -> exp) -> subst -> subst (** [sub_map f g sub] applies the renaming [f] to identifiers in the domain -of [sub] and the substitution [g] to the expressions in the range of [sub]. *) + of [sub] and the substitution [g] to the expressions in the range of [sub]. *) val sub_map : (Ident.t -> Ident.t) -> (exp -> exp) -> subst -> subst (** Checks whether [id] belongs to the domain of [subst]. *) @@ -1279,11 +1279,11 @@ val mem_sub : Ident.t -> subst -> bool val extend_sub : subst -> Ident.t -> exp -> subst option (** Free auxilary variables in the domain and range of the -substitution. *) + substitution. *) val sub_fav_add : fav -> subst -> unit (** Free or bound auxilary variables in the domain and range of the -substitution. *) + substitution. *) val sub_av_add : fav -> subst -> unit (** Compute free pvars in a sub *) @@ -1304,7 +1304,7 @@ val hpara_sub : subst -> hpara -> hpara (** {2 Functions for replacing occurrences of expressions.} *) (** The first parameter should define a partial function. -No parts of hpara are replaced by these functions. *) + No parts of hpara are replaced by these functions. *) val exp_replace_exp : (exp * exp) list -> exp -> exp @@ -1348,15 +1348,15 @@ val exp_add_offsets : exp -> offset list -> exp val sigma_to_sigma_ne : hpred list -> (atom list * hpred list) list (** [hpara_instantiate para e1 e2 elist] instantiates [para] with [e1], -[e2] and [elist]. If [para = lambda (x, y, xs). exists zs. b], -then the result of the instantiation is [b\[e1 / x, e2 / y, elist / xs, _zs'/ zs\]] -for some fresh [_zs'].*) + [e2] and [elist]. If [para = lambda (x, y, xs). exists zs. b], + then the result of the instantiation is [b\[e1 / x, e2 / y, elist / xs, _zs'/ zs\]] + for some fresh [_zs'].*) val hpara_instantiate : hpara -> exp -> exp -> exp list -> Ident.t list * hpred list (** [hpara_dll_instantiate para cell blink flink elist] instantiates [para] with [cell], -[blink], [flink], and [elist]. If [para = lambda (x, y, z, xs). exists zs. b], -then the result of the instantiation is [b\[cell / x, blink / y, flink / z, elist / xs, _zs'/ zs\]] -for some fresh [_zs'].*) + [blink], [flink], and [elist]. If [para = lambda (x, y, z, xs). exists zs. b], + then the result of the instantiation is [b\[cell / x, blink / y, flink / z, elist / xs, _zs'/ zs\]] + for some fresh [_zs'].*) val hpara_dll_instantiate : hpara_dll -> exp -> exp -> exp -> exp list -> Ident.t list * hpred list (** Return the list of expressions that could be understood as outgoing arrows from the strexp *) diff --git a/infer/src/backend/specs.ml b/infer/src/backend/specs.ml index 45edfe02c..2dc8adae6 100644 --- a/infer/src/backend/specs.ml +++ b/infer/src/backend/specs.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Specifications and spec table *) diff --git a/infer/src/backend/specs.mli b/infer/src/backend/specs.mli index 8f4ee42a5..e33ab8900 100644 --- a/infer/src/backend/specs.mli +++ b/infer/src/backend/specs.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Specifications and spec table *) @@ -16,7 +16,7 @@ open Utils (** Module for joined props: the result of joining together propositions repeatedly *) module Jprop : sig -(** Remember when a prop is obtained as the join of two other props; the first parameter is an id *) + (** Remember when a prop is obtained as the join of two other props; the first parameter is an id *) type 'a t = | Prop of int * 'a Prop.t | Joined of int * 'a Prop.t * 'a t * 'a t @@ -37,8 +37,8 @@ module Jprop : sig val fav_add : Sil.fav -> 'a t -> unit (** [jprop_filter filter joinedprops] applies [filter] to the elements - of [joindeprops] and applies it to the subparts if the result is - [None]. Returns the most absract results which pass [filter]. *) + of [joindeprops] and applies it to the subparts if the result is + [None]. Returns the most absract results which pass [filter]. *) val filter : ('a t -> 'b option) -> 'a t list -> 'b list (** apply a substitution to a jprop *) @@ -67,9 +67,9 @@ module Visitedset : Set.S with type elt = int * int list val visited_str : Visitedset.t -> string (** A spec consists of: -pre: a joined prop -posts: a list of props with path -visited: a list of pairs (node_id, line) for the visited nodes *) + pre: a joined prop + posts: a list of props with path + visited: a list of pairs (node_id, line) for the visited nodes *) type 'a spec = { pre: 'a Jprop.t; posts: ('a Prop.t * Paths.Path.t) list; visited : Visitedset.t } module NormSpec : sig (* encapsulate type for normalized specs *) @@ -217,21 +217,21 @@ val is_active : Procname.t -> bool val is_inactive : Procname.t -> bool (** Initialize the summary for [proc_name] given dependent procs in list [depend_list]. -Do nothing if a summary exists already. *) + Do nothing if a summary exists already. *) val init_summary : -(Procname.t * (** proc_name *) -Sil.typ * (** ret type *) -(string * Sil.typ) list * (** formals *) -Procname.t list * (** depend list *) -Sil.location * (** loc *) -int list * (** nodes *) -proc_flags * (** procedure flags *) -Errlog.t * (** initial error log *) -(Procname.t * Sil.location) list * (** calls *) -int * (** cyclomatic *) -(Cg.in_out_calls option) * (** in and out calls *) -Sil.proc_attributes) (** attributes of the procedure *) --> unit + (Procname.t * (** proc_name *) + Sil.typ * (** ret type *) + (string * Sil.typ) list * (** formals *) + Procname.t list * (** depend list *) + Sil.location * (** loc *) + int list * (** nodes *) + proc_flags * (** procedure flags *) + Errlog.t * (** initial error log *) + (Procname.t * Sil.location) list * (** calls *) + int * (** cyclomatic *) + (Cg.in_out_calls option) * (** in and out calls *) + Sil.proc_attributes) (** attributes of the procedure *) + -> unit val reset_summary : Cg.t -> Procname.t -> Sil.location -> unit @@ -262,7 +262,7 @@ val proc_get_attributes : Procname.t -> Cfg.Procdesc.t -> Sil.proc_attributes val proc_get_method_annotation : Procname.t -> Cfg.Procdesc.t -> Sil.method_annotation (** Check if the procedure is from a library: -It's not defined in the current proc desc, and there is no spec file for it. *) + It's not defined in the current proc desc, and there is no spec file for it. *) val proc_is_library : Procname.t -> Cfg.Procdesc.t -> bool (** Re-initialize a dependency map *) @@ -284,5 +284,5 @@ val store_summary : Procname.t -> summary -> unit val summary_compact : Sil.sharing_env -> summary -> summary (** Update the dependency map of [proc_name] with the current -timestamps of the dependents *) + timestamps of the dependents *) val update_dependency_map : Procname.t -> unit diff --git a/infer/src/backend/state.ml b/infer/src/backend/state.ml index c784807fc..39476f25d 100644 --- a/infer/src/backend/state.ml +++ b/infer/src/backend/state.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** State of symbolic execution *) diff --git a/infer/src/backend/state.mli b/infer/src/backend/state.mli index 94816a829..a68cac08f 100644 --- a/infer/src/backend/state.mli +++ b/infer/src/backend/state.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** State of symbolic execution *) @@ -51,7 +51,7 @@ val get_node_id : unit -> int val get_node_id_key : unit -> int * int (** return the normalized precondition extracted form the last prop seen, if any -the abstraction function is a parameter to get around module dependencies *) + the abstraction function is a parameter to get around module dependencies *) val get_normalized_pre : (Sil.tenv -> Prop.normal Prop.t -> Prop.normal Prop.t) -> Prop.normal Prop.t option (** Get last path seen in symbolic execution *) @@ -79,8 +79,8 @@ val mark_instr_fail : (Prop.normal Prop.t) option -> exn -> unit val mark_instr_ok : unit -> unit (** Create a function to find duplicate nodes. -A node is a duplicate of another one if they have the same kind and location -and normalized (w.r.t. renaming of let - bound ids) list of instructions. *) + A node is a duplicate of another one if they have the same kind and location + and normalized (w.r.t. renaming of let - bound ids) list of instructions. *) val mk_find_duplicate_nodes: Cfg.Procdesc.t -> (Cfg.Node.t -> Cfg.NodeSet.t) type log_issue = diff --git a/infer/src/backend/symExec.ml b/infer/src/backend/symExec.ml index 5872a1b70..12169771d 100644 --- a/infer/src/backend/symExec.ml +++ b/infer/src/backend/symExec.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Symbolic Execution *) diff --git a/infer/src/backend/symExec.mli b/infer/src/backend/symExec.mli index 32114549d..048f6aaf9 100644 --- a/infer/src/backend/symExec.mli +++ b/infer/src/backend/symExec.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Symbolic Execution *) @@ -18,12 +18,12 @@ val function_is_builtin : Procname.t -> bool (** symbolic execution on the level of sets of propositions *) val lifted_sym_exec : (exn -> unit) -> Cfg.cfg -> Sil.tenv -> Cfg.Procdesc.t -> -Paths.PathSet.t -> Cfg.Node.t -> Sil.instr list -> Paths.PathSet.t + Paths.PathSet.t -> Cfg.Node.t -> Sil.instr list -> Paths.PathSet.t (** OO method resolution: given a class name and a method name, climb the class hierarchy to find -* the procname that the method name will actually resolve to at runtime. For example, if we have -* a procname like Foo.toString() and Foo does not override toString(), we must resolve the call to -* toString(). We will end up with Super.toString() where Super is some superclass of Foo. *) + * the procname that the method name will actually resolve to at runtime. For example, if we have + * a procname like Foo.toString() and Foo does not override toString(), we must resolve the call to + * toString(). We will end up with Super.toString() where Super is some superclass of Foo. *) val resolve_method : Sil.tenv -> Mangled.t -> Procname.t -> Procname.t (** {2 Functions for handling builtins } *) diff --git a/infer/src/backend/tabulation.ml b/infer/src/backend/tabulation.ml index 004cfd874..ee5c00063 100644 --- a/infer/src/backend/tabulation.ml +++ b/infer/src/backend/tabulation.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Interprocedural footprint analysis *) diff --git a/infer/src/backend/tabulation.mli b/infer/src/backend/tabulation.mli index f21522c21..d60005873 100644 --- a/infer/src/backend/tabulation.mli +++ b/infer/src/backend/tabulation.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Interprocedural footprint analysis *) @@ -24,7 +24,7 @@ val find_dereference_without_null_check_in_sexp : Sil.strexp -> (int * Sil.path_ (** raise a cast exception *) val raise_cast_exception : -Utils.ml_location -> Procname.t option -> Sil.exp -> Sil.exp -> Sil.exp -> 'a + Utils.ml_location -> Procname.t option -> Sil.exp -> Sil.exp -> Sil.exp -> 'a (** check if a prop is an exception *) val prop_is_exn : Procname.t -> 'a Prop.t -> bool diff --git a/infer/src/backend/type_prop.ml b/infer/src/backend/type_prop.ml index 0ddccd65a..47e7e5944 100644 --- a/infer/src/backend/type_prop.ml +++ b/infer/src/backend/type_prop.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (* Module for implementing an algorithm for propagating dynamic types. *) diff --git a/infer/src/backend/type_prop.mli b/infer/src/backend/type_prop.mli index 4dee8fa6d..9250e881c 100644 --- a/infer/src/backend/type_prop.mli +++ b/infer/src/backend/type_prop.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) val type_prop : unit -> unit diff --git a/infer/src/backend/utils.ml b/infer/src/backend/utils.ml index 970044f59..6e4c3d6b3 100644 --- a/infer/src/backend/utils.ml +++ b/infer/src/backend/utils.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** General utility functions and definition with global scope *) diff --git a/infer/src/backend/utils.mli b/infer/src/backend/utils.mli index 026b9c319..405f6b9aa 100644 --- a/infer/src/backend/utils.mli +++ b/infer/src/backend/utils.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** General utility functions *) @@ -117,7 +117,7 @@ val list_remove_irrelevant_duplicates : ('a -> 'a -> int) -> ('a -> bool) -> 'a val list_merge_sorted_nodup : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list -> 'a list (** Returns whether there is an intersection in the elements of the two lists. -The compare function is required to sort the lists. *) + The compare function is required to sort the lists. *) val list_intersect : ('a -> 'a -> int) -> 'a list -> 'a list -> bool exception Fail @@ -178,7 +178,7 @@ type printenv = { val pe_reset_obj_sub : printenv -> printenv (** Set the object substitution, which is supposed to preserve the type. -Currently only used for a map from (identifier) expressions to the program var containing them *) + Currently only used for a map from (identifier) expressions to the program var containing them *) val pe_set_obj_sub : printenv -> ('a -> 'a) -> printenv (** standard colormap: black *) @@ -259,7 +259,7 @@ val exn_not_timeout : exn -> bool (** Count the number of symbolic operations *) module SymOp : sig -(** Count one symop *) + (** Count one symop *) val pay : unit -> unit (** Reset the counter and activate the alarm *) @@ -317,13 +317,13 @@ module Arg2 : sig val from_arg_desc : (key * spec * doc) -> aligned (** [create_options_desc double_minus unsorted_desc title] creates a group of sorted command-line arguments. - [double_minus] is a booleand indicating whether the [-- option = nn] format or [- option n] format is to be used. - [title] is the title of this group of options. - It expects a list [opname, desc, param_opt, text] where - [opname] is the name of the option - [desc] is the Arg.spec - [param_opt] is the optional parameter to [opname] - [text] is the description of the option *) + [double_minus] is a booleand indicating whether the [-- option = nn] format or [- option n] format is to be used. + [title] is the title of this group of options. + It expects a list [opname, desc, param_opt, text] where + [opname] is the name of the option + [desc] is the Arg.spec + [param_opt] is the optional parameter to [opname] + [text] is the description of the option *) val create_options_desc : bool -> string -> (string * Arg.spec * string option * string) list -> aligned list end @@ -384,7 +384,7 @@ val reserved_arg_desc : (string * Arg.spec * string option * string) list (** Escape a string for use in a CSV or XML file: replace reserved characters with escape sequences *) module Escape : sig -(** escape a string specifying the per character escaping function *) + (** escape a string specifying the per character escaping function *) val escape_map : (char -> string option) -> string -> string val escape_dotty : string -> string (** escape a string to be used in a dotty file *) val escape_csv : string -> string (** escape a string to be used in a csv file *) @@ -414,11 +414,11 @@ val proc_flags_find : proc_flags -> string -> string val join_strings : string -> string list -> string (** [next compare] transforms the comparison function [compare] to another function taking -the outcome of another comparison as last parameter and only performs this comparison if this value -is different from 0. Useful to combine comparison functions using the operator |>. The outcome of -the expression [Int.compare x y |> next Set.compare s t] is: [Int.compare x y] if this value is -not [0], skipping the evaluation of [Set.compare s t] in such case; or [Set.compare s t] in case -[Int.compare x y] is [0] *) + the outcome of another comparison as last parameter and only performs this comparison if this value + is different from 0. Useful to combine comparison functions using the operator |>. The outcome of + the expression [Int.compare x y |> next Set.compare s t] is: [Int.compare x y] if this value is + not [0], skipping the evaluation of [Set.compare s t] in such case; or [Set.compare s t] in case + [Int.compare x y] is [0] *) val next : ('a -> 'a -> int) -> ('a -> 'a -> int -> int) (** Functional fold function over all the file of a directory *) diff --git a/infer/src/backend/version.ml.in b/infer/src/backend/version.ml.in index 7f7e391bc..209b99192 100644 --- a/infer/src/backend/version.ml.in +++ b/infer/src/backend/version.ml.in @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) let major = @MAJOR@ let minor = @MINOR@ diff --git a/infer/src/checkers/annotations.ml b/infer/src/checkers/annotations.ml index 8798808c1..fe6cd9b31 100644 --- a/infer/src/checkers/annotations.ml +++ b/infer/src/checkers/annotations.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module F = Format module L = Logging diff --git a/infer/src/checkers/annotations.mli b/infer/src/checkers/annotations.mli index 3ab3f3c27..4e83f081c 100644 --- a/infer/src/checkers/annotations.mli +++ b/infer/src/checkers/annotations.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Annotations. *) @@ -21,8 +21,8 @@ type annotated_signature = params: (string * Sil.item_annotation * Sil.typ) list } (** Annotated parameters. *) (** Check if the annotated signature is for a wrapper of an anonymous inner class method. -These wrappers have the same name as the original method, every type is Object, and the parameters -are called x0, x1, x2. *) + These wrappers have the same name as the original method, every type is Object, and the parameters + are called x0, x1, x2. *) val annotated_signature_is_anonymous_inner_class_wrapper : annotated_signature -> Procname.t -> bool (** Check if the given parameter has a Nullable annotation in the given signature *) @@ -30,15 +30,15 @@ val param_is_nullable : Sil.pvar -> annotated_signature -> bool (** Mark the annotated signature with the given annotation map. *) val annotated_signature_mark : -Procname.t -> annotation -> annotated_signature -> bool * bool list -> annotated_signature + Procname.t -> annotation -> annotated_signature -> bool * bool list -> annotated_signature (** Mark the return of the annotated signature with the given annotation. *) val annotated_signature_mark_return : -Procname.t -> annotation -> annotated_signature -> annotated_signature + Procname.t -> annotation -> annotated_signature -> annotated_signature (** Mark the return of the annotated signature @Strict. *) val annotated_signature_mark_return_strict : -Procname.t -> annotated_signature -> annotated_signature + Procname.t -> annotated_signature -> annotated_signature val equal : annotated_signature -> annotated_signature -> bool @@ -46,11 +46,11 @@ type get_method_annotation = Procname.t -> Cfg.Procdesc.t -> Sil.method_annotati (** Get the annotated signature of the procedure *) val get_annotated_signature : -get_method_annotation -> Cfg.Procdesc.t -> Procname.t -> annotated_signature + get_method_annotation -> Cfg.Procdesc.t -> Procname.t -> annotated_signature (** Return the type of the field [fn] and its annotation, None if [typ] has no field named [fn] *) val get_field_type_and_annotation : -Ident.fieldname -> Sil.typ -> (Sil.typ * Sil.item_annotation) option + Ident.fieldname -> Sil.typ -> (Sil.typ * Sil.item_annotation) option val ia_contains : Sil.item_annotation -> string -> bool diff --git a/infer/src/checkers/callbackChecker.ml b/infer/src/checkers/callbackChecker.ml index 532ecee03..1f15acbd3 100644 --- a/infer/src/checkers/callbackChecker.ml +++ b/infer/src/checkers/callbackChecker.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *) diff --git a/infer/src/checkers/callbackChecker.mli b/infer/src/checkers/callbackChecker.mli index ee40f0873..26c283f6b 100644 --- a/infer/src/checkers/callbackChecker.mli +++ b/infer/src/checkers/callbackChecker.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *) diff --git a/infer/src/checkers/checkDeadCode.ml b/infer/src/checkers/checkDeadCode.ml index 67dfcd777..c7b9458c0 100644 --- a/infer/src/checkers/checkDeadCode.ml +++ b/infer/src/checkers/checkDeadCode.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/checkers/checkDeadCode.mli b/infer/src/checkers/checkDeadCode.mli index e65a66f9f..0f28d7f49 100644 --- a/infer/src/checkers/checkDeadCode.mli +++ b/infer/src/checkers/checkDeadCode.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Simple check for dead code. *) val callback_check_dead_code: Callbacks.proc_callback_t diff --git a/infer/src/checkers/checkers.ml b/infer/src/checkers/checkers.ml index 142255234..0887e69fb 100644 --- a/infer/src/checkers/checkers.ml +++ b/infer/src/checkers/checkers.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for user-defined checkers. *) diff --git a/infer/src/checkers/checkers.mli b/infer/src/checkers/checkers.mli index a2f1b1500..386aae742 100644 --- a/infer/src/checkers/checkers.mli +++ b/infer/src/checkers/checkers.mli @@ -1,35 +1,35 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for user-defined checkers. *) (** State that persists in the .specs files. *) module ST : sig -(** Add a key/value pair. *) + (** Add a key/value pair. *) val pname_add : Procname.t -> string -> string -> unit (** Find the value associated to the key. Raise Not_found if it does not exist. *) val pname_find: Procname.t -> string -> string (** Report an error. *) val report_error: - Procname.t -> - Cfg.Procdesc.t -> - string -> - Sil.location -> - ?advice: string option -> - ?field_name: Ident.fieldname option -> - ?origin_loc: Sil.location option -> - ?exception_kind: (string -> Localise.error_desc -> exn) -> - ?always_report: bool -> - string -> - unit + Procname.t -> + Cfg.Procdesc.t -> + string -> + Sil.location -> + ?advice: string option -> + ?field_name: Ident.fieldname option -> + ?origin_loc: Sil.location option -> + ?exception_kind: (string -> Localise.error_desc -> exn) -> + ?always_report: bool -> + string -> + unit (** Store the summary to a .specs file. *) val store_summary : Procname.t -> unit @@ -37,8 +37,8 @@ module ST : sig end (* ST *) module PP : sig -(** Print a range of lines of the source file in [loc], including [nbefore] lines before loc -and [nafter] lines after [loc] *) + (** Print a range of lines of the source file in [loc], including [nbefore] lines before loc + and [nafter] lines after [loc] *) val pp_loc_range : Printer.LineReader.t -> int -> int -> Format.formatter -> Sil.location -> unit end (* PP *) diff --git a/infer/src/checkers/codeQuery.ml b/infer/src/checkers/codeQuery.ml index dde24a616..3512b2bd0 100644 --- a/infer/src/checkers/codeQuery.ml +++ b/infer/src/checkers/codeQuery.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for code queries. *) diff --git a/infer/src/checkers/codeQuery.mli b/infer/src/checkers/codeQuery.mli index df613cbd8..59cc15341 100644 --- a/infer/src/checkers/codeQuery.mli +++ b/infer/src/checkers/codeQuery.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for code queries. *) diff --git a/infer/src/checkers/codeQueryAst.ml b/infer/src/checkers/codeQueryAst.ml index eb024af50..9f949b3bf 100644 --- a/infer/src/checkers/codeQueryAst.ml +++ b/infer/src/checkers/codeQueryAst.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Abstract synyax tree for code queries. *) diff --git a/infer/src/checkers/codequeryLexer.mll b/infer/src/checkers/codequeryLexer.mll index 10ef8f397..4d8ceb3d9 100644 --- a/infer/src/checkers/codequeryLexer.mll +++ b/infer/src/checkers/codequeryLexer.mll @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) { open CodequeryParser diff --git a/infer/src/checkers/constantPropagation.ml b/infer/src/checkers/constantPropagation.ml index 6e79fb03f..a7e6a93db 100644 --- a/infer/src/checkers/constantPropagation.ml +++ b/infer/src/checkers/constantPropagation.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils diff --git a/infer/src/checkers/constantPropagation.mli b/infer/src/checkers/constantPropagation.mli index d7ffee47e..e04681aff 100644 --- a/infer/src/checkers/constantPropagation.mli +++ b/infer/src/checkers/constantPropagation.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type const_map = Cfg.Node.t -> Sil.exp -> Sil.const option diff --git a/infer/src/checkers/dataflow.ml b/infer/src/checkers/dataflow.ml index 4b05e05a3..1974c31fd 100644 --- a/infer/src/checkers/dataflow.ml +++ b/infer/src/checkers/dataflow.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils diff --git a/infer/src/checkers/dataflow.mli b/infer/src/checkers/dataflow.mli index d9b30749d..b5b0f1e0d 100644 --- a/infer/src/checkers/dataflow.mli +++ b/infer/src/checkers/dataflow.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type throws = | DontKnow (** May or may not throw an exception. *) diff --git a/infer/src/checkers/eradicate.ml b/infer/src/checkers/eradicate.ml index f84b00b13..2f9d35ab7 100644 --- a/infer/src/checkers/eradicate.ml +++ b/infer/src/checkers/eradicate.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Eradicate NPEs. *) diff --git a/infer/src/checkers/eradicate.mli b/infer/src/checkers/eradicate.mli index 8f4a322a9..fe7f37cad 100644 --- a/infer/src/checkers/eradicate.mli +++ b/infer/src/checkers/eradicate.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Eradicate NPEs. *) @@ -22,9 +22,9 @@ type parameters = (Sil.exp * Sil.typ) list module type CallBackT = sig val callback : - TypeCheck.checks -> Procname.t list -> TypeCheck.get_proc_desc -> - Idenv.t -> Sil.tenv -> Procname.t -> - Cfg.Procdesc.t -> unit + TypeCheck.checks -> Procname.t list -> TypeCheck.get_proc_desc -> + Idenv.t -> Sil.tenv -> Procname.t -> + Cfg.Procdesc.t -> unit end (* CallBackT *) diff --git a/infer/src/checkers/eradicateChecks.ml b/infer/src/checkers/eradicateChecks.ml index 4dc6977a3..5153cc011 100644 --- a/infer/src/checkers/eradicateChecks.ml +++ b/infer/src/checkers/eradicateChecks.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * 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/idenv.ml b/infer/src/checkers/idenv.ml index c3c634deb..766e34a9f 100644 --- a/infer/src/checkers/idenv.ml +++ b/infer/src/checkers/idenv.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 f4f587090..5a9a6978a 100644 --- a/infer/src/checkers/idenv.mli +++ b/infer/src/checkers/idenv.mli @@ -1,14 +1,14 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Environment for temporary identifiers used in instructions. -Lazy implementation: only created when actually used. *) + Lazy implementation: only created when actually used. *) type t diff --git a/infer/src/checkers/immutableChecker.ml b/infer/src/checkers/immutableChecker.ml index cb04b5a21..e7d16c66d 100644 --- a/infer/src/checkers/immutableChecker.ml +++ b/infer/src/checkers/immutableChecker.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/checkers/immutableChecker.mli b/infer/src/checkers/immutableChecker.mli index 0deb4bcfd..5e3e04a63 100644 --- a/infer/src/checkers/immutableChecker.mli +++ b/infer/src/checkers/immutableChecker.mli @@ -1,10 +1,10 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) val callback_check_immutable_cast : Callbacks.proc_callback_t diff --git a/infer/src/checkers/models.ml b/infer/src/checkers/models.ml index c7a55ba44..fcda72616 100644 --- a/infer/src/checkers/models.ml +++ b/infer/src/checkers/models.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * 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/patternMatch.ml b/infer/src/checkers/patternMatch.ml index f310efd3c..de2fa7f84 100644 --- a/infer/src/checkers/patternMatch.ml +++ b/infer/src/checkers/patternMatch.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Pattern matching. *) diff --git a/infer/src/checkers/patternMatch.mli b/infer/src/checkers/patternMatch.mli index 88dbe12af..c5e64a99d 100644 --- a/infer/src/checkers/patternMatch.mli +++ b/infer/src/checkers/patternMatch.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Pattern matching. *) @@ -13,9 +13,9 @@ val get_java_field_access_signature : Sil.instr -> (string * string * string) option (** Returns the formal signature (class name, method name, -argument type names and return type name) *) + argument type names and return type name) *) val get_java_method_call_formal_signature : -Sil.instr -> (string * string * string list * string) option + Sil.instr -> (string * string * string list * string) option (** Get the this type of a procedure *) val get_this_type : Cfg.Procdesc.t -> Sil.typ option @@ -50,8 +50,8 @@ val java_proc_name_with_class_method : Procname.t -> string -> string -> bool (** [proc_calls get_proc_desc pn pd filter] returns the callees that satisfy [filter]. *) val proc_calls : (Procname.t -> Cfg.Procdesc.t option) -> Procname.t -> Cfg.Procdesc.t -> -(Procname.t -> Cfg.Procdesc.t -> bool) -> -(Procname.t * Cfg.Procdesc.t) list + (Procname.t -> Cfg.Procdesc.t -> bool) -> + (Procname.t * Cfg.Procdesc.t) list val type_get_annotation : Sil.typ -> Sil.item_annotation option diff --git a/infer/src/checkers/printfArgs.ml b/infer/src/checkers/printfArgs.ml index 9ee9dfacf..0db1e8c25 100644 --- a/infer/src/checkers/printfArgs.ml +++ b/infer/src/checkers/printfArgs.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/checkers/printfArgs.mli b/infer/src/checkers/printfArgs.mli index 53b8b1909..71c5b28fa 100644 --- a/infer/src/checkers/printfArgs.mli +++ b/infer/src/checkers/printfArgs.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type printf_signature = { diff --git a/infer/src/checkers/registerCheckers.ml b/infer/src/checkers/registerCheckers.ml index c3cee42e0..213885230 100644 --- a/infer/src/checkers/registerCheckers.ml +++ b/infer/src/checkers/registerCheckers.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for registering checkers. *) diff --git a/infer/src/checkers/repeatedCallsChecker.ml b/infer/src/checkers/repeatedCallsChecker.ml index d25c8e7a4..038e10686 100644 --- a/infer/src/checkers/repeatedCallsChecker.ml +++ b/infer/src/checkers/repeatedCallsChecker.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/checkers/repeatedCallsChecker.mli b/infer/src/checkers/repeatedCallsChecker.mli index bd8474756..e1c240c54 100644 --- a/infer/src/checkers/repeatedCallsChecker.mli +++ b/infer/src/checkers/repeatedCallsChecker.mli @@ -1,10 +1,10 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) val callback_check_repeated_calls : Callbacks.proc_callback_t diff --git a/infer/src/checkers/sqlChecker.ml b/infer/src/checkers/sqlChecker.ml index 0243f6cf1..92a74d7a6 100644 --- a/infer/src/checkers/sqlChecker.ml +++ b/infer/src/checkers/sqlChecker.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils diff --git a/infer/src/checkers/sqlChecker.mli b/infer/src/checkers/sqlChecker.mli index 2753b3f7e..dcfaa1785 100644 --- a/infer/src/checkers/sqlChecker.mli +++ b/infer/src/checkers/sqlChecker.mli @@ -1,10 +1,10 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) val callback_sql : Callbacks.proc_callback_t diff --git a/infer/src/checkers/typeAnnotation.ml b/infer/src/checkers/typeAnnotation.ml index 227f37f18..2ab210ba1 100644 --- a/infer/src/checkers/typeAnnotation.ml +++ b/infer/src/checkers/typeAnnotation.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/checkers/typeAnnotation.mli b/infer/src/checkers/typeAnnotation.mli index b15433113..560904871 100644 --- a/infer/src/checkers/typeAnnotation.mli +++ b/infer/src/checkers/typeAnnotation.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Nodule to represent annotations on types. *) diff --git a/infer/src/checkers/typeCheck.ml b/infer/src/checkers/typeCheck.ml index 8c1830ff9..004446511 100644 --- a/infer/src/checkers/typeCheck.ml +++ b/infer/src/checkers/typeCheck.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * 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/typeCheck.mli b/infer/src/checkers/typeCheck.mli index 54fefe7ab..df25f8522 100644 --- a/infer/src/checkers/typeCheck.mli +++ b/infer/src/checkers/typeCheck.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module type for the type checking functions. *) @@ -25,8 +25,8 @@ type checks = } val typecheck_node : -'a TypeState.ext -> -bool ref -> checks -> Idenv.t -> -get_proc_desc -> Procname.t -> Cfg.Procdesc.t -> -find_canonical_duplicate -> Annotations.annotated_signature -> 'a TypeState.t -> -Cfg.Node.t -> Printer.LineReader.t -> 'a TypeState.t list * 'a TypeState.t list + 'a TypeState.ext -> + bool ref -> checks -> Idenv.t -> + get_proc_desc -> Procname.t -> Cfg.Procdesc.t -> + find_canonical_duplicate -> Annotations.annotated_signature -> 'a TypeState.t -> + Cfg.Node.t -> Printer.LineReader.t -> 'a TypeState.t list * 'a TypeState.t list diff --git a/infer/src/checkers/typeErr.ml b/infer/src/checkers/typeErr.ml index b62edfc27..9c0fee4e1 100644 --- a/infer/src/checkers/typeErr.ml +++ b/infer/src/checkers/typeErr.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module P = Printf diff --git a/infer/src/checkers/typeErr.mli b/infer/src/checkers/typeErr.mli index 47a7ed399..679d7bf7a 100644 --- a/infer/src/checkers/typeErr.mli +++ b/infer/src/checkers/typeErr.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for Type Error messages. *) @@ -55,7 +55,7 @@ type err_instance = | Field_over_annotated of Ident.fieldname * Procname.t | Null_field_access of string option * Ident.fieldname * origin_descr * bool | Call_receiver_annotation_inconsistent - of Annotations.annotation * string option * Procname.t * origin_descr + of Annotations.annotation * string option * Procname.t * origin_descr | Parameter_annotation_inconsistent of parameter_not_nullable | Return_annotation_inconsistent of Annotations.annotation * Procname.t * origin_descr | Return_over_annotated of Procname.t @@ -77,10 +77,10 @@ type st_report_error = unit val report_error : -st_report_error -> -(Cfg.Node.t -> Cfg.Node.t) -> Cfg.Node.t -> -err_instance -> InstrRef.t option -> Sil.location -> -Procname.t -> unit + st_report_error -> + (Cfg.Node.t -> Cfg.Node.t) -> Cfg.Node.t -> + err_instance -> InstrRef.t option -> Sil.location -> + Procname.t -> unit val report_forall_checks_and_reset : st_report_error -> Procname.t -> unit diff --git a/infer/src/checkers/typeOrigin.ml b/infer/src/checkers/typeOrigin.ml index bd2ae6516..f24bd9ae7 100644 --- a/infer/src/checkers/typeOrigin.ml +++ b/infer/src/checkers/typeOrigin.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module P = Printf diff --git a/infer/src/checkers/typeOrigin.mli b/infer/src/checkers/typeOrigin.mli index 76bc40fd8..b15924b9c 100644 --- a/infer/src/checkers/typeOrigin.mli +++ b/infer/src/checkers/typeOrigin.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type proc_origin = (** Case Proc *) diff --git a/infer/src/checkers/typeState.ml b/infer/src/checkers/typeState.ml index f79fde4a7..0615fdbea 100644 --- a/infer/src/checkers/typeState.ml +++ b/infer/src/checkers/typeState.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/checkers/typeState.mli b/infer/src/checkers/typeState.mli index 4b259a704..aa6685d76 100644 --- a/infer/src/checkers/typeState.mli +++ b/infer/src/checkers/typeState.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for typestates: maps from expressions to annotated types, with extensions. *) @@ -19,8 +19,8 @@ type 'a ext = { empty : 'a; (** empty extension *) check_instr : (** check the extension for an instruction *) - get_proc_desc -> Procname.t -> Cfg.Procdesc.t -> Cfg.Node.t - ->'a -> Sil.instr -> parameters -> 'a; + get_proc_desc -> Procname.t -> Cfg.Procdesc.t -> Cfg.Node.t + ->'a -> Sil.instr -> parameters -> 'a; join : 'a -> 'a -> 'a; (** join two extensions *) pp : Format.formatter -> 'a -> unit (** pretty print an extension *) } diff --git a/infer/src/clang/ast_expressions.ml b/infer/src/clang/ast_expressions.ml index e4b7a2252..5938de9e7 100644 --- a/infer/src/clang/ast_expressions.ml +++ b/infer/src/clang/ast_expressions.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Clang_ast_t open CFrontend_utils diff --git a/infer/src/clang/ast_expressions.mli b/infer/src/clang/ast_expressions.mli index 2375af805..eede81d66 100644 --- a/infer/src/clang/ast_expressions.mli +++ b/infer/src/clang/ast_expressions.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Clang_ast_t diff --git a/infer/src/clang/ast_lexer.mll b/infer/src/clang/ast_lexer.mll index 9dd17705a..bd659fdb5 100644 --- a/infer/src/clang/ast_lexer.mll +++ b/infer/src/clang/ast_lexer.mll @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (* Lexer to support a parser of types *) { diff --git a/infer/src/clang/cArithmetic_trans.ml b/infer/src/clang/cArithmetic_trans.ml index 08b7dae77..c3fd62c6e 100644 --- a/infer/src/clang/cArithmetic_trans.ml +++ b/infer/src/clang/cArithmetic_trans.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility module for translating unary and binary operations and compound assignments *) diff --git a/infer/src/clang/cArithmetic_trans.mli b/infer/src/clang/cArithmetic_trans.mli index 610aa2658..3709b6ba8 100644 --- a/infer/src/clang/cArithmetic_trans.mli +++ b/infer/src/clang/cArithmetic_trans.mli @@ -1,24 +1,24 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility module for translating unary and binary operations and compound assignments *) val bin_op_to_string : Clang_ast_t.binary_operator_info -> string val binary_operation_instruction : CContext.t -> Clang_ast_t.binary_operator_info -> Sil.exp -> Sil.typ -> Sil.exp -> -Sil.location -> bool -> Sil.exp * Sil.instr list * Ident.t list + Sil.location -> bool -> Sil.exp * Sil.instr list * Ident.t list val unary_operation_instruction : Clang_ast_t.unary_operator_info -> Sil.exp -> Sil.typ -> Sil.location -> -Ident.t list * Sil.exp * Sil.instr list + Ident.t list * Sil.exp * Sil.instr list val compound_assignment_binary_operation_instruction : Clang_ast_t.binary_operator_info -> Sil.exp -> -Sil.typ -> Sil.exp -> Sil.location -> Ident.t list * Sil.exp * Sil.instr list + Sil.typ -> Sil.exp -> Sil.location -> Ident.t list * Sil.exp * Sil.instr list val assignment_arc_mode : CContext.t -> Sil.exp -> Sil.typ -> Sil.exp -> Sil.location -> bool -> bool -> Sil.exp * Sil.instr list * Ident.t list diff --git a/infer/src/clang/cAstProcessor.ml b/infer/src/clang/cAstProcessor.ml index 6768072de..596e7cbea 100644 --- a/infer/src/clang/cAstProcessor.ml +++ b/infer/src/clang/cAstProcessor.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module to preprocess location information in the AST. The original location information is incremental, each location is a delta diff --git a/infer/src/clang/cAstProcessor.mli b/infer/src/clang/cAstProcessor.mli index 7f04e7e8a..eb6c7af0c 100644 --- a/infer/src/clang/cAstProcessor.mli +++ b/infer/src/clang/cAstProcessor.mli @@ -1,15 +1,15 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module to preprocess location information in the AST. -The original location information is incremental, each location is a delta -w.r.t. the previous one. This module processes the AST and makes locations explicit. *) + The original location information is incremental, each location is a delta + w.r.t. the previous one. This module processes the AST and makes locations explicit. *) (** Pretty print an AST. *) val pp_ast_decl : Format.formatter -> Clang_ast_j.decl -> unit diff --git a/infer/src/clang/cContext.ml b/infer/src/clang/cContext.ml index ac4f2dfd4..1dff56eea 100644 --- a/infer/src/clang/cContext.ml +++ b/infer/src/clang/cContext.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 be47bec86..e5d130e34 100644 --- a/infer/src/clang/cContext.mli +++ b/infer/src/clang/cContext.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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. *) @@ -73,7 +73,7 @@ val is_objc_method : t -> bool val get_tenv : t -> Sil.tenv val create_context : Sil.tenv -> Cg.t -> Cfg.cfg -> Cfg.Procdesc.t -> -string option -> curr_class -> bool -> (Mangled.t * Sil.typ * bool) list -> bool -> t + string option -> curr_class -> bool -> (Mangled.t * Sil.typ * bool) list -> bool -> t val create_curr_class : Sil.tenv -> string -> curr_class diff --git a/infer/src/clang/cEnum_decl.ml b/infer/src/clang/cEnum_decl.ml index cced6090a..0aca82afc 100644 --- a/infer/src/clang/cEnum_decl.ml +++ b/infer/src/clang/cEnum_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 a156a64da..fe8a24795 100644 --- a/infer/src/clang/cEnum_decl.mli +++ b/infer/src/clang/cEnum_decl.mli @@ -1,14 +1,14 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Translate an enumeration declaration by adding it to the tenv and *) (** translating the code and adding it to a fake procdesc *) val enum_decl : string -> Sil.tenv -> Cfg.cfg -> Cg.t -> string option -> -Clang_ast_t.decl list -> Clang_ast_t.opt_type -> unit + Clang_ast_t.decl list -> Clang_ast_t.opt_type -> unit diff --git a/infer/src/clang/cField_decl.ml b/infer/src/clang/cField_decl.ml index 8cd26f24f..26eb2d898 100644 --- a/infer/src/clang/cField_decl.ml +++ b/infer/src/clang/cField_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility module to retrieve fields of structs of classes *) diff --git a/infer/src/clang/cField_decl.mli b/infer/src/clang/cField_decl.mli index 2d4e1b857..f534b2b0e 100644 --- a/infer/src/clang/cField_decl.mli +++ b/infer/src/clang/cField_decl.mli @@ -1,17 +1,17 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility module to retrieve fields of structs of classes *) val fields_superclass : Sil.tenv -> Clang_ast_t.obj_c_interface_decl_info -> -(Ident.fieldname * Sil.typ * Sil.item_annotation) list + (Ident.fieldname * Sil.typ * Sil.item_annotation) list type field_type = Ident.fieldname * Sil.typ * (Sil.annotation * bool) list @@ -20,6 +20,6 @@ val get_fields : Sil.tenv -> CContext.curr_class -> Clang_ast_t.decl list -> fie val fields_superclass : Sil.tenv -> Clang_ast_t.obj_c_interface_decl_info -> field_type list val build_sil_field_property : CContext.curr_class -> Sil.tenv -> string -> Clang_ast_t.qual_type -> - Clang_ast_t.property_attribute list option -> field_type + Clang_ast_t.property_attribute list option -> field_type val add_missing_fields : Sil.tenv -> string -> field_type list -> unit diff --git a/infer/src/clang/cFrontend.ml b/infer/src/clang/cFrontend.ml index 617680d82..5f9a792b2 100644 --- a/infer/src/clang/cFrontend.ml +++ b/infer/src/clang/cFrontend.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 *) diff --git a/infer/src/clang/cFrontend.mli b/infer/src/clang/cFrontend.mli index 01a46fbbb..ce1c3076b 100644 --- a/infer/src/clang/cFrontend.mli +++ b/infer/src/clang/cFrontend.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 *) diff --git a/infer/src/clang/cFrontend_config.ml b/infer/src/clang/cFrontend_config.ml index 96a7c1812..ea7f6e3af 100644 --- a/infer/src/clang/cFrontend_config.ml +++ b/infer/src/clang/cFrontend_config.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module that contains constants and variables used in the frontend *) diff --git a/infer/src/clang/cFrontend_config.mli b/infer/src/clang/cFrontend_config.mli index 05ff8e8de..748a1d025 100644 --- a/infer/src/clang/cFrontend_config.mli +++ b/infer/src/clang/cFrontend_config.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module that contains constants and variables used in the frontend *) diff --git a/infer/src/clang/cFrontend_utils.ml b/infer/src/clang/cFrontend_utils.ml index 4fd3ceff7..67e29cba9 100644 --- a/infer/src/clang/cFrontend_utils.ml +++ b/infer/src/clang/cFrontend_utils.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 76643194f..d2b7bd025 100644 --- a/infer/src/clang/cFrontend_utils.mli +++ b/infer/src/clang/cFrontend_utils.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 *) @@ -72,7 +72,7 @@ sig val get_invalid_pointer : unit -> string val type_from_unary_expr_or_type_trait_expr_info : - Clang_ast_t.unary_expr_or_type_trait_expr_info -> Clang_ast_t.qual_type option + Clang_ast_t.unary_expr_or_type_trait_expr_info -> Clang_ast_t.qual_type option val is_generated : Clang_ast_t.named_decl_info -> bool @@ -83,7 +83,7 @@ sig val string_from_list : string list -> string val append_no_duplicates_fields : (Ident.fieldname * Sil.typ * Sil.item_annotation) list -> - (Ident.fieldname * Sil.typ * Sil.item_annotation) list -> (Ident.fieldname * Sil.typ * Sil.item_annotation) list + (Ident.fieldname * Sil.typ * Sil.item_annotation) list -> (Ident.fieldname * Sil.typ * Sil.item_annotation) list val append_no_duplicates_csu : (Sil.csu * Mangled.t) list -> (Sil.csu * Mangled.t) list -> (Sil.csu * Mangled.t) list @@ -96,7 +96,7 @@ sig val sort_fields : (Ident.fieldname * Sil.typ * Sil.item_annotation) list -> (Ident.fieldname * Sil.typ * Sil.item_annotation) list val collect_list_tuples : ('a list * 'b list * 'c list * 'd list * 'e list) list -> - 'a list * 'b list * 'c list * 'd list * 'e list -> 'a list * 'b list * 'c list * 'd list * 'e list + 'a list * 'b list * 'c list * 'd list * 'e list -> 'a list * 'b list * 'c list * 'd list * 'e list val swap_elements_list : 'a list -> 'a list diff --git a/infer/src/clang/cGen_trans.ml b/infer/src/clang/cGen_trans.ml index 93ea23be5..9b00b887e 100644 --- a/infer/src/clang/cGen_trans.ml +++ b/infer/src/clang/cGen_trans.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module rec CTransImpl : CTrans.CTrans = CTrans.CTrans_funct(CMethod_declImpl) diff --git a/infer/src/clang/cGlobal_vars.ml b/infer/src/clang/cGlobal_vars.ml index 89a8d6620..adff48cde 100644 --- a/infer/src/clang/cGlobal_vars.ml +++ b/infer/src/clang/cGlobal_vars.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open CFrontend_utils module L = Logging diff --git a/infer/src/clang/cGlobal_vars.mli b/infer/src/clang/cGlobal_vars.mli index cb092e2b3..ecaa09e48 100644 --- a/infer/src/clang/cGlobal_vars.mli +++ b/infer/src/clang/cGlobal_vars.mli @@ -1,22 +1,22 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type t val add : string -> Sil.typ -> unit - + val find : Mangled.t -> t val reset_map : unit -> unit - + val var_get_name : t -> Sil.pvar - + val var_get_typ : t -> Sil.typ val print_map : unit -> unit diff --git a/infer/src/clang/cLocation.ml b/infer/src/clang/cLocation.ml index 92b06179e..8100be44d 100644 --- a/infer/src/clang/cLocation.ml +++ b/infer/src/clang/cLocation.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for function to retrieve the location (file, line, etc) of instructions *) diff --git a/infer/src/clang/cLocation.mli b/infer/src/clang/cLocation.mli index ed5e3ad5e..a6f979c66 100644 --- a/infer/src/clang/cLocation.mli +++ b/infer/src/clang/cLocation.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for function to retrieve the location (file, line, etc) of instructions *) @@ -18,7 +18,7 @@ val current_source_file : DB.source_file ref val curr_file : DB.source_file ref val clang_to_sil_location : Clang_ast_t.source_location -> int -> Cfg.Procdesc.t option -> -Sil.location + Sil.location val get_sil_location : Clang_ast_t.stmt_info -> int -> CContext.t -> Sil.location diff --git a/infer/src/clang/cMain.ml b/infer/src/clang/cMain.ml index 6d34f2175..8cc3d16c8 100644 --- a/infer/src/clang/cMain.ml +++ b/infer/src/clang/cMain.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (* 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. diff --git a/infer/src/clang/cMain.mli b/infer/src/clang/cMain.mli index aae7cd700..b20b53fce 100644 --- a/infer/src/clang/cMain.mli +++ b/infer/src/clang/cMain.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Main module of InferClang. Take as input AST files produced by clang during compilation *) (** and their corresponding C/C++/ObjectiveC source files. *) diff --git a/infer/src/clang/cMethod_decl.ml b/infer/src/clang/cMethod_decl.ml index e5c4b3c9b..d054ce4c7 100644 --- a/infer/src/clang/cMethod_decl.ml +++ b/infer/src/clang/cMethod_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Process methods or functions declarations by adding them to the cfg. *) diff --git a/infer/src/clang/cMethod_decl.mli b/infer/src/clang/cMethod_decl.mli index c9425d629..8076fc6d9 100644 --- a/infer/src/clang/cMethod_decl.mli +++ b/infer/src/clang/cMethod_decl.mli @@ -1,23 +1,23 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Process methods or functions declarations by adding them to the cfg. *) module CMethod_decl_funct(T: CModule_type.CTranslation) : sig val process_methods : Sil.tenv -> Cg.t -> Cfg.cfg -> CContext.curr_class -> string option -> - Clang_ast_t.decl list -> unit + Clang_ast_t.decl list -> unit val function_decl : Sil.tenv -> Cfg.cfg -> Cg.t -> string option -> bool -> Clang_ast_t.decl_info -> - string -> Clang_ast_t.qual_type -> Clang_ast_t.function_decl_info -> (Mangled.t * Sil.typ * bool) list -> Procname.t option -> CContext.curr_class -> unit + string -> Clang_ast_t.qual_type -> Clang_ast_t.function_decl_info -> (Mangled.t * Sil.typ * bool) list -> Procname.t option -> CContext.curr_class -> unit val create_function_signature : Clang_ast_t.decl_info -> Clang_ast_t.function_decl_info -> string -> - Clang_ast_t.qual_type -> bool -> Procname.t option -> Clang_ast_t.stmt option * CMethod_signature.method_signature + Clang_ast_t.qual_type -> bool -> Procname.t option -> Clang_ast_t.stmt option * CMethod_signature.method_signature val process_getter_setter : CContext.t -> Procname.t -> bool @@ -25,13 +25,13 @@ end module type CMethod_decl = sig val process_methods : Sil.tenv -> Cg.t -> Cfg.cfg -> CContext.curr_class -> string option -> - Clang_ast_t.decl list -> unit + Clang_ast_t.decl list -> unit val function_decl : Sil.tenv -> Cfg.cfg -> Cg.t -> string option -> bool -> Clang_ast_t.decl_info -> - string -> Clang_ast_t.qual_type -> Clang_ast_t.function_decl_info -> (Mangled.t * Sil.typ * bool) list -> Procname.t option -> CContext.curr_class -> unit + string -> Clang_ast_t.qual_type -> Clang_ast_t.function_decl_info -> (Mangled.t * Sil.typ * bool) list -> Procname.t option -> CContext.curr_class -> unit val create_function_signature : Clang_ast_t.decl_info -> Clang_ast_t.function_decl_info -> string -> - Clang_ast_t.qual_type -> bool -> Procname.t option -> Clang_ast_t.stmt option * CMethod_signature.method_signature + Clang_ast_t.qual_type -> bool -> Procname.t option -> Clang_ast_t.stmt option * CMethod_signature.method_signature val process_getter_setter : CContext.t -> Procname.t -> bool end diff --git a/infer/src/clang/cMethod_signature.ml b/infer/src/clang/cMethod_signature.ml index df69c16cd..4cd7a0c58 100644 --- a/infer/src/clang/cMethod_signature.ml +++ b/infer/src/clang/cMethod_signature.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 7e42ee66a..ffda15dbb 100644 --- a/infer/src/clang/cMethod_signature.mli +++ b/infer/src/clang/cMethod_signature.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Define the signature of a method consisting of its name, its arguments, *) (** return type, location and whether its an instance method. *) @@ -31,7 +31,7 @@ val ms_get_loc : method_signature -> Clang_ast_t.source_range val ms_is_instance : method_signature -> bool val make_ms : Procname.t -> (string * string * Clang_ast_t.stmt option) list -> string -> Clang_ast_t.attribute list -> -Clang_ast_t.source_range -> bool -> bool -> method_signature + Clang_ast_t.source_range -> bool -> bool -> method_signature val replace_name_ms : method_signature -> Procname.t -> method_signature diff --git a/infer/src/clang/cMethod_trans.ml b/infer/src/clang/cMethod_trans.ml index 2fa2d8686..356bc83e8 100644 --- a/infer/src/clang/cMethod_trans.ml +++ b/infer/src/clang/cMethod_trans.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 738bca2b1..5d0e3425a 100644 --- a/infer/src/clang/cMethod_trans.mli +++ b/infer/src/clang/cMethod_trans.mli @@ -1,14 +1,14 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Methods for creating a procdesc from a method or function declaration -and for resolving a method call and finding the right callee *) + and for resolving a method call and finding the right callee *) (** When the methoc call is MCStatic, means that it is a class method. *) (** When it is MCVirtual, it means that it is an instance method and that *) @@ -21,7 +21,7 @@ type method_call_type = | MCStatic val create_local_procdesc : Cfg.cfg -> Sil.tenv -> CMethod_signature.method_signature -> -Clang_ast_t.stmt list -> (Mangled.t * Sil.typ * bool) list -> bool -> bool + Clang_ast_t.stmt list -> (Mangled.t * Sil.typ * bool) list -> bool -> bool val create_external_procdesc : Cfg.cfg -> Procname.t -> bool -> (Sil.typ * Sil.typ list) option -> unit @@ -32,7 +32,7 @@ val mk_procname_from_method : string -> string -> Procname.t val mk_procname_from_function : string -> string -> Procname.t val get_class_selector_instance : CContext.t -> Clang_ast_t.obj_c_message_expr_info -> (Sil.exp * Sil.typ) list --> (string * string * method_call_type) + -> (string * string * method_call_type) val resolve_method : Sil.tenv -> string -> string -> CMethod_signature.method_signature option diff --git a/infer/src/clang/cModule_type.ml b/infer/src/clang/cModule_type.ml index 63daf7f58..acee9f41c 100644 --- a/infer/src/clang/cModule_type.ml +++ b/infer/src/clang/cModule_type.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module type CTranslation = sig diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index d6fde6ca5..b4318b1d5 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Translates instructions: (statements and expressions) from the ast into sil *) diff --git a/infer/src/clang/cTrans.mli b/infer/src/clang/cTrans.mli index 7ce3660f0..8c29a8d84 100644 --- a/infer/src/clang/cTrans.mli +++ b/infer/src/clang/cTrans.mli @@ -1,17 +1,17 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module type CTrans = sig -(** Translates instructions: (statements and expressions) from the ast into sil *) + (** Translates instructions: (statements and expressions) from the ast into sil *) -(** It receives the context, a list of statements and the exit node and it returns a list of cfg nodes *) -(** that reporesent the translation of the stmts into sil. *) + (** It receives the context, a list of statements and the exit node and it returns a list of cfg nodes *) + (** that reporesent the translation of the stmts into sil. *) val instructions_trans : CContext.t -> Clang_ast_t.stmt list -> Cfg.Node.t -> Cfg.Node.t list (** It receives the context and a statement and a warning string and returns the translated sil expression *) diff --git a/infer/src/clang/cTrans_models.ml b/infer/src/clang/cTrans_models.ml index 4438e65a0..d848c25f7 100644 --- a/infer/src/clang/cTrans_models.ml +++ b/infer/src/clang/cTrans_models.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils open CFrontend_utils diff --git a/infer/src/clang/cTrans_models.mli b/infer/src/clang/cTrans_models.mli index 7583a4aad..856951152 100644 --- a/infer/src/clang/cTrans_models.mli +++ b/infer/src/clang/cTrans_models.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) val is_cf_non_null_alloc : Procname.t option -> bool diff --git a/infer/src/clang/cTrans_utils.ml b/infer/src/clang/cTrans_utils.ml index c95868d3f..c70306086 100644 --- a/infer/src/clang/cTrans_utils.ml +++ b/infer/src/clang/cTrans_utils.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility methods to support the translation of clang ast constructs into sil instructions. *) diff --git a/infer/src/clang/cTrans_utils.mli b/infer/src/clang/cTrans_utils.mli index fdeff1061..5f7ef58be 100644 --- a/infer/src/clang/cTrans_utils.mli +++ b/infer/src/clang/cTrans_utils.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility methods to support the translation of clang ast constructs into sil instructions. *) @@ -57,14 +57,14 @@ val fix_param_exps_mismatch : 'a list -> (Sil.exp * Sil.typ) list -> (Sil.exp * val get_selector_receiver : Clang_ast_t.obj_c_message_expr_info -> string * Clang_ast_t.receiver_kind val define_condition_side_effects : CContext.t -> (Sil.exp * Sil.typ) list -> Sil.instr list -> Sil.location -> -(Sil.exp * Sil.typ) list * Sil.instr list + (Sil.exp * Sil.typ) list * Sil.instr list val extract_stmt_from_singleton : Clang_ast_t.stmt list -> string -> Clang_ast_t.stmt val is_null_stmt : Clang_ast_t.stmt -> bool val compute_instr_ids_exp_to_parent : Clang_ast_t.stmt_info -> Sil.instr list -> Ident.t list -> (Sil.exp * Sil.typ) list -> -Sil.exp -> Sil.typ -> Sil.location -> priority_node -> Sil.instr list * Ident.t list * (Sil.exp * Sil.typ) list + Sil.exp -> Sil.typ -> Sil.location -> priority_node -> Sil.instr list * Ident.t list * (Sil.exp * Sil.typ) list val get_name_decl_ref_exp_info : Clang_ast_t.decl_ref_expr_info -> Clang_ast_t.stmt_info -> string @@ -77,7 +77,7 @@ val is_member_exp : Clang_ast_t.stmt -> bool val get_type_from_exp_stmt : Clang_ast_t.stmt -> Clang_ast_t.qual_type val cast_operation : CContext.t -> Clang_ast_t.cast_kind -> (Sil.exp * Sil.typ) list -> Sil.typ -> Sil.location -> -bool -> Ident.t list * Sil.instr list * Sil.exp + bool -> Ident.t list * Sil.instr list * Sil.exp val trans_assertion_failure : Sil.location -> CContext.t -> trans_result @@ -94,14 +94,14 @@ val contains_opaque_value_expr : Clang_ast_t.stmt -> bool val get_decl_ref_info : Clang_ast_t.stmt -> int -> string * int val builtin_trans : trans_state -> Sil.location -> Clang_ast_t.stmt_info -> -Sil.typ -> Procname.t option -> trans_result option + Sil.typ -> Procname.t option -> trans_result option val alloc_trans : trans_state -> Sil.location -> Clang_ast_t.stmt_info -> Sil.typ -> bool -> trans_result val new_or_alloc_trans : trans_state -> Sil.location -> Clang_ast_t.stmt_info -> string -> string -> trans_result val cast_trans : CContext.t -> (Sil.exp * Sil.typ) list -> Sil.location -> Procname.t option -> Sil.typ -> -(Ident.t * Sil.instr * Sil.exp) option + (Ident.t * Sil.instr * Sil.exp) option (** Module for creating cfg nodes and other utility functions related to them. *) module Nodes : @@ -111,12 +111,12 @@ sig val need_unary_op_node : Clang_ast_t.unary_operator_info -> bool val create_node : Cfg.Node.nodekind -> Ident.t list -> Sil.instr list -> - Sil.location -> CContext.t -> Cfg.Node.t + Sil.location -> CContext.t -> Cfg.Node.t val is_join_node : Cfg.Node.t -> bool val create_prune_node : bool -> (Sil.exp * Sil.typ) list -> Ident.t list -> Sil.instr list -> Sil.location -> Sil.if_kind -> - CContext.t -> Cfg.Node.t + CContext.t -> Cfg.Node.t val is_prune_node : Cfg.Node.t -> bool @@ -190,7 +190,7 @@ sig exception SelfClassException of string val add_self_parameter_for_super_instance : CContext.t -> Procname.t -> Sil.location -> Clang_ast_t.obj_c_message_expr_info -> - trans_result -> trans_result + trans_result -> trans_result val is_var_self : Sil.pvar -> bool -> bool end diff --git a/infer/src/clang/cTypes.ml b/infer/src/clang/cTypes.ml index e8b551d91..901d8b11a 100644 --- a/infer/src/clang/cTypes.ml +++ b/infer/src/clang/cTypes.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility module for retrieving types *) diff --git a/infer/src/clang/cTypes.mli b/infer/src/clang/cTypes.mli index 2f0551fbe..46f5e23dd 100644 --- a/infer/src/clang/cTypes.mli +++ b/infer/src/clang/cTypes.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Utility module for retrieving types *) diff --git a/infer/src/clang/cTypes_decl.ml b/infer/src/clang/cTypes_decl.ml index aded4bd96..733ee1a80 100644 --- a/infer/src/clang/cTypes_decl.ml +++ b/infer/src/clang/cTypes_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Processes types and record declarations by adding them to the tenv *) diff --git a/infer/src/clang/cTypes_decl.mli b/infer/src/clang/cTypes_decl.mli index 26766da88..bdd592a15 100644 --- a/infer/src/clang/cTypes_decl.mli +++ b/infer/src/clang/cTypes_decl.mli @@ -1,26 +1,26 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Processes types and record declarations by adding them to the tenv *) val get_declaration_type : Sil.tenv -> string option -> Clang_ast_t.decl_info -> string -> -Clang_ast_t.opt_type -> Clang_ast_t.decl list -> Clang_ast_t.decl_context_info -> -Clang_ast_t.record_decl_info -> Sil.typ + Clang_ast_t.opt_type -> Clang_ast_t.decl list -> Clang_ast_t.decl_context_info -> + Clang_ast_t.record_decl_info -> Sil.typ val add_struct_to_tenv : Sil.tenv -> Sil.typ -> unit val do_typedef_declaration : Sil.tenv -> string option -> Clang_ast_t.decl_info -> string -> -Clang_ast_t.opt_type -> Clang_ast_t.typedef_decl_info -> unit + Clang_ast_t.opt_type -> Clang_ast_t.typedef_decl_info -> unit val do_record_declaration : Sil.tenv -> string option -> Clang_ast_t.decl_info -> string -> -Clang_ast_t.opt_type -> Clang_ast_t.decl list -> Clang_ast_t.decl_context_info -> -Clang_ast_t.record_decl_info -> unit + Clang_ast_t.opt_type -> Clang_ast_t.decl list -> Clang_ast_t.decl_context_info -> + Clang_ast_t.record_decl_info -> unit val parse_func_type : string -> string -> (Sil.typ * Sil.typ list) option diff --git a/infer/src/clang/cVar_decl.ml b/infer/src/clang/cVar_decl.ml index 221a05e87..c165855ac 100644 --- a/infer/src/clang/cVar_decl.ml +++ b/infer/src/clang/cVar_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 c3c27bd59..90831f2c9 100644 --- a/infer/src/clang/cVar_decl.mli +++ b/infer/src/clang/cVar_decl.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 *) @@ -13,5 +13,5 @@ val get_fun_locals : CContext.t -> Clang_ast_t.stmt list -> unit val global_var_decl : Sil.tenv -> string option -> Clang_ast_t.decl_info -> string -> -Clang_ast_t.qual_type -> unit + Clang_ast_t.qual_type -> unit diff --git a/infer/src/clang/objcCategory_decl.ml b/infer/src/clang/objcCategory_decl.ml index 0d206b6c4..a61ca8142 100644 --- a/infer/src/clang/objcCategory_decl.ml +++ b/infer/src/clang/objcCategory_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils open CFrontend_utils diff --git a/infer/src/clang/objcCategory_decl.mli b/infer/src/clang/objcCategory_decl.mli index f4fa2a483..3fa53282f 100644 --- a/infer/src/clang/objcCategory_decl.mli +++ b/infer/src/clang/objcCategory_decl.mli @@ -1,17 +1,17 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 *) val category_decl : Sil.tenv -> string -> Clang_ast_t.obj_c_category_decl_info -> Clang_ast_t.decl list --> CContext.curr_class + -> CContext.curr_class val category_impl_decl : Sil.tenv -> string -> Clang_ast_t.decl_info -> -Clang_ast_t.obj_c_category_impl_decl_info -> Clang_ast_t.decl list -> CContext.curr_class + Clang_ast_t.obj_c_category_impl_decl_info -> Clang_ast_t.decl list -> CContext.curr_class diff --git a/infer/src/clang/objcInterface_decl.ml b/infer/src/clang/objcInterface_decl.ml index 05a9b0b05..d8b1a05f5 100644 --- a/infer/src/clang/objcInterface_decl.ml +++ b/infer/src/clang/objcInterface_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 *) diff --git a/infer/src/clang/objcInterface_decl.mli b/infer/src/clang/objcInterface_decl.mli index 8381c9d76..6dde20ed6 100644 --- a/infer/src/clang/objcInterface_decl.mli +++ b/infer/src/clang/objcInterface_decl.mli @@ -1,21 +1,21 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 *) val interface_declaration : Sil.tenv -> string -> Clang_ast_t.decl list -> -Clang_ast_t.obj_c_interface_decl_info -> CContext.curr_class + Clang_ast_t.obj_c_interface_decl_info -> CContext.curr_class val find_field : Sil.tenv -> string -> Sil.typ option -> bool -> -(Ident.fieldname * Sil.typ * Sil.item_annotation) option + (Ident.fieldname * Sil.typ * Sil.item_annotation) option val interface_impl_declaration : Sil.tenv -> string -> Clang_ast_t.decl list -> Clang_ast_t.obj_c_implementation_decl_info -> CContext.curr_class diff --git a/infer/src/clang/objcProperty_decl.ml b/infer/src/clang/objcProperty_decl.ml index 37a355ef4..f675289c4 100644 --- a/infer/src/clang/objcProperty_decl.ml +++ b/infer/src/clang/objcProperty_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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/objcProperty_decl.mli b/infer/src/clang/objcProperty_decl.mli index d791da022..e16981aba 100644 --- a/infer/src/clang/objcProperty_decl.mli +++ b/infer/src/clang/objcProperty_decl.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type prop_getter_setter = string * (Clang_ast_t.decl * bool) option @@ -13,7 +13,7 @@ type prop_getter_setter = string * (Clang_ast_t.decl * bool) option (** A property type is a tuple: *) (** (qual_type, property attributes, decl_info, (getter_name, getter), (setter_name, setter), ivar name ) *) type property_type = Clang_ast_t.qual_type * Clang_ast_t.property_attribute list * - Clang_ast_t.decl_info * prop_getter_setter * prop_getter_setter * string option + Clang_ast_t.decl_info * prop_getter_setter * prop_getter_setter * string option module type PropertySig = sig @@ -35,7 +35,7 @@ sig val replace_property : property_key -> property_type -> unit val add_property : property_key -> Clang_ast_t.qual_type -> - Clang_ast_t.property_attribute list -> Clang_ast_t.decl_info -> unit + Clang_ast_t.property_attribute list -> Clang_ast_t.decl_info -> unit val print_property_table : unit -> unit @@ -49,7 +49,7 @@ module Property: PropertySig (** or in the case of dynamic. *) val prepare_dynamic_property : CContext.curr_class -> Clang_ast_t.decl_info -> -Clang_ast_t.obj_c_property_impl_decl_info -> Clang_ast_t.decl list + Clang_ast_t.obj_c_property_impl_decl_info -> Clang_ast_t.decl list val get_methods : CContext.curr_class -> Clang_ast_t.decl list -> Procname.t list diff --git a/infer/src/clang/objcProtocol_decl.ml b/infer/src/clang/objcProtocol_decl.ml index 0805a41e9..40e3ab2f4 100644 --- a/infer/src/clang/objcProtocol_decl.ml +++ b/infer/src/clang/objcProtocol_decl.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils open CFrontend_utils diff --git a/infer/src/clang/objcProtocol_decl.mli b/infer/src/clang/objcProtocol_decl.mli index 78c9ecc5c..679469d13 100644 --- a/infer/src/clang/objcProtocol_decl.mli +++ b/infer/src/clang/objcProtocol_decl.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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/harness/androidFramework.ml b/infer/src/harness/androidFramework.ml index 25cf267be..e49e5d4fe 100644 --- a/infer/src/harness/androidFramework.ml +++ b/infer/src/harness/androidFramework.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/harness/androidFramework.mli b/infer/src/harness/androidFramework.mli index 647851d7a..48f060b3b 100644 --- a/infer/src/harness/androidFramework.mli +++ b/infer/src/harness/androidFramework.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Android lifecycle types and their lifecycle methods that are called by the framework *) @@ -24,14 +24,14 @@ val is_callback_class : Sil.typ -> Sil.tenv -> bool val is_destroy_method : Procname.t -> bool (** returns an option containing the var name and type of a callback registered by [procname], None -if no callback is registered *) + if no callback is registered *) val get_callback_registered_by : Procname.t -> (Sil.exp * Sil.typ) list -> Sil.tenv -> (Sil.exp * Sil.typ) option (** return a list of typ's corresponding to callback classes registered by [procdesc] *) val get_callbacks_registered_by_proc : Cfg.Procdesc.t -> Sil.tenv -> Sil.typ list (** given an Android framework type mangled string [lifecycle_typ] (e.g., android.app.Activity) and -a list of method names [lifecycle_procs_strs], get the appropriate typ and procnames *) + a list of method names [lifecycle_procs_strs], get the appropriate typ and procnames *) val get_lifecycle_for_framework_typ_opt : Mangled.t -> string list -> Sil.tenv -> (Sil.typ * Procname.t list) option (** return true if [class_name] is the name of a class that belong to the Android framework *) diff --git a/infer/src/harness/harness.ml b/infer/src/harness/harness.ml index 26b827dad..08cb01f4b 100644 --- a/infer/src/harness/harness.ml +++ b/infer/src/harness/harness.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) module L = Logging module F = Format diff --git a/infer/src/harness/harness.mli b/infer/src/harness/harness.mli index dcf5befc9..f0c979e8e 100644 --- a/infer/src/harness/harness.mli +++ b/infer/src/harness/harness.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Automatically create a harness method to exercise code under test *) diff --git a/infer/src/harness/inhabit.ml b/infer/src/harness/inhabit.ml index 7513e60ca..539ab1f3d 100644 --- a/infer/src/harness/inhabit.ml +++ b/infer/src/harness/inhabit.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** 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 0a6c96baf..b985b275f 100644 --- a/infer/src/harness/inhabit.mli +++ b/infer/src/harness/inhabit.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Utils @@ -16,10 +16,10 @@ type lifecycle_trace = (Procname.t * Sil.typ option) list type callback_trace = (Sil.exp * Sil.typ) list (** create a procedure named harness_name that calls each of the methods in trace in the specified -order with the specified receiver and add it to the execution environment *) + order with the specified receiver and add it to the execution environment *) val inhabit_trace : lifecycle_trace -> callback_trace -> Procname.t -> -DB.source_file Procname.Map.t -> Sil.tenv -> unit + DB.source_file Procname.Map.t -> Sil.tenv -> unit val source_dir_from_name : Procname.t -> DB.source_file Procname.Map.t -> DB.source_dir diff --git a/infer/src/harness/stacktrace.ml b/infer/src/harness/stacktrace.ml index 2883046b5..b49242b69 100644 --- a/infer/src/harness/stacktrace.ml +++ b/infer/src/harness/stacktrace.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for parsing stack traces and using them to guide Infer analysis *) diff --git a/infer/src/harness/stacktrace.mli b/infer/src/harness/stacktrace.mli index 6dee851ad..d3c4c6431 100644 --- a/infer/src/harness/stacktrace.mli +++ b/infer/src/harness/stacktrace.mli @@ -1,11 +1,11 @@ (* -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Module for parsing stack traces and using them to guide Infer analysis *) diff --git a/infer/src/java/jAnnotation.ml b/infer/src/java/jAnnotation.ml index 70c4086b4..529ede6cb 100644 --- a/infer/src/java/jAnnotation.ml +++ b/infer/src/java/jAnnotation.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Utils diff --git a/infer/src/java/jAnnotation.mli b/infer/src/java/jAnnotation.mli index a43aa954c..f76d8e8f3 100644 --- a/infer/src/java/jAnnotation.mli +++ b/infer/src/java/jAnnotation.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack diff --git a/infer/src/java/jClasspath.ml b/infer/src/java/jClasspath.ml index 5dc1d6df0..ba73bff24 100644 --- a/infer/src/java/jClasspath.ml +++ b/infer/src/java/jClasspath.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jClasspath.mli b/infer/src/java/jClasspath.mli index 2dd79b63e..9209cbcee 100644 --- a/infer/src/java/jClasspath.mli +++ b/infer/src/java/jClasspath.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack @@ -29,7 +29,7 @@ val split_classpath : string -> string list (** load the list of source files and the list of classes from the javac verbose file *) val load_sources_and_classes : unit -> -string * DB.source_file Utils.StringMap.t * JBasics.ClassSet.t + string * DB.source_file Utils.StringMap.t * JBasics.ClassSet.t type classmap = JCode.jcode Javalib.interface_or_class JBasics.ClassMap.t diff --git a/infer/src/java/jConfig.ml b/infer/src/java/jConfig.ml index adf011cc2..a58bca4e6 100644 --- a/infer/src/java/jConfig.ml +++ b/infer/src/java/jConfig.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack diff --git a/infer/src/java/jContext.ml b/infer/src/java/jContext.ml index edd0d7503..da0b8dda1 100644 --- a/infer/src/java/jContext.ml +++ b/infer/src/java/jContext.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jContext.mli b/infer/src/java/jContext.mli index a5d40f5ef..5cf1970cc 100644 --- a/infer/src/java/jContext.mli +++ b/infer/src/java/jContext.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack @@ -24,13 +24,13 @@ type meth_kind = | Init (** Hastable for storing nodes that correspond to if-instructions. These are -used when adding the edges in the contrl flow graph. *) + used when adding the edges in the contrl flow graph. *) module NodeTbl : Hashtbl.S with type key = Cfg.Node.t (** data structure for saving the three structures tht contain the intermediate -representation of a file: the type environment, the control graph and the control -flow graph *) + representation of a file: the type environment, the control graph and the control + flow graph *) type icfg = { tenv : Sil.tenv; cg : Cg.t; @@ -43,15 +43,15 @@ type t (** cretes a context for a given method. *) val create_context : -Inferconfig.NeverReturnNull.matcher -> -icfg -> -Cfg.Procdesc.t -> -JBir.t -> -JBasics.class_name -> -meth_kind -> -JCode.jcode Javalib.interface_or_class -> -JClasspath.program -> -t + Inferconfig.NeverReturnNull.matcher -> + icfg -> + Cfg.Procdesc.t -> + JBir.t -> + JBasics.class_name -> + meth_kind -> + JCode.jcode Javalib.interface_or_class -> + JClasspath.program -> + t (** returns the intermediate representation of the Java file from the context. *) val get_icfg : t -> icfg @@ -72,11 +72,11 @@ val get_cg : t -> Cg.t val get_cfg : t -> Cfg.cfg (** returns the procedure description in the intermediate language for the -current method. *) + current method. *) val get_procdesc : t -> Cfg.Procdesc.t (** returns the method kind of the current method: standard or initialiser of -static fields. *) + static fields. *) val get_meth_kind : t -> meth_kind (** adds to the context the line that an if-node will jump to *) @@ -89,7 +89,7 @@ val get_if_jump : t -> Cfg.Node.t -> int option val add_goto_jump : t -> int -> jump_kind -> unit (** if the given line corresponds to a goto instruction, then returns the -line where it jumps to, otherwise returns the next line. *) + line where it jumps to, otherwise returns the next line. *) val get_goto_jump : t -> int -> jump_kind (** returns whether the given line corresponds to a goto instruction. *) @@ -102,7 +102,7 @@ val get_program : t -> JClasspath.program val get_node : t -> JCode.jcode Javalib.interface_or_class (** returns a match function for procedures that are never returning null -according to .inferfonfig *) + according to .inferfonfig *) val get_never_null_matcher : t -> Inferconfig.NeverReturnNull.matcher (** [set_pvar context var type] adds a variable with a type to the context *) diff --git a/infer/src/java/jFrontend.ml b/infer/src/java/jFrontend.ml index 1760ec7eb..659716de1 100644 --- a/infer/src/java/jFrontend.ml +++ b/infer/src/java/jFrontend.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jFrontend.mli b/infer/src/java/jFrontend.mli index 1f7f10798..10cd28b4a 100644 --- a/infer/src/java/jFrontend.mli +++ b/infer/src/java/jFrontend.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack @@ -22,21 +22,21 @@ val is_classname_cached : JBasics.class_name -> bool (** [compute_icfg linereader classes program tenv source_basename source_file] create the call graph and control flow graph for the file [source_file] by translating all the classes in [program] originating from [source_file] *) val compute_source_icfg : -Inferconfig.NeverReturnNull.matcher -> -Printer.LineReader.t -> -JBasics.ClassSet.t -> -JClasspath.program -> -Sil.tenv -> -string -> -DB.source_file -> -Cg.t * Cfg.cfg + Inferconfig.NeverReturnNull.matcher -> + Printer.LineReader.t -> + JBasics.ClassSet.t -> + JClasspath.program -> + Sil.tenv -> + string -> + DB.source_file -> + Cg.t * Cfg.cfg (** Compute the CFG for a class *) val compute_class_icfg : -Inferconfig.NeverReturnNull.matcher -> -Printer.LineReader.t -> -JClasspath.program -> -Sil.tenv -> -JCode.jcode Javalib.interface_or_class -> -DB.source_file -> -Cg.t * Cfg.cfg + Inferconfig.NeverReturnNull.matcher -> + Printer.LineReader.t -> + JClasspath.program -> + Sil.tenv -> + JCode.jcode Javalib.interface_or_class -> + DB.source_file -> + Cg.t * Cfg.cfg diff --git a/infer/src/java/jMain.ml b/infer/src/java/jMain.ml index 9d81cd002..615674981 100644 --- a/infer/src/java/jMain.ml +++ b/infer/src/java/jMain.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack diff --git a/infer/src/java/jTrans.ml b/infer/src/java/jTrans.ml index ee31521cc..4bcf1ef3c 100644 --- a/infer/src/java/jTrans.ml +++ b/infer/src/java/jTrans.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTrans.mli b/infer/src/java/jTrans.mli index fc610cf5c..26d4d1f11 100644 --- a/infer/src/java/jTrans.mli +++ b/infer/src/java/jTrans.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransExn.ml b/infer/src/java/jTransExn.ml index 10f73c5b0..2d038cec1 100644 --- a/infer/src/java/jTransExn.ml +++ b/infer/src/java/jTransExn.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransExn.mli b/infer/src/java/jTransExn.mli index dad2f6c34..7062d0ee7 100644 --- a/infer/src/java/jTransExn.mli +++ b/infer/src/java/jTransExn.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransStaticField.ml b/infer/src/java/jTransStaticField.ml index c2dbea0e8..f8e5262cb 100644 --- a/infer/src/java/jTransStaticField.ml +++ b/infer/src/java/jTransStaticField.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransStaticField.mli b/infer/src/java/jTransStaticField.mli index 13e8a95e3..b1d36b667 100644 --- a/infer/src/java/jTransStaticField.mli +++ b/infer/src/java/jTransStaticField.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack @@ -17,7 +17,7 @@ val is_static_final_field : JContext.t -> JBasics.class_name -> JBasics.field_si val has_static_final_fields : JCode.jcode Javalib.interface_or_class -> bool val translate_instr_static_field : JContext.t -> Cfg.Procdesc.t -> JBasics.field_signature -> Sil.typ -> -Sil.location -> Ident.t list * Sil.instr list * Sil.exp + Sil.location -> Ident.t list * Sil.instr list * Sil.exp val static_field_init : JCode.jcode Javalib.interface_or_class -> JBasics.class_name -> JBir.instr array -> JBir.instr array diff --git a/infer/src/java/jTransType.ml b/infer/src/java/jTransType.ml index 30838563c..498fcaae0 100644 --- a/infer/src/java/jTransType.ml +++ b/infer/src/java/jTransType.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack diff --git a/infer/src/java/jTransType.mli b/infer/src/java/jTransType.mli index ae6e28d63..ee570ce84 100644 --- a/infer/src/java/jTransType.mli +++ b/infer/src/java/jTransType.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack open Sawja_pack @@ -27,7 +27,7 @@ val get_method_procname : JBasics.class_name -> JBasics.method_signature -> Proc Procname.t (** [get_class_type_no_pointer program tenv cn] returns the sil type representation of the class -without the pointer part *) + without the pointer part *) val get_class_type_no_pointer: JClasspath.program -> Sil.tenv -> JBasics.class_name -> Sil.typ (** [get_class_type program tenv cn] returns the sil type representation of the class *) @@ -44,7 +44,7 @@ val object_type : JClasspath.program -> Sil.tenv -> JBasics.object_type -> Sil.t (** create sizeof expressions from the object type and the list of subtypes *) val sizeof_of_object_type : JClasspath.program -> Sil.tenv -> JBasics.object_type -> Sil.Subtype.t --> Sil.exp + -> Sil.exp (** transforms a Java type to a Sil type. *) val value_type : JClasspath.program -> Sil.tenv -> JBasics.value_type -> Sil.typ @@ -53,7 +53,7 @@ val value_type : JClasspath.program -> Sil.tenv -> JBasics.value_type -> Sil.typ val param_type : JClasspath.program -> Sil.tenv -> JBasics.class_name -> JBir.var -> JBasics.value_type -> Sil.typ (** Returns the return type of the method based on the return type specified in ms. -If the method is the initialiser, return the type Object instead. *) + If the method is the initialiser, return the type Object instead. *) val return_type : JClasspath.program -> Sil.tenv -> JBasics.method_signature -> JContext.meth_kind -> Sil.typ (** translates the type of an expression *) diff --git a/infer/src/java/jUtils.ml b/infer/src/java/jUtils.ml index 14078e269..c2d943cb4 100644 --- a/infer/src/java/jUtils.ml +++ b/infer/src/java/jUtils.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack diff --git a/infer/src/java/jUtils.mli b/infer/src/java/jUtils.mli index 6aaa60fba..efb29a1de 100644 --- a/infer/src/java/jUtils.mli +++ b/infer/src/java/jUtils.mli @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Javalib_pack diff --git a/infer/src/java/jVerbose.ml b/infer/src/java/jVerbose.ml index 99f617ad0..a43ec5d1b 100644 --- a/infer/src/java/jVerbose.ml +++ b/infer/src/java/jVerbose.ml @@ -1,12 +1,12 @@ (* -* Copyright (c) 2009 - 2013 Monoidics ltd. -* Copyright (c) 2013 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2009 - 2013 Monoidics ltd. + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) type parsed_data = | Source of string diff --git a/infer/src/llvm/lAst.ml b/infer/src/llvm/lAst.ml index 0490871cb..2aa909837 100644 --- a/infer/src/llvm/lAst.ml +++ b/infer/src/llvm/lAst.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) (** Representation of LLVM constructs *) diff --git a/infer/src/llvm/lLexer.mll b/infer/src/llvm/lLexer.mll index fdb49bc55..e4073b66a 100644 --- a/infer/src/llvm/lLexer.mll +++ b/infer/src/llvm/lLexer.mll @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) { open Lexing open LParser diff --git a/infer/src/llvm/lMain.ml b/infer/src/llvm/lMain.ml index 30c752ece..bb5dc838c 100644 --- a/infer/src/llvm/lMain.ml +++ b/infer/src/llvm/lMain.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open Lexing open Printf diff --git a/infer/src/llvm/lParser.mly b/infer/src/llvm/lParser.mly index 601cf9f70..4c1521d27 100644 --- a/infer/src/llvm/lParser.mly +++ b/infer/src/llvm/lParser.mly @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) %{ open LAst %} diff --git a/infer/src/llvm/lPretty.ml b/infer/src/llvm/lPretty.ml index 6df2302de..be110e5e5 100644 --- a/infer/src/llvm/lPretty.ml +++ b/infer/src/llvm/lPretty.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) 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 9028f8905..4a79080aa 100644 --- a/infer/src/llvm/lTrans.ml +++ b/infer/src/llvm/lTrans.ml @@ -1,11 +1,11 @@ (* -* Copyright (c) 2015 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) open LAst exception ImproperTypeError of string diff --git a/infer/src/opensource/facebook.ml b/infer/src/opensource/facebook.ml index c0507e61c..5750b06e4 100644 --- a/infer/src/opensource/facebook.ml +++ b/infer/src/opensource/facebook.ml @@ -1,10 +1,10 @@ (* -* Copyright (c) 2014 - present Facebook, Inc. -* All rights reserved. -* -* This source code is licensed under the BSD style license found in the -* LICENSE file in the root directory of this source tree. An additional grant -* of patent rights can be found in the PATENTS file in the same directory. -*) + * Copyright (c) 2014 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + *) let register_checkers () = ()