[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`
master
Jules Villard 10 years ago
parent 0368f73ce9
commit 6911a1516c

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
let vecH = [| let vecH = [|
0x00; 0xC1; 0x81; 0x40; 0x01; 0xC0; 0x80; 0x41; 0x01; 0xC0; 0x80; 0x41; 0x00; 0xC1; 0x81; 0x00; 0xC1; 0x81; 0x40; 0x01; 0xC0; 0x80; 0x41; 0x01; 0xC0; 0x80; 0x41; 0x00; 0xC1; 0x81;

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
val crc16 : string -> string val crc16 : string -> string

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Database of analysis results *) (** Database of analysis results *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Database of analysis results *) (** 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} *) (** {2 Results Directory} *)
module Results_dir : sig module Results_dir : sig
(** path expressed as a list of strings *) (** path expressed as a list of strings *)
type path = string list type path = string list
(** kind of path: specifies how to interpret a path *) (** 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 val read_file_with_lock : string -> string -> string option
(** Update the file contents with the update function provided. (** Update the file contents with the update function provided.
If the directory does not exist, it is created. 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. 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. *) A lock is used to allow write attempts in parallel. *)
val update_file_with_lock : string -> string -> (string -> string) -> unit val update_file_with_lock : string -> string -> (string -> string) -> unit
(** get the path of the global type environment (only used in Java) *) (** get the path of the global type environment (only used in Java) *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Implementation of Abstraction Functions *) (** Implementation of Abstraction Functions *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Implementation of Abstraction Functions *) (** Implementation of Abstraction Functions *)
@ -14,12 +14,12 @@
val create_absrules_from_tdecl : Sil.tenv -> Sil.typename -> unit val create_absrules_from_tdecl : Sil.tenv -> Sil.typename -> unit
(** Check whether the prop contains junk. (** 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 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 *) (** Remove redundant elements in an array, and check for junk afterwards *)
val remove_redundant_array_elements : 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. *) (** Abstract a proposition. *)
val abstract : Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.normal Prop.t val abstract : Procname.t -> Sil.tenv -> Prop.normal Prop.t -> Prop.normal Prop.t

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Abstraction for Arrays *) (** Abstraction for Arrays *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Abstraction for Arrays *) (** Abstraction for Arrays *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Generate unit tests automatically from specs *) (** Generate unit tests automatically from specs *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Generate unit tests automatically from specs *) (** Generate unit tests automatically from specs *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Classify bugs into buckets *) (** Classify bugs into buckets *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Classify bugs into buckets *) (** Classify bugs into buckets *)
@ -14,4 +14,4 @@ open Utils
(** Classify the bucket of an error desc using Location.access and nullable information *) (** Classify the bucket of an error desc using Location.access and nullable information *)
val classify_access : 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

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils open Utils
module L = Logging module L = Logging

@ -1,21 +1,21 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module to register and invoke callbacks *) (** Module to register and invoke callbacks *)
(** Type of a procedure callback: (** Type of a procedure callback:
- List of all the procedures the callback will be called on. - List of all the procedures the callback will be called on.
- get_proc_desc to get a proc desc from a proc name. - get_proc_desc to get a proc desc from a proc name.
- Idenv to look up the definition of ids in a cfg. - Idenv to look up the definition of ids in a cfg.
- Type environment. - Type environment.
- Procedure for the callback to act on. *) - Procedure for the callback to act on. *)
type proc_callback_t = type proc_callback_t =
Procname.t list -> Procname.t list ->
(Procname.t -> Cfg.Procdesc.t option) -> (Procname.t -> Cfg.Procdesc.t option) ->

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
module F = Format module F = Format

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Control Flow Graph for Interprocedural Analysis *) (** Control Flow Graph for Interprocedural Analysis *)
@ -25,7 +25,7 @@ val store_cfg_to_file: DB.filename -> bool -> cfg -> unit
(** proc description *) (** proc description *)
module Procdesc : sig module Procdesc : sig
(** proc description *) (** proc description *)
type t type t
(** Compute the distance of each node to the exit node, if not computed already *) (** Compute the distance of each node to the exit node, if not computed already *)
@ -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 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. (** 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 val remove_locals_formals : Procdesc.t -> Prop.normal Prop.t -> Sil.pvar list * Prop.normal Prop.t
(** remove seed vars from a prop *) (** remove seed vars from a prop *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for call graphs *) (** Module for call graphs *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for call graphs *) (** Module for call graphs *)
@ -20,9 +20,9 @@ type in_out_calls =
type t (** the type of a call graph *) type t (** the type of a call graph *)
(** A call graph consists of a set of nodes (Procname.t), and edges between them. (** 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). 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. 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. *) 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. *) (** [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 val add_edge : t -> Procname.t -> Procname.t -> unit

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
module F = Format module F = Format
@ -208,7 +208,7 @@ let check_copyright () =
| None -> | None ->
L.stderr "Can't find fb year: %s@." fname L.stderr "Can't find fb year: %s@." fname
| Some fb_year -> | 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 if copyright_has_changed mono fb_year com_style prefix cstart cend lines_arr then
begin begin
let range = cend - cstart in let range = cend - cstart in

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module F = Format;; module F = Format;;

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Operators for the abstract domain. In particular, join and meet. *) (** Operators for the abstract domain. In particular, join and meet. *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Join and Meet Operators *) (** Join and Meet Operators *)
@ -16,7 +16,7 @@ open Utils
(** Join two pathsets *) (** Join two pathsets *)
val pathset_join : 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 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} *) (** {2 Meet Operators} *)
(** [propset_meet_generate_pre] generates new symbolic heaps (i.e., props) (** [propset_meet_generate_pre] generates new symbolic heaps (i.e., props)
by applying the partial meet operator, adds the generated heaps by applying the partial meet operator, adds the generated heaps
to the argument propset, and returns the resulting propset. This function to the argument propset, and returns the resulting propset. This function
is tuned for combining preconditions. *) is tuned for combining preconditions. *)
val propset_meet_generate_pre : Propset.t -> Prop.normal Prop.t list val propset_meet_generate_pre : Propset.t -> Prop.normal Prop.t list

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
module F = Format module F = Format

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Pretty printing functions in dot format. *) (** Pretty printing functions in dot format. *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Create descriptions of analysis errors *) (** Create descriptions of analysis errors *)

@ -1,19 +1,19 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Create descriptions of analysis errors *) (** Create descriptions of analysis errors *)
open Utils open Utils
(** find the dexp, if any, where the given value is stored (** 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 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 *) (** 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 val hpred_is_open_resource : 'a Prop.t -> Sil.hpred -> Sil.resource option
(** Find the function call instruction used to initialize normal variable [id], (** 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 : 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. *) (** 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 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 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. (** 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 val find_boolean_assignment : Cfg.Node.t -> Sil.pvar -> bool -> Cfg.Node.t option
(** describe rvalue [e] as a dexp *) (** 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. *) (** Produce a description of which expression is dereferenced in the current instruction, if any. *)
val explain_dereference : val explain_dereference :
?use_buckets:bool -> ?is_nullable:bool -> ?is_premature_nil:bool -> ?use_buckets:bool -> ?is_nullable:bool -> ?is_premature_nil:bool ->
Localise.deref_str -> 'a Prop.t -> Sil.location -> Localise.error_desc 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 (** 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 : val explain_dereference_as_caller_expression :
?use_buckets:bool -> ?use_buckets:bool ->
Localise.deref_str -> 'a Prop.t -> 'b Prop.t -> Sil.exp -> Localise.deref_str -> 'a Prop.t -> 'b Prop.t -> Sil.exp ->
Cfg.Node.t -> Sil.location -> Sil.pvar list -> Localise.error_desc Cfg.Node.t -> Sil.location -> Sil.pvar list -> Localise.error_desc
(** explain a division by zero *) (** explain a division by zero *)
val explain_divide_by_zero : Sil.exp -> Cfg.Node.t -> Sil.location -> Localise.error_desc 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 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. (** Produce a description of a leak by looking at the current state.
If the current instruction is a variable nullify, blame the variable. 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 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 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 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. *) (** Produce a description of the memory access performed in the current instruction, if any. *)

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils open Utils
module L = Logging module L = Logging

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for error logs. *) (** Module for error logs. *)
@ -47,9 +47,9 @@ val size : (Exceptions.err_kind -> bool -> bool) -> t -> int
val update : t -> t -> unit val update : t -> t -> unit
val log_issue : val log_issue :
Exceptions.err_kind -> Exceptions.err_kind ->
t -> Sil.location -> (int * int) -> int -> loc_trace -> t -> Sil.location -> (int * int) -> int -> loc_trace ->
(Prop.normal Prop.t) option -> exn -> unit (Prop.normal Prop.t) option -> exn -> unit
(** {2 Functions for manipulating per-file error tables} *) (** {2 Functions for manipulating per-file error tables} *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
module F = Format module F = Format

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils 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 *) (** 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 -> 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, (** 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 -> val recognize_exception : exn ->
(Localise.t * Localise.error_desc * (ml_location option) * exception_visibility * (Localise.t * Localise.error_desc * (ml_location option) * exception_visibility *
exception_severity * err_kind option * err_class) exception_severity * err_kind option * err_class)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Support for Execution environments *) (** Support for Execution environments *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils open Utils

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
module F = Format module F = Format

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Implementation of the Parallel Interprocedural Footprint Analysis Algorithm *) (** 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 val post_process_procs : Exe_env.t -> Procname.t list -> unit
(** Return the list of procedures which should perform a phase (** 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 val should_perform_transition : Cg.t -> Procname.t -> Procname.t list
(** Perform the transition from [FOOTPRINT] to [RE_EXECUTION] in spec table *) (** 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 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] (** [parallel_iter_nodes tenv cfg call_graph analyze_proc process_result filter_out]
executes [analyze_proc] in parallel as much as possible as allowed executes [analyze_proc] in parallel as much as possible as allowed
by the call graph, and applies [process_result] to the result as 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 soon as it is returned by a child process. If [filter_out] returns
true, no execution. *) 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 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 *) (** print the timing stats, and generate timing.dot if in dotty mode *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for Names and Identifiers *) (** Module for Names and Identifiers *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Identifiers: program variables and logical variables *) (** Identifiers: program variables and logical variables *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Main module for the analysis after the capture phase *) (** Main module for the analysis after the capture phase *)

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils open Utils

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Filter type for a source file *) (** Filter type for a source file *)
type path_filter = DB.source_file -> bool type path_filter = DB.source_file -> bool

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
module F = Format module F = Format

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Interprocedural Analysis *) (** Interprocedural Analysis *)

@ -1,28 +1,28 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Interprocedural Analysis *) (** Interprocedural Analysis *)
(** Analyze [proc_name] and return the updated summary. Use module (** Analyze [proc_name] and return the updated summary. Use module
{!Timeout } to call {!perform_analysis_phase } with a time limit, and {!Timeout } to call {!perform_analysis_phase } with a time limit, and
then return the updated summary. Executed as a child process. *) then return the updated summary. Executed as a child process. *)
val analyze_proc : Exe_env.t -> Procname.t -> Specs.summary val analyze_proc : Exe_env.t -> Procname.t -> Specs.summary
(** Process the result of the analysis of [proc_name]: update the (** Process the result of the analysis of [proc_name]: update the
returned summary and add it to the spec table. Executed in the returned summary and add it to the spec table. Executed in the
parent process as soon as a child process returns a result. *) 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 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 (** Return true if the analysis of [proc_name] should be
skipped. Called by the parent process before attempting to analyze a skipped. Called by the parent process before attempting to analyze a
proc. *) proc. *)
val filter_out : Cg.t -> Procname.t -> bool val filter_out : Cg.t -> Procname.t -> bool
(** Perform the analysis of an exe_env *) (** Perform the analysis of an exe_env *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module to handle IO. Includes html and xml modules. *) (** Module to handle IO. Includes html and xml modules. *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module to handle IO. Includes html and xml modules. *) (** Module to handle IO. Includes html and xml modules. *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module F = Format module F = Format
open Utils open Utils

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
type style = type style =
| Boldface | Boldface

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Support for localisation *) (** Support for localisation *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Support for localisation *) (** Support for localisation *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** log messages at different levels of verbosity *) (** log messages at different levels of verbosity *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils open Utils
@ -115,7 +115,7 @@ val set_err_formatter : Format.formatter -> unit
val flush_streams : unit -> unit val flush_streams : unit -> unit
(** print a warning with information of the position in the ml source where it oririnated. (** 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 val warning_position: string -> ml_location -> unit
(** dump a string *) (** dump a string *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for Mangled Names *) (** Module for Mangled Names *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for Mangled Names *) (** Module for Mangled Names *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Functions for "Smart" Pattern Matching *) (** Functions for "Smart" Pattern Matching *)

@ -1,18 +1,18 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * 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. (** 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. 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. See {{: http://dx.doi.org/10.1007/978-3-540-73368-3_22 } CAV 2007 } for the therory involved.
*) *)
open Utils 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 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 (** Type for a hpred pattern. [flag=false] means that the implication
between hpreds is not considered, and [flag = true] means that it is between hpreds is not considered, and [flag = true] means that it is
considered during pattern matching. *) considered during pattern matching. *)
type hpred_pat = { hpred : Sil.hpred; flag : bool } type hpred_pat = { hpred : Sil.hpred; flag : bool }
val pp_hpat : printenv -> Format.formatter -> hpred_pat -> unit 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 type sidecondition = Prop.normal Prop.t -> Sil.subst -> bool
(** [prop_match_with_impl p condition vars hpat hpats] (** [prop_match_with_impl p condition vars hpat hpats]
returns [(subst, p_leftover)] such that returns [(subst, p_leftover)] such that
1) [dom(subst) = vars] 1) [dom(subst) = vars]
2) [p |- (hpat.hpred * hpats.hpred)[subst] * p_leftover]. 2) [p |- (hpat.hpred * hpats.hpred)[subst] * p_leftover].
Using the flag [field], we can control the strength of |-. *) 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 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. (** [find_partial_iso] finds disjoint isomorphic sub-sigmas inside a given sigma.
The first argument is an equality checker. The first argument is an equality checker.
The function returns a partial iso and three sigmas. The first sigma is the first 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 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, 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 and it uses expressions in the range of the isomorphism. The third is the unused
part of the input sigma. *) part of the input sigma. *)
val find_partial_iso : val find_partial_iso :
(Sil.exp -> Sil.exp -> bool) -> (Sil.exp -> Sil.exp -> bool) ->
(Sil.exp * Sil.exp) list -> (Sil.exp * Sil.exp) list ->
(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) option ((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 *) (** This mode expresses the flexibility allowed during the isomorphism check *)
type iso_mode = Exact | LFieldForget | RFieldForget type iso_mode = Exact | LFieldForget | RFieldForget
(** [find_partial_iso_from_two_sigmas] finds isomorphic sub-sigmas inside two (** [find_partial_iso_from_two_sigmas] finds isomorphic sub-sigmas inside two
given sigmas. The second argument is an equality checker. given sigmas. The second argument is an equality checker.
The function returns a partial iso and four sigmas. The first 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 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, 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 and it uses expressions in the range of the isomorphism. The third and fourth
are the unused parts of the two input sigmas. *) are the unused parts of the two input sigmas. *)
val find_partial_iso_from_two_sigmas : val find_partial_iso_from_two_sigmas :
iso_mode -> iso_mode ->
(Sil.exp -> Sil.exp -> bool) -> (Sil.exp -> Sil.exp -> bool) ->
(Sil.exp * Sil.exp) list -> (Sil.exp * Sil.exp) list ->
(Sil.exp * Sil.exp) list -> (Sil.exp * Sil.exp) list ->
Sil.hpred list -> Sil.hpred 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 ((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. *) (** [hpara_iso] soundly checks whether two hparas are isomorphic. *)
val hpara_iso : Sil.hpara -> Sil.hpara -> bool 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 (** [hpara_create] takes a correspondence, and a sigma, a root
and a next for the first part of this correspondence. Then, it creates a and a next for the first part of this correspondence. Then, it creates a
hpara and discovers a list of shared expressions that are hpara and discovers a list of shared expressions that are
passed as arguments to hpara. Both of them are returned as a result. *) passed as arguments to hpara. Both of them are returned as a result. *)
val hpara_create : val hpara_create :
(Sil.exp * Sil.exp) list -> (Sil.exp * Sil.exp) list ->
Sil.hpred list -> Sil.hpred list ->
Sil.exp -> Sil.exp ->
Sil.exp -> Sil.exp ->
Sil.hpara * Sil.exp list Sil.hpara * Sil.exp list
(** [hpara_dll_create] takes a correspondence, and a sigma, a root, (** [hpara_dll_create] takes a correspondence, and a sigma, a root,
a blink and a flink for the first part of this correspondence. Then, 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 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. *) passed as arguments to hpara. Both of them are returned as a result. *)
val hpara_dll_create : val hpara_dll_create :
(Sil.exp * Sil.exp) list -> (Sil.exp * Sil.exp) list ->
Sil.hpred list -> Sil.hpred list ->
Sil.exp -> Sil.exp ->
Sil.exp -> Sil.exp ->
Sil.exp -> Sil.exp ->
Sil.hpara_dll * Sil.exp list Sil.hpara_dll * Sil.exp list

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** This module handles buckets of memory leaks in Objective-C *) (** This module handles buckets of memory leaks in Objective-C *)
open Utils open Utils

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** This module handles buckets of memory leaks in Objective-C *) (** This module handles buckets of memory leaks in Objective-C *)

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * 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 *) (** This module handles C or Objective-C types for which there are special rules for memory management *)

@ -1,19 +1,19 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * 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 (** 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 open Utils
(** This module models special c struct types from the Apple's Core Foundation libraries (** 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 : module Core_foundation_model :
sig sig

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils open Utils

@ -1,10 +1,10 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
val do_objc_preanalysis : unit -> unit val do_objc_preanalysis : unit -> unit

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Execution Paths *) (** Execution Paths *)

@ -1,19 +1,19 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Execution Paths *) (** Execution Paths *)
open Utils open Utils
module Path : sig module Path : sig
(** type for paths *) (** type for paths *)
type t type t
type session = int type session = int

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
open Utils open Utils

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Preanalysis for eliminating dead local variables *) (** Preanalysis for eliminating dead local variables *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Printers for the analysis results *) (** Printers for the analysis results *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Printers for the analysis results *) (** 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 val proc_write_log : bool -> Cfg.cfg -> Procname.t -> unit
(** Module to read specific lines from files. (** 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 module LineReader : sig
type t type t

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for Procedure Names *) (** Module for Procedure Names *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Module for Procedure Names *) (** Module for Procedure Names *)
@ -91,8 +91,8 @@ val java_get_parameters : t -> string list
val java_is_static : t -> bool val java_is_static : t -> bool
(** Check if the last parameter is a hidden inner class, and remove it if present. (** 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 This is used in private constructors, where a proxy constructor is generated
with an extra parameter and calls the normal constructor. *) with an extra parameter and calls the normal constructor. *)
val java_remove_hidden_inner_class_parameter : t -> t option val java_remove_hidden_inner_class_parameter : t -> t option
(** Check if a class string is an anoynmous inner class name *) (** 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 val java_is_anonymous_inner_class_constructor : t -> bool
(** Check if the procedure name is an acess method (e.g. access$100 used to (** 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 val java_is_access_method : t -> bool
(** Check if the proc name has the type of a java vararg. (** 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 val java_is_vararg : t -> bool
(** Convert a proc name to a string for the user to see *) (** Convert a proc name to a string for the user to see *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Functions for Propositions (i.e., Symbolic Heaps) *) (** Functions for Propositions (i.e., Symbolic Heaps) *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Functions for Propositions (i.e., Symbolic Heaps) *) (** 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 '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 (** 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 initialize any fields of the struct. [Fld_init] initializes the fields of the struct with fresh
variables (C) or default values (Java). *) variables (C) or default values (Java). *)
type struct_init_mode = type struct_init_mode =
| No_init | No_init
| Fld_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 val d_pi_sigma: Sil.atom list -> Sil.hpred list -> unit
(** Split sigma into stack and nonstack parts. (** 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 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 *) (** 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 val sigma_fav : hpred list -> fav
(** returns free non-program variables that are used to express (** 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 val sigma_fav_in_pvars_add : fav -> hpred list -> unit
(** Compute free non-program variables of prop *) (** 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 val prop_expmap : (Sil.exp -> Sil.exp) -> 'a t -> exposed t
(** Relaces all expressions in the [hpred list] using the first argument. (** Relaces all expressions in the [hpred list] using the first argument.
Assume that the first parameter defines a partial function. Assume that the first parameter defines a partial function.
No expressions inside hpara are replaced. *) No expressions inside hpara are replaced. *)
val sigma_replace_exp : (exp * exp) list -> hpred list -> hpred list val sigma_replace_exp : (exp * exp) list -> hpred list -> hpred list
val sigma_map : 'a t -> (hpred -> hpred) -> 'a t 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 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 (** Normalize [exp] using the pure part of [prop]. Later, we should
change this such that the normalization exposes offsets of [exp] change this such that the normalization exposes offsets of [exp]
as much as possible. *) as much as possible. *)
val exp_normalize_prop : 'a t -> Sil.exp -> Sil.exp val exp_normalize_prop : 'a t -> Sil.exp -> Sil.exp
(** Normalize the expression without abstracting complex subexpressions *) (** Normalize the expression without abstracting complex subexpressions *)
val exp_normalize_noabs : Sil.subst -> Sil.exp -> Sil.exp val exp_normalize_noabs : Sil.subst -> Sil.exp -> Sil.exp
(** Collapse consecutive indices that should be added. For instance, (** Collapse consecutive indices that should be added. For instance,
this function reduces x[1][1] to x[2]. The [typ] argument is used this function reduces x[1][1] to x[2]. The [typ] argument is used
to ensure the soundness of this collapsing. *) to ensure the soundness of this collapsing. *)
val exp_collapse_consecutive_indices_prop : 'a t -> Sil.typ -> Sil.exp -> Sil.exp val exp_collapse_consecutive_indices_prop : 'a t -> Sil.typ -> Sil.exp -> Sil.exp
(** Normalize [exp] used for the address of a heap cell. (** 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 lexp_normalize_prop : 'a t -> exp -> exp
val atom_normalize_prop : 'a t -> atom -> atom 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 val mk_ptsto : exp -> strexp -> exp -> hpred
(** Construct a points-to predicate for an expression using either the provided expression [name] as (** 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 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. (** 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 val mk_ptsto_lvar : Sil.tenv option -> struct_init_mode -> Sil.inst -> pvar * exp * exp option -> hpred
(** Construct a lseg predicate *) (** Construct a lseg predicate *)
@ -330,7 +330,7 @@ val get_pi_footprint : 'a t -> atom list
val get_sigma_footprint : 'a t -> hpred list val get_sigma_footprint : 'a t -> hpred list
(** Deallocate the stack variables in [pvars], and replace them by normal variables. (** 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 val deallocate_stack_vars : normal t -> pvar list -> Sil.pvar list * normal t
(** Canonicalize the names of primed variables. *) (** 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 val prop_iter_to_prop : 'a prop_iter -> normal t
(** Add an atom to the pi part of prop iter. The (** Add an atom to the pi part of prop iter. The
first parameter records whether it is done first parameter records whether it is done
during footprint or during re - execution. *) during footprint or during re - execution. *)
val prop_iter_add_atom : bool -> 'a prop_iter -> atom -> 'a prop_iter val prop_iter_add_atom : bool -> 'a prop_iter -> atom -> 'a prop_iter
(** Remove the current element from the iterator, and return the prop (** 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 val prop_iter_remove_curr_then_to_prop : 'a prop_iter -> normal t
(** Return the current hpred and state. *) (** Return the current hpred and state. *)
@ -462,7 +462,7 @@ val find_equal_formal_path : exp -> 'a t -> Sil.exp option
(** {2 Internal modules} *) (** {2 Internal modules} *)
module Metrics : sig 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 val prop_size : 'a t -> int
(** Approximate the size of the longest chain by counting the max (** Approximate the size of the longest chain by counting the max

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Propositions seen as graphs *) (** Propositions seen as graphs *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Propositions seen as graphs *) (** Propositions seen as graphs *)
@ -34,22 +34,22 @@ val edge_get_source : edge -> node
val edge_get_succs : edge -> node list 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]. (** [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 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]. (** [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 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 *) (** [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 val get_edges : bool -> t -> edge list
(** [contains_edge footprint_part g e] returns true if the graph [g] contains edge [e], (** [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 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]; (** [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 val iter_edges : bool -> (edge -> unit) -> t -> unit
(** Graph annotated with the differences w.r.t. a previous graph *) (** Graph annotated with the differences w.r.t. a previous graph *)
@ -59,12 +59,12 @@ type diff
val compute_diff : color -> t -> t -> diff val compute_diff : color -> t -> t -> diff
(** [diff_get_colormap footprint_part diff] returns the colormap of a computed 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 val diff_get_colormap : bool -> diff -> Utils.colormap
(** Print a list of propositions, prepending each one with the given string, (** 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, 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. *) 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 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 *) (** dump a prop list coming form the given initial prop *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Functions for Propositions (i.e., Symbolic Heaps) *) (** Functions for Propositions (i.e., Symbolic Heaps) *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Functions for Sets of Propositions with and without sharing *) (** Functions for Sets of Propositions with and without sharing *)
@ -15,7 +15,7 @@ open Utils
(** {2 Sets of Propositions} *) (** {2 Sets of Propositions} *)
(** 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 type t
(** Compare propsets *) (** 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 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))...)], (** [fold f pset a] computes [(f pN ... (f p2 (f p1 a))...)],
where [p1 ... pN] are the elements of pset, in increasing where [p1 ... pN] are the elements of pset, in increasing
order. *) order. *)
val fold : ('a -> Prop.normal Prop.t -> 'a) -> 'a -> t -> 'a val fold : ('a -> Prop.normal Prop.t -> 'a) -> 'a -> t -> 'a
(** [iter f pset] computes (f p1;f p2;..;f pN) (** [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 iter : (Prop.normal Prop.t -> unit) -> t -> unit
val partition : (Prop.normal Prop.t -> bool) -> t -> t * t val partition : (Prop.normal Prop.t -> bool) -> t -> t * t

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Functions for Propositions (i.e., Symbolic Heaps) *) (** Functions for Propositions (i.e., Symbolic Heaps) *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Functions for Theorem Proving *) (** 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 val check_allocatedness : Prop.normal Prop.t -> exp -> bool
(** [is_root prop base_exp exp] checks whether [base_exp = (** [is_root prop base_exp exp] checks whether [base_exp =
exp.offlist] for some list of offsets [offlist]. If so, it returns exp.offlist] for some list of offsets [offlist]. If so, it returns
[Some(offlist)]. Otherwise, it returns [None]. Assumes that [Some(offlist)]. Otherwise, it returns [None]. Assumes that
[base_exp] points to the beginning of a structure, not the middle. *) [base_exp] points to the beginning of a structure, not the middle. *)
val is_root : Prop.normal Prop.t -> exp -> exp -> offset list option 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. (** [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 val expand_hpred_pointer : bool -> Sil.hpred -> bool * bool * Sil.hpred
(** Get upper and lower bounds of an expression, if any *) (** Get upper and lower bounds of an expression, if any *)
@ -76,11 +76,11 @@ type implication_result =
| ImplFail of check list | ImplFail of check list
(** [check_implication_for_footprint p1 p2] returns (** [check_implication_for_footprint p1 p2] returns
[Some(sub, frame, missing)] if [sub(p1 * missing) |- sub(p2 * [Some(sub, frame, missing)] if [sub(p1 * missing) |- sub(p2 *
frame)] where [sub] is a substitution which instantiates the frame)] where [sub] is a substitution which instantiates the
primed vars of [p1] and [p2], which are assumed to be disjoint. *) primed vars of [p1] and [p2], which are assumed to be disjoint. *)
val check_implication_for_footprint : 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} *) (** {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 val check_subtype : Sil.tenv -> Sil.typ -> Sil.typ -> bool
(** subtype_case_analysis tenv tecp1 texp2 performs case analysis on [texp1 <: texp2], (** 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 val subtype_case_analysis : Sil.tenv -> Sil.exp -> Sil.exp -> Sil.exp option * Sil.exp option

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Re-arrangement and extension of structures with fresh variables *) (** Re-arrangement and extension of structures with fresh variables *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * 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 *) (** 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 *) (** Check for dereference errors: dereferencing 0, a freed value, or an undefined value *)
val check_dereference_error : 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.*) (** 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 *) (** 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 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]. (** [rearrange lexp prop] rearranges [prop] into the form [prop' * lexp|->strexp:typ].
It returns an iterator with [lexp |-> strexp: typ] as current predicate It returns an iterator with [lexp |-> strexp: typ] as current predicate
and the path (an [offsetlist]) which leads to [lexp] as the iterator state. *) and the path (an [offsetlist]) which leads to [lexp] as the iterator state. *)
val rearrange : val rearrange :
Cfg.Procdesc.t -> Sil.tenv -> Sil.exp -> Cfg.Procdesc.t -> Sil.tenv -> Sil.exp ->
Sil.typ -> Prop.normal Prop.t -> Sil.typ -> Prop.normal Prop.t ->
Sil.location -> (Sil.offset list) Prop.prop_iter list Sil.location -> (Sil.offset list) Prop.prop_iter list

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
open Utils open Utils
module L = Logging module L = Logging

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2015 - present Facebook, Inc. * Copyright (c) 2015 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * 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 of functions to report issues to the error_log in a spec. *)
type log_issue = type log_issue =

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module L = Logging module L = Logging
module F = Format module F = Format

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Serialization of data stuctures *) (** Serialization of data stuctures *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** The Smallfoot Intermediate Language *) (** The Smallfoot Intermediate Language *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** The Smallfoot Intermediate Language *) (** The Smallfoot Intermediate Language *)
@ -72,10 +72,10 @@ type proc_attributes =
val copy_proc_attributes : proc_attributes -> proc_attributes val copy_proc_attributes : proc_attributes -> proc_attributes
(** Type for program variables. There are 4 kinds of variables: (** Type for program variables. There are 4 kinds of variables:
1) local variables, used for local variables and 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]) 2) callee program variables, used to handle recursion ([x | callee] is distinguished from [x])
3) global variables 3) global variables
4) seed variables, used to store the initial value of formal parameters 4) seed variables, used to store the initial value of formal parameters
*) *)
type pvar type pvar
@ -270,7 +270,7 @@ type dexp =
| Dretcall of dexp * dexp list * location * call_flags | Dretcall of dexp * dexp list * location * call_flags
(** Value paths: identify an occurrence of a value in a symbolic heap (** 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 = and vpath =
dexp option dexp option
@ -469,11 +469,11 @@ type strexp =
| Estruct of (Ident.fieldname * strexp) list * inst (** C structure *) | Estruct of (Ident.fieldname * strexp) list * inst (** C structure *)
| Earray of exp * (exp * strexp) list * inst (** Array of given size. *) | Earray of exp * (exp * strexp) list * inst (** Array of given size. *)
(** There are two conditions imposed / used in the array case. (** There are two conditions imposed / used in the array case.
First, if some index and value pair appears inside an array 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. in a strexp, then the index is less than the size of the array.
For instance, x |->[10 | e1: v1] implies that e1 <= 9. For instance, x |->[10 | e1: v1] implies that e1 <= 9.
Second, if two indices appear in an array, they should be different. Second, if two indices appear in an array, they should be different.
For instance, x |->[10 | e1: v1, e2: v2] implies that e1 != e2. *) For instance, x |->[10 | e1: v1, e2: v2] implies that e1 != e2. *)
(** an atomic heap predicate *) (** an atomic heap predicate *)
and hpred = and hpred =
@ -486,14 +486,14 @@ and hpred =
This assumption is used in the rearrangement. The last [exp list] parameter 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.*) 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 | 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. (** parameter for the higher-order singly-linked list predicate.
Means "lambda (root,next,svars). Exists evars. body". Means "lambda (root,next,svars). Exists evars. body".
Assume that root, next, svars, evars are disjoint sets of Assume that root, next, svars, evars are disjoint sets of
primed identifiers, and include all the free primed identifiers in body. primed identifiers, and include all the free primed identifiers in body.
body should not contain any non - primed identifiers or program body should not contain any non - primed identifiers or program
variables (i.e. pvars). *) variables (i.e. pvars). *)
and hpara = and hpara =
{ root: Ident.t; { root: Ident.t;
next: Ident.t; next: Ident.t;
@ -502,8 +502,8 @@ and hpara =
body: hpred list } body: hpred list }
(** parameter for the higher-order doubly-linked list predicates. (** parameter for the higher-order doubly-linked list predicates.
Assume that all the free identifiers in body_dll should belong to Assume that all the free identifiers in body_dll should belong to
cell, blink, flink, svars_dll, evars_dll. *) cell, blink, flink, svars_dll, evars_dll. *)
and hpara_dll = and hpara_dll =
{ cell: Ident.t; (** address cell *) { cell: Ident.t; (** address cell *)
blink: Ident.t; (** backward link *) blink: Ident.t; (** backward link *)
@ -692,21 +692,21 @@ val unop_equal : unop -> unop -> bool
val binop_equal : binop -> binop -> bool val binop_equal : binop -> binop -> bool
(** This function returns true if the operation is injective (** This function returns true if the operation is injective
wrt. each argument: op(e,-) and op(-, e) is injective for all e. wrt. each argument: op(e,-) and op(-, e) is injective for all e.
The return value false means "don't know". *) The return value false means "don't know". *)
val binop_injective : binop -> bool val binop_injective : binop -> bool
(** This function returns true if the operation can be inverted. *) (** This function returns true if the operation can be inverted. *)
val binop_invertible : binop -> bool val binop_invertible : binop -> bool
(** This function inverts an injective binary operator (** This function inverts an injective binary operator
with respect to the first argument. It returns an expression [e'] such that 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, BinOp([binop], [e'], [exp1]) = [exp2]. If the [binop] operation is not invertible,
the function raises an exception by calling "assert false". *) the function raises an exception by calling "assert false". *)
val binop_invert : binop -> exp -> exp -> exp val binop_invert : binop -> exp -> exp -> exp
(** This function returns true if 0 is the right unit of [binop]. (** 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 binop_is_zero_runit : binop -> bool
val mem_kind_compare : mem_kind -> mem_kind -> int 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 val typ_to_string : typ -> string
(** [pp_type_decl pe pp_base pp_size f typ] pretty prints a type declaration. (** [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_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_size prints the expression for the array size *)
val pp_type_decl: printenv -> (Format.formatter -> unit -> unit) -> val pp_type_decl: printenv -> (Format.formatter -> unit -> unit) ->
(printenv -> Format.formatter -> exp -> unit) -> (printenv -> Format.formatter -> exp -> unit) ->
Format.formatter -> typ -> unit Format.formatter -> typ -> unit
(** Dump a type with all the details. *) (** Dump a type with all the details. *)
val d_typ_full : typ -> unit 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 val pp_hpara_dll_list : printenv -> Format.formatter -> hpara_dll list -> unit
(** Module Predicates records the occurrences of predicates as parameters (** 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 module Predicates : sig
(** predicate environment *) (** predicate environment *)
type env type env
(** create an empty predicate environment *) (** create an empty predicate environment *)
val empty_env : unit -> env val empty_env : unit -> env
@ -1007,9 +1007,9 @@ val pp_hpred_env : printenv -> Predicates.env option -> Format.formatter -> hpre
(** {2 Functions for traversing SIL data types} *) (** {2 Functions for traversing SIL data types} *)
(** This function should be used before adding a new (** This function should be used before adding a new
index to Earray. The [exp] is the newly created 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. 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. *) The function faults in the re - execution mode, as an internal check of the tool. *)
val array_clean_new_index : bool -> exp -> exp val array_clean_new_index : bool -> exp -> exp
(** Change exps in strexp using [f]. *) (** 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} *) (** {2 Utility Functions for Expressions} *)
(** Turn an expression representing a type into the type it represents (** 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 val texp_to_typ : typ option -> exp -> typ
(** If a struct type with field f, return the type of f. (** 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 val struct_typ_fld : typ option -> Ident.fieldname -> typ -> typ
(** If an array type, return the type of the element. (** 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 val array_typ_elem : typ option -> typ -> typ
(** Return the root of [lexp]. *) (** Return the root of [lexp]. *)
@ -1060,7 +1060,7 @@ val root_of_lexp : exp -> exp
val exp_get_undefined : bool -> exp val exp_get_undefined : bool -> exp
(** Checks whether an expression denotes a location using pointer arithmetic. (** 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 val exp_pointer_arith : exp -> bool
(** Integer constant 0 *) (** Integer constant 0 *)
@ -1138,7 +1138,7 @@ val fav_mem : fav -> Ident.t -> bool
val fav_from_list : Ident.t list -> fav val fav_from_list : Ident.t list -> fav
(** Convert a [fav] to a list of identifiers while preserving the order (** 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 val fav_to_list : fav -> Ident.t list
(** Copy a [fav]. *) (** 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 val fav_copy_filter_ident : fav -> (Ident.t -> bool) -> fav
(** [fav_subset_ident fav1 fav2] returns true if every ident in [fav1] (** [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 val fav_subset_ident : fav -> fav -> bool
(** add identifier list to fav *) (** 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} *) (** {2 Functions for computing all free or bound non-program variables} *)
(** Non-program variables include all of primed, normal and footprint (** Non-program variables include all of primed, normal and footprint
variables. Thus, the functions essentially compute all the variables. Thus, the functions essentially compute all the
identifiers occuring in a parameter. Some variables can appear more identifiers occuring in a parameter. Some variables can appear more
than once in the result. *) than once in the result. *)
val exp_av_add : fav -> exp -> unit val exp_av_add : fav -> exp -> unit
@ -1209,8 +1209,8 @@ val hpara_av_add : fav -> hpara -> unit
type subst type subst
(** Create a substitution from a list of pairs. (** Create a substitution from a list of pairs.
For all (id1, e1), (id2, e2) in the input list, For all (id1, e1), (id2, e2) in the input list,
if id1 = id2, then e1 = e2. *) if id1 = id2, then e1 = e2. *)
val sub_of_list : (Ident.t * exp) list -> subst val sub_of_list : (Ident.t * exp) list -> subst
(** like sub_of_list, but allow duplicate ids and only keep the first occurrence *) (** 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 val sub_equal : subst -> subst -> bool
(** Compute the common id-exp part of two inputs [subst1] and [subst2]. (** Compute the common id-exp part of two inputs [subst1] and [subst2].
The first component of the output is this common part. The first component of the output is this common part.
The second and third components are the remainder of [subst1] The second and third components are the remainder of [subst1]
and [subst2], respectively. *) and [subst2], respectively. *)
val sub_join : subst -> subst -> subst val sub_join : subst -> subst -> subst
(** Compute the common id-exp part of two inputs [subst1] and [subst2]. (** Compute the common id-exp part of two inputs [subst1] and [subst2].
The first component of the output is this common part. The first component of the output is this common part.
The second and third components are the remainder of [subst1] The second and third components are the remainder of [subst1]
and [subst2], respectively. *) and [subst2], respectively. *)
val sub_symmetric_difference : subst -> subst -> subst * subst * subst 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. *) (** [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 val sub_find : (Ident.t -> bool) -> subst -> exp
(** [sub_filter filter sub] restricts the domain of [sub] to the (** [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 val sub_filter : (Ident.t -> bool) -> subst -> subst
(** [sub_filter_exp filter sub] restricts the domain of [sub] to the (** [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 val sub_filter_pair : (Ident.t * exp -> bool) -> subst -> subst
(** [sub_range_partition filter sub] partitions [sub] according to (** [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 val sub_range_partition : (exp -> bool) -> subst -> subst * subst
(** [sub_domain_partition filter sub] partitions [sub] according to (** [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 val sub_domain_partition : (Ident.t -> bool) -> subst -> subst * subst
(** Return the list of identifiers in the domain of the substitution. *) (** 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 val sub_range_map : (exp -> exp) -> subst -> subst
(** [sub_map f g sub] applies the renaming [f] to identifiers in the domain (** [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 val sub_map : (Ident.t -> Ident.t) -> (exp -> exp) -> subst -> subst
(** Checks whether [id] belongs to the domain of [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 val extend_sub : subst -> Ident.t -> exp -> subst option
(** Free auxilary variables in the domain and range of the (** Free auxilary variables in the domain and range of the
substitution. *) substitution. *)
val sub_fav_add : fav -> subst -> unit val sub_fav_add : fav -> subst -> unit
(** Free or bound auxilary variables in the domain and range of the (** Free or bound auxilary variables in the domain and range of the
substitution. *) substitution. *)
val sub_av_add : fav -> subst -> unit val sub_av_add : fav -> subst -> unit
(** Compute free pvars in a sub *) (** Compute free pvars in a sub *)
@ -1304,7 +1304,7 @@ val hpara_sub : subst -> hpara -> hpara
(** {2 Functions for replacing occurrences of expressions.} *) (** {2 Functions for replacing occurrences of expressions.} *)
(** The first parameter should define a partial function. (** 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 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 val sigma_to_sigma_ne : hpred list -> (atom list * hpred list) list
(** [hpara_instantiate para e1 e2 elist] instantiates [para] with [e1], (** [hpara_instantiate para e1 e2 elist] instantiates [para] with [e1],
[e2] and [elist]. If [para = lambda (x, y, xs). exists zs. b], [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\]] then the result of the instantiation is [b\[e1 / x, e2 / y, elist / xs, _zs'/ zs\]]
for some fresh [_zs'].*) for some fresh [_zs'].*)
val hpara_instantiate : hpara -> exp -> exp -> exp list -> Ident.t list * hpred list 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], (** [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], [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\]] then the result of the instantiation is [b\[cell / x, blink / y, flink / z, elist / xs, _zs'/ zs\]]
for some fresh [_zs'].*) for some fresh [_zs'].*)
val hpara_dll_instantiate : hpara_dll -> exp -> exp -> exp -> exp list -> Ident.t list * hpred list 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 *) (** Return the list of expressions that could be understood as outgoing arrows from the strexp *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Specifications and spec table *) (** Specifications and spec table *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Specifications and spec table *) (** Specifications and spec table *)
@ -16,7 +16,7 @@ open Utils
(** Module for joined props: the result of joining together propositions repeatedly *) (** Module for joined props: the result of joining together propositions repeatedly *)
module Jprop : sig 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 = type 'a t =
| Prop of int * 'a Prop.t | Prop of int * 'a Prop.t
| Joined of int * 'a Prop.t * 'a t * 'a t | Joined of int * 'a Prop.t * 'a t * 'a t
@ -67,9 +67,9 @@ module Visitedset : Set.S with type elt = int * int list
val visited_str : Visitedset.t -> string val visited_str : Visitedset.t -> string
(** A spec consists of: (** A spec consists of:
pre: a joined prop pre: a joined prop
posts: a list of props with path posts: a list of props with path
visited: a list of pairs (node_id, line) for the visited nodes *) 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 } 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 *) module NormSpec : sig (* encapsulate type for normalized specs *)
@ -217,21 +217,21 @@ val is_active : Procname.t -> bool
val is_inactive : Procname.t -> bool val is_inactive : Procname.t -> bool
(** Initialize the summary for [proc_name] given dependent procs in list [depend_list]. (** 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 : val init_summary :
(Procname.t * (** proc_name *) (Procname.t * (** proc_name *)
Sil.typ * (** ret type *) Sil.typ * (** ret type *)
(string * Sil.typ) list * (** formals *) (string * Sil.typ) list * (** formals *)
Procname.t list * (** depend list *) Procname.t list * (** depend list *)
Sil.location * (** loc *) Sil.location * (** loc *)
int list * (** nodes *) int list * (** nodes *)
proc_flags * (** procedure flags *) proc_flags * (** procedure flags *)
Errlog.t * (** initial error log *) Errlog.t * (** initial error log *)
(Procname.t * Sil.location) list * (** calls *) (Procname.t * Sil.location) list * (** calls *)
int * (** cyclomatic *) int * (** cyclomatic *)
(Cg.in_out_calls option) * (** in and out calls *) (Cg.in_out_calls option) * (** in and out calls *)
Sil.proc_attributes) (** attributes of the procedure *) Sil.proc_attributes) (** attributes of the procedure *)
-> unit -> unit
val reset_summary : Cg.t -> Procname.t -> Sil.location -> 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 val proc_get_method_annotation : Procname.t -> Cfg.Procdesc.t -> Sil.method_annotation
(** Check if the procedure is from a library: (** 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 val proc_is_library : Procname.t -> Cfg.Procdesc.t -> bool
(** Re-initialize a dependency map *) (** Re-initialize a dependency map *)
@ -284,5 +284,5 @@ val store_summary : Procname.t -> summary -> unit
val summary_compact : Sil.sharing_env -> summary -> summary val summary_compact : Sil.sharing_env -> summary -> summary
(** Update the dependency map of [proc_name] with the current (** 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 val update_dependency_map : Procname.t -> unit

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** State of symbolic execution *) (** State of symbolic execution *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** State of symbolic execution *) (** State of symbolic execution *)
@ -51,7 +51,7 @@ val get_node_id : unit -> int
val get_node_id_key : unit -> int * int val get_node_id_key : unit -> int * int
(** return the normalized precondition extracted form the last prop seen, if any (** 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 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 *) (** 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 val mark_instr_ok : unit -> unit
(** Create a function to find duplicate nodes. (** Create a function to find duplicate nodes.
A node is a duplicate of another one if they have the same kind and location 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. *) 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) val mk_find_duplicate_nodes: Cfg.Procdesc.t -> (Cfg.Node.t -> Cfg.NodeSet.t)
type log_issue = type log_issue =

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Symbolic Execution *) (** Symbolic Execution *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Symbolic Execution *) (** Symbolic Execution *)
@ -18,12 +18,12 @@ val function_is_builtin : Procname.t -> bool
(** symbolic execution on the level of sets of propositions *) (** symbolic execution on the level of sets of propositions *)
val lifted_sym_exec : (exn -> unit) -> Cfg.cfg -> Sil.tenv -> Cfg.Procdesc.t -> 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 (** 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 * 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 * 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. *) * 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 val resolve_method : Sil.tenv -> Mangled.t -> Procname.t -> Procname.t
(** {2 Functions for handling builtins } *) (** {2 Functions for handling builtins } *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Interprocedural footprint analysis *) (** Interprocedural footprint analysis *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Interprocedural footprint analysis *) (** Interprocedural footprint analysis *)
@ -24,7 +24,7 @@ val find_dereference_without_null_check_in_sexp : Sil.strexp -> (int * Sil.path_
(** raise a cast exception *) (** raise a cast exception *)
val raise_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 *) (** check if a prop is an exception *)
val prop_is_exn : Procname.t -> 'a Prop.t -> bool val prop_is_exn : Procname.t -> 'a Prop.t -> bool

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(* Module for implementing an algorithm for propagating dynamic types. *) (* Module for implementing an algorithm for propagating dynamic types. *)

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
val type_prop : unit -> unit val type_prop : unit -> unit

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** General utility functions and definition with global scope *) (** General utility functions and definition with global scope *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** General utility functions *) (** 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 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. (** 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 val list_intersect : ('a -> 'a -> int) -> 'a list -> 'a list -> bool
exception Fail exception Fail
@ -178,7 +178,7 @@ type printenv = {
val pe_reset_obj_sub : printenv -> printenv val pe_reset_obj_sub : printenv -> printenv
(** Set the object substitution, which is supposed to preserve the type. (** 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 val pe_set_obj_sub : printenv -> ('a -> 'a) -> printenv
(** standard colormap: black *) (** standard colormap: black *)
@ -259,7 +259,7 @@ val exn_not_timeout : exn -> bool
(** Count the number of symbolic operations *) (** Count the number of symbolic operations *)
module SymOp : sig module SymOp : sig
(** Count one symop *) (** Count one symop *)
val pay : unit -> unit val pay : unit -> unit
(** Reset the counter and activate the alarm *) (** Reset the counter and activate the alarm *)
@ -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 *) (** Escape a string for use in a CSV or XML file: replace reserved characters with escape sequences *)
module Escape : sig 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_map : (char -> string option) -> string -> string
val escape_dotty : string -> string (** escape a string to be used in a dotty file *) 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 *) 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 val join_strings : string -> string list -> string
(** [next compare] transforms the comparison function [compare] to another function taking (** [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 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 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 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 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] *) [Int.compare x y] is [0] *)
val next : ('a -> 'a -> int) -> ('a -> 'a -> int -> int) val next : ('a -> 'a -> int) -> ('a -> 'a -> int -> int)
(** Functional fold function over all the file of a directory *) (** Functional fold function over all the file of a directory *)

@ -1,12 +1,12 @@
(* (*
* Copyright (c) 2009 - 2013 Monoidics ltd. * Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
let major = @MAJOR@ let major = @MAJOR@
let minor = @MINOR@ let minor = @MINOR@

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
module F = Format module F = Format
module L = Logging module L = Logging

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*) *)
(** Annotations. *) (** Annotations. *)
@ -21,8 +21,8 @@ type annotated_signature =
params: (string * Sil.item_annotation * Sil.typ) list } (** Annotated parameters. *) 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. (** 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 These wrappers have the same name as the original method, every type is Object, and the parameters
are called x0, x1, x2. *) are called x0, x1, x2. *)
val annotated_signature_is_anonymous_inner_class_wrapper : annotated_signature -> Procname.t -> bool 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 *) (** 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. *) (** Mark the annotated signature with the given annotation map. *)
val annotated_signature_mark : 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. *) (** Mark the return of the annotated signature with the given annotation. *)
val annotated_signature_mark_return : 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. *) (** Mark the return of the annotated signature @Strict. *)
val annotated_signature_mark_return_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 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 *) (** Get the annotated signature of the procedure *)
val get_annotated_signature : 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] *) (** Return the type of the field [fn] and its annotation, None if [typ] has no field named [fn] *)
val get_field_type_and_annotation : 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 val ia_contains : Sil.item_annotation -> string -> bool

@ -1,11 +1,11 @@
(* (*
* Copyright (c) 2013 - present Facebook, Inc. * Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved. * All rights reserved.
* *
* This source code is licensed under the BSD style license found in the * This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant * LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory. * 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 *) (** Make sure callbacks are always unregistered. drive the point home by reporting possible NPE's *)

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

Loading…
Cancel
Save