summaryrefslogtreecommitdiff
path: root/src/Values.ml
diff options
context:
space:
mode:
authorSon Ho2021-12-08 15:52:39 +0100
committerSon Ho2021-12-08 15:52:39 +0100
commit0f504d23898edea2158a08d1f367f5a120131ca0 (patch)
tree4cd05b1d0a89e401f0768b4e5fea2c62f935baf4 /src/Values.ml
parentfecddc900d35ae9cbf13213824b3e7e079f3a681 (diff)
Make minor modifications
Diffstat (limited to '')
-rw-r--r--src/Values.ml23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/Values.ml b/src/Values.ml
index aabd41c2..78923e5e 100644
--- a/src/Values.ml
+++ b/src/Values.ml
@@ -1,12 +1,6 @@
open Identifiers
open Types
-(** TODO: do we put the type variable/variable/region names everywhere
- (to not have to perform lookups by using the ids?)
- No: it is good not to duplicate and to use ids. This allows to split/
- make very explicit the role of variables/identifiers/binders/etc.
- *)
-
module VarId = IdGen ()
module BorrowId = IdGen ()
@@ -199,22 +193,21 @@ class ['self] map_typed_avalue_base =
method visit_rty : 'env -> rty -> rty = fun _ ty -> ty
end
+(** Abstraction values are used inside of abstractions to properly model
+ borrowing relations introduced by function calls.
+
+ When calling a function, we lose information about the borrow graph:
+ part of it is thus "abstracted" away.
+*)
type avalue =
| AConcrete of constant_value
- | AAdt of aadt_value
+ | AAdt of adt_avalue
| ABottom
| ALoan of aloan_content
| ABorrow of aborrow_content
| ASymbolic of aproj
- (** Abstraction values are used inside of abstractions to properly model
- borrowing relations introduced by function calls.
-
- When calling a function, we lose information about the borrow graph:
- part of it is thus "abstracted" away.
-*)
-(* TODO: rename to adt_avalue? *)
-and aadt_value = {
+and adt_avalue = {
variant_id : (VariantId.id option[@opaque]);
field_values : typed_avalue list;
}