From ceb9001935e96e269daa5ce10264cc686eda9671 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 8 Dec 2021 15:58:21 +0100 Subject: Derive iterators for Values.abs --- src/Values.ml | 27 ++++++++++++++++++++++----- 1 file 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. -- cgit v1.2.3