From 26ed28a36e9444164e82fba29eb85a393f12d5e9 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 2 Sep 2024 04:10:26 -0700 Subject: [PATCH] [pulse][cleanup] remove unused PathContext.conditions Summary: This was used to keep track of contexts, which we don't use anymore. Reviewed By: ngorogiannis Differential Revision: D62031140 fbshipit-source-id: 4a5bc86f501a4a721c89d62bd288d8c6b6ce9e62 --- infer/src/pulse/PulsePathContext.ml | 14 +++++--------- infer/src/pulse/PulsePathContext.mli | 8 +------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/infer/src/pulse/PulsePathContext.ml b/infer/src/pulse/PulsePathContext.ml index 7a0fa845521..dc0e71c70af 100644 --- a/infer/src/pulse/PulsePathContext.ml +++ b/infer/src/pulse/PulsePathContext.ml @@ -9,7 +9,7 @@ open! IStd module F = Format open PulseBasicInterface -type t = {conditions: ValueHistory.t list; timestamp: Timestamp.t} [@@deriving compare, equal] +type t = {timestamp: Timestamp.t} [@@deriving compare, equal] (** path contexts is metadata that do not contribute to the semantics *) let leq ~lhs:_ ~rhs:_ = true @@ -25,14 +25,10 @@ let is_executable _ = true let exceptional_to_normal x = x -let pp fmt ({conditions; timestamp} [@warning "+missing-record-field-pattern"]) = - let pp_condition fmt hist = - if Config.debug_level_analysis >= 3 then F.fprintf fmt "[%a]" ValueHistory.pp hist - in - F.fprintf fmt "conditions= [%a]@;timestamp= %a" (Pp.seq ~sep:";" pp_condition) conditions - Timestamp.pp timestamp +let pp fmt ({timestamp} [@warning "+missing-record-field-pattern"]) = + F.fprintf fmt "timestamp= %a" Timestamp.pp timestamp -let initial = {conditions= []; timestamp= Timestamp.t0} +let initial = {timestamp= Timestamp.t0} -let post_exec_instr {conditions; timestamp} = {conditions; timestamp= Timestamp.incr timestamp} +let post_exec_instr {timestamp} = {timestamp= Timestamp.incr timestamp} diff --git a/infer/src/pulse/PulsePathContext.mli b/infer/src/pulse/PulsePathContext.mli index b5133736d27..4e056b63aa1 100644 --- a/infer/src/pulse/PulsePathContext.mli +++ b/infer/src/pulse/PulsePathContext.mli @@ -8,13 +8,7 @@ open! IStd open PulseBasicInterface -type t = - { conditions: ValueHistory.t list - (** Each history represents a conditional that is affecting the path currently, with the - most recent conditional first. The idea is to add these histories to the histories of - all variables and memory locations modified while under the influence of these - conditionals. *) - ; timestamp: Timestamp.t (** step number in an intra-procedural analysis *) } +type t = {timestamp: Timestamp.t (** step number in an intra-procedural analysis *)} [@@deriving compare, equal] include AbstractDomain.Disjunct with type t := t