Skip to content

Commit 999edaa

Browse files
committed
partially rename functions and variables: unique -> must_ancestor
1 parent 150ecd2 commit 999edaa

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/analyses/creationLockset.ml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ module Spec = struct
3838
@param ask any ask
3939
@param tid
4040
*)
41-
let unique_descendants_closure (ask : Queries.ask) tid =
41+
let must_ancestor_descendants_closure (ask : Queries.ask) tid =
4242
let descendants = ask.f @@ Queries.DescendantThreads tid in
43-
let unique_descendants = TIDs.filter (TID.must_be_ancestor tid) descendants in
44-
TIDs.add tid unique_descendants
43+
let must_ancestors_descendants = TIDs.filter (TID.must_be_ancestor tid) descendants in
44+
TIDs.add tid must_ancestors_descendants
4545

4646
let threadspawn man ~multiple lval f args fman =
4747
let ask = ask_of_man man in
@@ -50,26 +50,26 @@ module Spec = struct
5050
let child_tid_lifted = child_ask.f Queries.CurrentThreadId in
5151
match tid_lifted, child_tid_lifted with
5252
| `Lifted tid, `Lifted child_tid when TID.must_be_ancestor tid child_tid ->
53-
let unique_descendants = unique_descendants_closure child_ask child_tid in
53+
let must_ancestor_descendants = must_ancestor_descendants_closure child_ask child_tid in
5454
let lockset = ask.f Queries.MustLockset in
5555
let to_contribute = G.singleton tid lockset in
56-
TIDs.iter (contribute_locks man to_contribute) unique_descendants
56+
TIDs.iter (contribute_locks man to_contribute) must_ancestor_descendants
5757
| _ -> ()
5858

5959
(** compute all descendant threads that may run along with the ego thread at a program point.
6060
for all of them, tid must be an ancestor
6161
@param tid ego thread id
6262
@param ask ask of ego thread at the program point
6363
*)
64-
let get_unique_running_descendants tid (ask : Queries.ask) =
64+
let get_must_ancestor_running_descendants tid (ask : Queries.ask) =
6565
let may_created_tids = ask.f Queries.CreatedThreads in
66-
let may_unique_created_tids =
66+
let may_must_ancestor_created_tids =
6767
TIDs.filter (TID.must_be_ancestor tid) may_created_tids
6868
in
6969
let may_transitively_created_tids =
7070
TIDs.fold
71-
(fun child_tid acc -> TIDs.union acc (unique_descendants_closure ask child_tid))
72-
may_unique_created_tids
71+
(fun child_tid acc -> TIDs.union acc (must_ancestor_descendants_closure ask child_tid))
72+
may_must_ancestor_created_tids
7373
(TIDs.empty ())
7474
in
7575
let must_joined_tids = ask.f Queries.MustJoinedThreads in
@@ -101,7 +101,7 @@ module Spec = struct
101101
let tid_lifted = ask.f Queries.CurrentThreadId in
102102
(match tid_lifted with
103103
| `Lifted tid ->
104-
let possibly_running_tids = get_unique_running_descendants tid ask in
104+
let possibly_running_tids = get_must_ancestor_running_descendants tid ask in
105105
let lock_opt = LockDomain.MustLock.of_addr addr in
106106
(match lock_opt with
107107
| Some lock -> unlock man tid possibly_running_tids lock

0 commit comments

Comments
 (0)