Skip to content

Commit

Permalink
Rename Digest.compatible -> accounted_for
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Dec 5, 2023
1 parent 05198f9 commit bda139f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/analyses/apron/relationPriv.apron.ml
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ struct
let get_relevant_writes (ask:Q.ask) m v =
let current = Digest.current ask in
GMutex.fold (fun k v acc ->
if Digest.compatible ask current k then
if Digest.accounted_for ask ~current ~other:k then
LRD.join acc (Cluster.keep_only_protected_globals ask m v)
else
acc
Expand Down
2 changes: 1 addition & 1 deletion src/analyses/basePriv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ struct
let current = Digest.current ask in
let is_in_Gm x _ = is_protected_by ~protection:Weak ask m x in
GMutex.fold (fun k v acc ->
if Digest.compatible ask current k then
if Digest.accounted_for ask ~current ~other:k then
CPA.join acc (CPA.filter is_in_Gm v)
else
acc
Expand Down
6 changes: 3 additions & 3 deletions src/analyses/commonPriv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ sig
include Printable.S

val current: Q.ask -> t
val compatible: Q.ask -> t -> t -> bool
val accounted_for: Q.ask -> current:t -> other:t -> bool
end

module ThreadDigest: Digest =
Expand All @@ -171,7 +171,7 @@ struct
let current (ask: Q.ask) =
ThreadId.get_current ask

let compatible (ask: Q.ask) (current: t) (other: t) =
let accounted_for (ask: Q.ask) ~(current: t) ~(other: t) =
match current, other with
| `Lifted current, `Lifted other ->
if TID.is_unique current && TID.equal current other then
Expand Down Expand Up @@ -247,7 +247,7 @@ struct
let get_relevant_writes_nofilter (ask:Q.ask) v =
let current = Digest.current ask in
GMutex.fold (fun k v acc ->
if Digest.compatible ask current k then
if Digest.accounted_for ask ~current ~other:k then
LD.join acc v
else
acc
Expand Down

0 comments on commit bda139f

Please sign in to comment.