Skip to content

Commit

Permalink
[pulse][cleanup] remove unused PathContext.conditions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jvillard authored and facebook-github-bot committed Sep 2, 2024
1 parent 4897e2b commit 26ed28a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
14 changes: 5 additions & 9 deletions infer/src/pulse/PulsePathContext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
8 changes: 1 addition & 7 deletions infer/src/pulse/PulsePathContext.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26ed28a

Please sign in to comment.