[specs] do not expose specs cache

Summary:
Exposing the in-memory cache seems dangerous. There were only 2 uses anyway:
eradicate and biabduction. I think the biabduction one is safe to remove. The
eradicate one I do not really understand as we return a different summary than
the one we cache... the tests pass though.

Reviewed By: jeremydubreil

Differential Revision: D9150167

fbshipit-source-id: cf30af232
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent c50b28480b
commit d3a36947bd

@ -54,9 +54,6 @@ type t =
val dummy : t
(** dummy summary for testing *)
val add : Typ.Procname.t -> t -> unit
(** Add the summary to the table for the given function *)
val has_model : Typ.Procname.t -> bool
(** Check if a summary for a given procedure exists in the models directory *)

@ -1245,7 +1245,6 @@ let analyze_procedure_aux summary exe_env tenv proc_desc : Summary.t =
| _ ->
summaryre
in
Summary.add proc_name summary_compact ;
summary_compact

@ -36,20 +36,6 @@ end
(** Create a module with the toplevel callback. *)
module MkCallback (Extension : ExtensionT) : CallBackT = struct
(** Update the summary with stats from the checker. *)
let update_summary proc_name final_typestate_opt =
match Summary.get proc_name with
| Some old_summ ->
let new_summ =
{ old_summ with
Summary.payloads=
Extension.update_payloads final_typestate_opt old_summ.Summary.payloads }
in
Summary.add proc_name new_summ
| None ->
()
let callback1 tenv find_canonical_duplicate calls_this checks get_proc_desc idenv curr_pname
curr_pdesc annotated_signature linereader proc_loc
: bool * Extension.extension TypeState.t option =
@ -321,7 +307,7 @@ module MkCallback (Extension : ExtensionT) : CallBackT = struct
EradicateChecks.check_overridden_annotations find_canonical_duplicate tenv curr_pname
curr_pdesc annotated_signature ;
TypeErr.report_forall_checks_and_reset tenv (Checkers.ST.report_error tenv) curr_pdesc ;
update_summary curr_pname final_typestate_opt
()
(** Entry point for the eradicate-based checker infrastructure. *)

Loading…
Cancel
Save