summaryrefslogtreecommitdiff
path: root/src/ValuesUtils.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ValuesUtils.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ValuesUtils.ml b/src/ValuesUtils.ml
index f3876f53..623703ee 100644
--- a/src/ValuesUtils.ml
+++ b/src/ValuesUtils.ml
@@ -26,6 +26,11 @@ let is_symbolic (v : value) : bool =
let as_symbolic (v : value) : symbolic_value =
match v with Symbolic s -> s | _ -> failwith "Unexpected"
+let as_mut_borrow (v : typed_value) : BorrowId.id * typed_value =
+ match v.value with
+ | Borrow (MutBorrow (bid, bv)) -> (bid, bv)
+ | _ -> failwith "Unexpected"
+
(** Check if a value contains a borrow *)
let borrows_in_value (v : typed_value) : bool =
let obj =