summaryrefslogtreecommitdiff
path: root/src/Values.ml
diff options
context:
space:
mode:
authorSon Ho2021-12-08 15:58:21 +0100
committerSon Ho2021-12-08 15:58:21 +0100
commitceb9001935e96e269daa5ce10264cc686eda9671 (patch)
treecdddaabdc2552d0255c7671e0cd723bf83f63ff7 /src/Values.ml
parent9826e2de450b4c20405e5c4779b45bba5b2693db (diff)
Derive iterators for Values.abs
Diffstat (limited to 'src/Values.ml')
-rw-r--r--src/Values.ml27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/Values.ml b/src/Values.ml
index 78923e5e..4f57f1ef 100644
--- a/src/Values.ml
+++ b/src/Values.ml
@@ -253,15 +253,32 @@ and typed_avalue = { value : avalue; ty : rty }
}]
type abs = {
- abs_id : AbstractionId.id;
- parents : AbstractionId.set_t; (** The parent abstractions *)
- acc_regions : RegionId.set_t;
+ abs_id : (AbstractionId.id[@opaque]);
+ parents : (AbstractionId.set_t[@opaque]); (** The parent abstractions *)
+ acc_regions : (RegionId.set_t[@opaque]);
(** Union of the regions owned by the (transitive) parent abstractions and
by the current abstraction *)
- regions : RegionId.set_t; (** Regions owned by this abstraction *)
+ regions : (RegionId.set_t[@opaque]); (** Regions owned by this abstraction *)
avalues : typed_avalue list; (** The values in this abstraction *)
}
-[@@deriving show]
+[@@deriving
+ show,
+ visitors
+ {
+ name = "iter_abs";
+ variety = "iter";
+ ancestors = [ "iter_typed_avalue" ];
+ nude = true (* Don't inherit [VisitorsRuntime.iter] *);
+ concrete = true;
+ },
+ visitors
+ {
+ name = "map_abs";
+ variety = "map";
+ ancestors = [ "map_typed_avalue" ];
+ nude = true (* Don't inherit [VisitorsRuntime.iter] *);
+ concrete = true;
+ }]
(** Abstractions model the parts in the borrow graph where the borrowing relations
have been abstracted because of a function call.