[infer][backend] make the Map and Set of procedure names pretty printable

Summary: This will avoid the redefine this Map and Set module as pretty printable when used to create abstract domains.

Reviewed By: sblackshear

Differential Revision: D4811849

fbshipit-source-id: e2f6763
master
Jeremy Dubreil 8 years ago committed by Facebook Github Bot
parent 615489a619
commit a7422cf227

@ -886,13 +886,15 @@ let module Procname = {
let equal = equal; let equal = equal;
let hash = hash_pname; let hash = hash_pname;
}; };
let module Map = Caml.Map.Make { let module Map = PrettyPrintable.MakePPMap {
type nonrec t = t; type nonrec t = t;
let compare = compare; let compare = compare;
let pp = pp;
}; };
let module Set = Caml.Set.Make { let module Set = PrettyPrintable.MakePPSet {
type nonrec t = t; type nonrec t = t;
let compare = compare; let compare = compare;
let pp = pp;
}; };
/** Pretty print a set of proc names */ /** Pretty print a set of proc names */

@ -267,10 +267,10 @@ let module Procname: {
let module Hash: Caml.Hashtbl.S with type key = t; let module Hash: Caml.Hashtbl.S with type key = t;
/** Maps from proc names. */ /** Maps from proc names. */
let module Map: Caml.Map.S with type key = t; let module Map: PrettyPrintable.PPMap with type key = t;
/** Sets of proc names. */ /** Sets of proc names. */
let module Set: Caml.Set.S with type elt = t; let module Set: PrettyPrintable.PPSet with type elt = t;
/** Create a C procedure name from plain and mangled name. */ /** Create a C procedure name from plain and mangled name. */
let c: QualifiedCppName.t => string => template_spec_info => c; let c: QualifiedCppName.t => string => template_spec_info => c;

@ -14,9 +14,7 @@ module L = Logging
(** find transitive procedure calls for each procedure *) (** find transitive procedure calls for each procedure *)
module ProcnameSet = PrettyPrintable.MakePPSet(Typ.Procname) module Domain = AbstractDomain.FiniteSet(Typ.Procname.Set)
module Domain = AbstractDomain.FiniteSet(ProcnameSet)
(* Store a single stacktree frame per method. That is, callees is (* Store a single stacktree frame per method. That is, callees is
always []. Instead, the expanded per-method summaries are directly stored always []. Instead, the expanded per-method summaries are directly stored

Loading…
Cancel
Save