diff --git a/CoqOfRust/CoqOfRust.v b/CoqOfRust/CoqOfRust.v index b3bfca405..01b171b09 100644 --- a/CoqOfRust/CoqOfRust.v +++ b/CoqOfRust/CoqOfRust.v @@ -39,69 +39,51 @@ Parameter pointer_coercion : string -> Value.t -> Value.t. (** We replace assembly blocks by this special axiom. *) Parameter InlineAssembly : Value.t. -(* Require CoqOfRust.std.arch. -Require CoqOfRust.std.ascii. -Require CoqOfRust.std.assert_matches. -Require CoqOfRust.std.async_iter. -Require CoqOfRust.std.backtrace. -Require CoqOfRust.std.char. -Require CoqOfRust.std.collections. -Require CoqOfRust.std.env. -Require CoqOfRust.std.f64. -Require CoqOfRust.std.ffi. -Require CoqOfRust.std.fs. -Require CoqOfRust.std.future. -Require CoqOfRust.std.hash. -Require CoqOfRust.std.hint. -Require CoqOfRust.std.intrinsics. -Require CoqOfRust.std.io. -(* Require CoqOfRust.std.iter. *) -(* Require CoqOfRust.std.iter_type. *) -(* Require CoqOfRust.std.net. *) -Require CoqOfRust.std.ops. -Require CoqOfRust.std.os. -Require CoqOfRust.std.panic. -Require CoqOfRust.std.panicking. -Require CoqOfRust.std.path. -Require CoqOfRust.std.pin. -Require CoqOfRust.std.prelude. -Require CoqOfRust.std.process. -Require CoqOfRust.std.simd. -Require CoqOfRust.std.str. -Require CoqOfRust.std.sync. -Require CoqOfRust.std.task. -Require CoqOfRust.std.thread. +Parameter UnsupportedLiteral : Value.t. -Module std. - Export CoqOfRust.std.arch. - Export CoqOfRust.std.ascii. - Export CoqOfRust.std.backtrace. - Export CoqOfRust.std.char. - Export CoqOfRust.std.collections. - Export CoqOfRust.std.env. - Export CoqOfRust.std.f64. - Export CoqOfRust.std.ffi. - Export CoqOfRust.std.fs. - Export CoqOfRust.std.future. - Export CoqOfRust.std.hash. - Export CoqOfRust.std.hint. - Export CoqOfRust.std.intrinsics. - Export CoqOfRust.std.io. - (* Export CoqOfRust.std.iter. *) - (* Export CoqOfRust.std.net. *) - Export CoqOfRust.std.ops. - Export CoqOfRust.std.os. - Export CoqOfRust.std.panic. - Export CoqOfRust.std.panicking. - Export CoqOfRust.std.path. - Export CoqOfRust.std.pin. - Export CoqOfRust.std.prelude. - Export CoqOfRust.std.process. - Export CoqOfRust.std.simd. - Export CoqOfRust.std.str. - Export CoqOfRust.std.sync. - Export CoqOfRust.std.task. - Export CoqOfRust.std.thread. -End std. *) +(** There is an automatic instanciation of the function traits for closures and functions. *) +Module FunctionTraitAutomaticImpl. + Axiom FunctionImplementsFn : + forall (Args : list Ty.t) (Output : Ty.t), + M.IsTraitInstance + "core::ops::function::Fn" + (Ty.function Args Output) + (* Trait polymorphic types *) [Ty.tuple Args] + (* Instance *) [ ("call", InstanceField.Method (fun τ α => + match τ, α with + | [], [self; Value.Tuple args] => + let* self := M.read self in + M.call_closure self args + | _, _ => M.impossible + end + )) ]. -Parameter UnsupportedLiteral : Value.t. + Axiom FunctionImplementsFnMut : + forall (Args : list Ty.t) (Output : Ty.t), + M.IsTraitInstance + "core::ops::function::FnMut" + (Ty.function Args Output) + (* Trait polymorphic types *) [Ty.tuple Args] + (* Instance *) [ ("call_mut", InstanceField.Method (fun τ α => + match τ, α with + | [], [self; Value.Tuple args] => + let* self := M.read self in + M.call_closure self args + | _, _ => M.impossible + end + )) ]. + + Axiom FunctionImplementsFnOnce : + forall (Args : list Ty.t) (Output : Ty.t), + M.IsTraitInstance + "core::ops::function::FnOnce" + (Ty.function Args Output) + (* Trait polymorphic types *) [Ty.tuple Args] + (* Instance *) [ ("call_once", InstanceField.Method (fun τ α => + match τ, α with + | [], [self; Value.Tuple args] => + M.call_closure self args + | _, _ => M.impossible + end + )) ]. +End FunctionTraitAutomaticImpl. diff --git a/CoqOfRust/M.v b/CoqOfRust/M.v index 89429fd89..78eb82f8a 100644 --- a/CoqOfRust/M.v +++ b/CoqOfRust/M.v @@ -108,7 +108,8 @@ Module Pointer. | Tuple (index : Z) | Array (index : Z) | StructRecord (constructor field : string) - | StructTuple (constructor : string) (index : Z). + | StructTuple (constructor : string) (index : Z) + | Owned. End Index. Module Path. @@ -117,13 +118,13 @@ Module Pointer. Module Mutable. Inductive t (Value : Set) {A : Set} (to_value : A -> Value) : Set := - | Make {Address Big_A : Set} - (address : Address) + | Make {Big_A : Set} + (address : nat) (path : Path.t) (big_to_value : Big_A -> Value) (projection : Big_A -> option A) (injection : Big_A -> A -> option Big_A). - Arguments Make {_ _ _ _ _}. + Arguments Make {_ _ _ _}. Definition get_sub {Value A Sub_A : Set} {to_value : A -> Value} (mutable : t Value to_value) @@ -156,13 +157,13 @@ Module Pointer. End Mutable. Inductive t (Value : Set) : Set := - | Immediate (value : Value) + | Immediate {A : Set} (to_value : A -> Value) (value : A) | Mutable {A : Set} {to_value : A -> Value} (mutable : Mutable.t Value to_value). - Arguments Immediate {_}. + Arguments Immediate {_ _}. Arguments Mutable {_ _ _}. - Definition mutable {Value Address A : Set} - (address : Address) + Definition mutable {Value A : Set} + (address : nat) (to_value : A -> Value) : t Value := Mutable (to_value := to_value) (Mutable.Make @@ -190,7 +191,7 @@ Module Value. (** The two existential types of the closure must be [Value.t] and [M]. We cannot enforce this constraint there yet, but we will do when defining the semantics. *) - | Closure : {'(t, M) : Set * Set @ list t -> M} -> t + | Closure : {'(Value, M) : (Set * Set) @ list Value -> M} -> t (** A special value that does not appear in the translation, but that we use to implement primitive functions over values that are not total. We statically know, from the fact that the source Rust code is well-typed, @@ -202,126 +203,100 @@ Module Value. yet. *) | DeclaredButUndefined. - (** Read the part of the value that is at a given pointer path, starting from - the main value. It might return [None] if the path does not have a shape - compatible with the value. *) - Fixpoint read_path (value : Value.t) (path : Pointer.Path.t) : - option Value.t := - match path with - | [] => Some value - | Pointer.Index.Tuple index :: path => + (** Read the part of the value that is at a given pointer index. It might return [None] if the + index does not have a shape compatible with the value. *) + Definition read_path (value : Value.t) (index : Pointer.Index.t) : option Value.t := + match index with + | Pointer.Index.Tuple index => match value with - | Tuple fields => - match List.nth_error fields (Z.to_nat index) with - | Some value => read_path value path - | None => None - end + | Tuple fields => List.nth_error fields (Z.to_nat index) | _ => None end - | Pointer.Index.Array index :: path => + | Pointer.Index.Array index => match value with - | Array fields => - match List.nth_error fields (Z.to_nat index) with - | Some value => read_path value path - | None => None - end + | Array fields => List.nth_error fields (Z.to_nat index) | _ => None end - | Pointer.Index.StructRecord constructor field :: path => + | Pointer.Index.StructRecord constructor field => match value with | StructRecord c fields => if String.eqb c constructor then - match List.assoc fields field with - | Some value => read_path value path - | None => None - end + List.assoc fields field else None | _ => None end - | Pointer.Index.StructTuple constructor index :: path => + | Pointer.Index.StructTuple constructor index => match value with | StructTuple c fields => if String.eqb c constructor then - match List.nth_error fields (Z.to_nat index) with - | Some value => read_path value path - | None => None - end + List.nth_error fields (Z.to_nat index) else None | _ => None end + | Pointer.Index.Owned => + match value with + | Pointer (Pointer.Immediate to_value value) => Some (to_value value) + | _ => None + end end. - (** Update the part of a value at a certain [path], and return [None] if the - path is of invalid shape. *) - Fixpoint write_value - (value : Value.t) (path : Pointer.Path.t) (update : Value.t) : + (** Update the part of a value at a certain [index], and return [None] if the index is of invalid + shape. *) + Definition write_value {A : Set} + (value : Value.t) (index : Pointer.Index.t) + (update_to_value : A -> Value.t) (update : A) : option Value.t := - match path with - | [] => Some update - | Pointer.Index.Tuple index :: path => + match index with + | Pointer.Index.Tuple index => match value with | Tuple fields => match List.nth_error fields (Z.to_nat index) with - | Some value => - match write_value value path update with - | Some value => - Some (Tuple (List.replace_at fields (Z.to_nat index) value)) - | None => None - end + | Some value => Some (Tuple (List.replace_at fields (Z.to_nat index) value)) | None => None end | _ => None end - | Pointer.Index.Array index :: path => + | Pointer.Index.Array index => match value with | Array fields => match List.nth_error fields (Z.to_nat index) with - | Some value => - match write_value value path update with - | Some value => - Some (Array (List.replace_at fields (Z.to_nat index) value)) - | None => None - end + | Some value => Some (Array (List.replace_at fields (Z.to_nat index) value)) | None => None end | _ => None end - | Pointer.Index.StructRecord constructor field :: path => + | Pointer.Index.StructRecord constructor field => match value with | StructRecord c fields => if String.eqb c constructor then match List.assoc fields field with - | Some value => - match write_value value path update with - | Some value => - Some (StructRecord c (List.assoc_replace fields field value)) - | None => None - end + | Some value => Some (StructRecord c (List.assoc_replace fields field value)) | None => None end else None | _ => None end - | Pointer.Index.StructTuple constructor index :: path => + | Pointer.Index.StructTuple constructor index => match value with | StructTuple c fields => if String.eqb c constructor then match List.nth_error fields (Z.to_nat index) with - | Some value => - match write_value value path update with - | Some value => - Some (StructTuple c (List.replace_at fields (Z.to_nat index) value)) - | None => None - end + | Some value => Some (StructTuple c (List.replace_at fields (Z.to_nat index) value)) | None => None end else None | _ => None end + | Pointer.Index.Owned => + match value with + | Pointer (Pointer.Immediate _ _) => + Some (Pointer (Pointer.Immediate update_to_value update)) + | _ => None + end end. (** Equality between values. Defined only for basic types. *) @@ -357,15 +332,11 @@ End Value. Module Primitive. Inductive t : Set := | StateAlloc (value : Value.t) - | StateRead {A : Set} {to_value : A -> Value.t} - (mutable : Pointer.Mutable.t Value.t to_value) + | StateRead (pointer : Pointer.t Value.t) | StateWrite {A : Set} {to_value : A -> Value.t} (mutable : Pointer.Mutable.t Value.t to_value) (value : Value.t) - | GetSubPointer {A : Set} {to_value : A -> Value.t} - (mutable : Pointer.Mutable.t Value.t to_value) - (index : Pointer.Index.t) - | EnvRead + | GetSubPointer (pointer : Pointer.t Value.t) (index : Pointer.Index.t) | GetFunction (path : string) (generic_tys : list Ty.t) | GetAssociatedFunction (ty : Ty.t) (name : string) (generic_tys : list Ty.t) | GetTraitMethod @@ -381,11 +352,13 @@ Module LowM. | Pure (value : A) | CallPrimitive (primitive : Primitive.t) (k : Value.t -> t A) | CallClosure (closure : Value.t) (args : list Value.t) (k : A -> t A) + | Let (e : t A) (k : A -> t A) | Loop (body : t A) (k : A -> t A) | Impossible. Arguments Pure {_}. Arguments CallPrimitive {_}. Arguments CallClosure {_}. + Arguments Let {_}. Arguments Loop {_}. Arguments Impossible {_}. @@ -396,6 +369,8 @@ Module LowM. CallPrimitive primitive (fun v => let_ (k v) e2) | CallClosure f args k => CallClosure f args (fun v => let_ (k v) e2) + | Let e k => + Let e (fun v => let_ (k v) e2) | Loop body k => Loop body (fun v => let_ (k v) e2) | Impossible => Impossible @@ -428,6 +403,16 @@ Definition let_ (e1 : M) (e2 : Value.t -> M) : M := | inr error => LowM.Pure (inr error) end). +Definition let_user (e1 : Value.t) (e2 : Value.t -> Value.t) : Value.t := + e2 e1. + +Definition let_user_monadic (e1 : M) (e2 : Value.t -> M) : M := + LowM.Let e1 (fun v1 => + match v1 with + | inl v1 => e2 v1 + | inr error => LowM.Pure (inr error) + end). + Module InstanceField. Inductive t : Set := | Constant (constant : Value.t) @@ -508,6 +493,14 @@ Module Notations. (let_ b (fun a => c)) (at level 200, a pattern, b at level 100, c at level 200). + Notation "'let~' a := b 'in' c" := + (let_user b (fun a => c)) + (at level 200, b at level 100, a name). + + Notation "'let*~' a := b 'in' c" := + (let_user_monadic b (fun a => c)) + (at level 200, b at level 100, a name). + Notation "e (| e1 , .. , en |)" := (run ((.. (e e1) ..) en)) (at level 100). @@ -523,7 +516,7 @@ Import Notations. explicit names for all intermediate computation results. *) Ltac monadic e := lazymatch e with - | context ctxt [let v : _ := ?x in @?f v] => + | context ctxt [let v := ?x in @?f v] => refine (let_ _ _); [ monadic x | let v' := fresh v in @@ -541,6 +534,26 @@ Ltac monadic e := ] end ] + (* We uses the `let~` notation for lets that come from the source code, in order to keep this + abstraction barrier. *) + | context ctxt [let~ v := ?x in @?f v] => + refine (let_user_monadic _ _); + [ monadic x + | let v' := fresh v in + intro v'; + let y := (eval cbn beta in (f v')) in + lazymatch context ctxt [let v := x in y] with + | let _ := x in y => monadic y + | _ => + refine (let_ _ _); + [ monadic y + | let w := fresh "v" in + intro w; + let z := context ctxt [w] in + monadic z + ] + end + ] | context ctxt [run ?x] => lazymatch context ctxt [run x] with | run x => monadic x @@ -595,15 +608,19 @@ Definition alloc (v : Value.t) : M := Definition read (r : Value.t) : M := match r with - | Value.Pointer (Pointer.Immediate v) => LowM.Pure (inl v) - | Value.Pointer (Pointer.Mutable mutable) => - call_primitive (Primitive.StateRead mutable) + | Value.Pointer pointer => + let* value := call_primitive (Primitive.StateRead pointer) in + match value with + | Value.Pointer (Pointer.Immediate _ _) => + call_primitive (Primitive.GetSubPointer pointer Pointer.Index.Owned) + | _ => pure value + end | _ => impossible end. Definition write (r : Value.t) (update : Value.t) : M := match r with - | Value.Pointer (Pointer.Immediate _) => impossible + | Value.Pointer (Pointer.Immediate _ _) => impossible | Value.Pointer (Pointer.Mutable mutable) => call_primitive (Primitive.StateWrite mutable update) | _ => impossible @@ -615,21 +632,13 @@ Definition copy (r : Value.t) : M := (** If we cannot get the sub-pointer, due to a field that does not exist or to an out-of bound access in an array, we do a [break_match]. *) +(* TODO: check that this is indeed the case *) Definition get_sub_pointer (r : Value.t) (index : Pointer.Index.t) : M := match r with - | Value.Pointer (Pointer.Immediate v) => - match Value.read_path v [index] with - | Some v => alloc v - | None => break_match - end - | Value.Pointer (Pointer.Mutable mutable) => - call_primitive (Primitive.GetSubPointer mutable index) + | Value.Pointer pointer => call_primitive (Primitive.GetSubPointer pointer index) | _ => impossible end. -Definition read_env : M := - call_primitive Primitive.EnvRead. - Parameter get_constant : string -> M. Definition get_function (path : string) (generic_tys : list Ty.t) : M := @@ -783,6 +792,16 @@ Definition is_constant_or_break_match (value expected_value : Value.t) : M := else break_match. +Definition is_struct_tuple (value : Value.t) (constructor : string) : M := + match value with + | Value.StructTuple current_constructor _ => + if String.eqb current_constructor constructor then + pure (Value.Tuple []) + else + break_match + | _ => break_match + end. + Parameter pointer_coercion : Value.t -> Value.t. (** This function is explicitely called in the Rust AST, and should take two @@ -791,7 +810,7 @@ Parameter pointer_coercion : Value.t -> Value.t. Parameter rust_cast : Value.t -> Value.t. Definition closure (f : list Value.t -> M) : Value.t := - Value.Closure (existS (Value.t, M) f). + Value.Closure (existS (_, _) f). Definition constructor_as_closure (constructor : string) : Value.t := closure (fun args => diff --git a/CoqOfRust/alloc/alloc.v b/CoqOfRust/alloc/alloc.v index 01284b716..768357db2 100644 --- a/CoqOfRust/alloc/alloc.v +++ b/CoqOfRust/alloc/alloc.v @@ -120,7 +120,7 @@ Module alloc. ltac:(M.monadic (let layout := M.alloc (| layout |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read_volatile", [ Ty.path "u8" ] |), @@ -314,7 +314,7 @@ Module alloc. fun γ => ltac:(M.monadic (let size := M.copy (| γ |) in - let raw_ptr := + let~ raw_ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -344,7 +344,7 @@ Module alloc. ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -532,7 +532,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -541,7 +541,7 @@ Module alloc. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -661,7 +661,7 @@ Module alloc. |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -672,7 +672,7 @@ Module alloc. [ new_layout ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -690,7 +690,7 @@ Module alloc. ] |) |) in - let raw_ptr := + let~ raw_ptr := M.alloc (| M.call_closure (| M.get_function (| "alloc::alloc::realloc", [] |), @@ -710,7 +710,7 @@ Module alloc. ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -815,7 +815,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -827,7 +827,7 @@ Module alloc. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -845,11 +845,10 @@ Module alloc. [ M.read (| raw_ptr |); M.read (| old_size |) ] |); Value.Integer 0; - BinOp.Panic.sub (| - Integer.Usize, - M.read (| new_size |), - M.read (| old_size |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| new_size |)) + (M.read (| old_size |)) ] |) |) in @@ -876,7 +875,7 @@ Module alloc. fun γ => ltac:(M.monadic (let old_size := M.copy (| γ |) in - let new_ptr := + let~ new_ptr := M.copy (| M.match_operator (| M.alloc (| @@ -967,7 +966,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1001,7 +1000,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1244,7 +1243,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1253,7 +1252,7 @@ Module alloc. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1338,7 +1337,7 @@ Module alloc. ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1402,7 +1401,7 @@ Module alloc. |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -1420,7 +1419,7 @@ Module alloc. ] |) |) in - let raw_ptr := + let~ raw_ptr := M.alloc (| M.call_closure (| M.get_function (| "alloc::alloc::realloc", [] |), @@ -1440,7 +1439,7 @@ Module alloc. ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -1564,7 +1563,7 @@ Module alloc. fun γ => ltac:(M.monadic (let new_size := M.copy (| γ |) in - let new_ptr := + let~ new_ptr := M.copy (| M.match_operator (| M.alloc (| @@ -1653,7 +1652,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1687,7 +1686,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1742,7 +1741,7 @@ Module alloc. (let size := M.alloc (| size |) in let align := M.alloc (| align |) in M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2094,7 +2093,7 @@ Module alloc. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "write", [] |), @@ -2138,7 +2137,7 @@ Module alloc. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/borrow.v b/CoqOfRust/alloc/borrow.v index 4d48f3eb8..bfbd0b326 100644 --- a/CoqOfRust/alloc/borrow.v +++ b/CoqOfRust/alloc/borrow.v @@ -47,7 +47,7 @@ Module borrow. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| target |), M.call_closure (| @@ -101,7 +101,7 @@ Module borrow. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", T, [], "clone_from", [] |), @@ -188,7 +188,7 @@ Module borrow. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "alloc::borrow::Cow::Owned", 0 |) in let o := M.alloc (| γ0_0 |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -425,7 +425,7 @@ Module borrow. let borrowed := M.copy (| γ0_0 |) in M.alloc (| M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple @@ -450,7 +450,9 @@ Module borrow. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "alloc::borrow::Cow::Borrowed" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), @@ -1045,7 +1047,7 @@ Module borrow. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1090,7 +1092,7 @@ Module borrow. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1188,7 +1190,7 @@ Module borrow. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1202,7 +1204,7 @@ Module borrow. 0 |) in let lhs := M.copy (| γ0_0 |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1211,29 +1213,28 @@ Module borrow. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| lhs |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| rhs |) ] - |) - |) + |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1244,7 +1245,7 @@ Module borrow. [ s; M.read (| lhs |) ] |) |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple @@ -1255,7 +1256,7 @@ Module borrow. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1375,7 +1376,7 @@ Module borrow. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1389,7 +1390,7 @@ Module borrow. 0 |) in let lhs := M.copy (| γ0_0 |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1398,17 +1399,17 @@ Module borrow. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| lhs |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", @@ -1428,12 +1429,11 @@ Module borrow. [ rhs ] |) ] - |) - |) + |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1444,7 +1444,7 @@ Module borrow. [ s; M.read (| lhs |) ] |) |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple @@ -1455,7 +1455,7 @@ Module borrow. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/boxed.v b/CoqOfRust/alloc/boxed.v index 16015763c..ba6501058 100644 --- a/CoqOfRust/alloc/boxed.v +++ b/CoqOfRust/alloc/boxed.v @@ -254,7 +254,7 @@ Module boxed. (let x := M.alloc (| x |) in let alloc := M.alloc (| alloc |) in M.read (| - let boxed := + let~ boxed := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -265,7 +265,7 @@ Module boxed. [ M.read (| alloc |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "write", [] |), @@ -324,7 +324,7 @@ Module boxed. M.catch_return (| ltac:(M.monadic (M.read (| - let boxed := + let~ boxed := M.copy (| M.match_operator (| M.alloc (| @@ -411,7 +411,7 @@ Module boxed. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "write", [] |), @@ -474,7 +474,7 @@ Module boxed. ltac:(M.monadic (let alloc := M.alloc (| alloc |) in M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -548,7 +548,7 @@ Module boxed. M.catch_return (| ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -578,7 +578,7 @@ Module boxed. |))); fun γ => ltac:(M.monadic - (let layout := + (let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -761,7 +761,7 @@ Module boxed. ltac:(M.monadic (let alloc := M.alloc (| alloc |) in M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -835,7 +835,7 @@ Module boxed. M.catch_return (| ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -865,7 +865,7 @@ Module boxed. |))); fun γ => ltac:(M.monadic - (let layout := + (let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1278,7 +1278,7 @@ Module boxed. ltac:(M.monadic (let b := M.alloc (| b |) in M.read (| - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ A ] |), @@ -1534,7 +1534,7 @@ Module boxed. M.catch_return (| ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1566,7 +1566,7 @@ Module boxed. |))); fun γ => ltac:(M.monadic - (let layout := + (let~ layout := M.copy (| M.match_operator (| M.alloc (| @@ -1805,7 +1805,7 @@ Module boxed. M.catch_return (| ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1837,7 +1837,7 @@ Module boxed. |))); fun γ => ltac:(M.monadic - (let layout := + (let~ layout := M.copy (| M.match_operator (| M.alloc (| @@ -2208,7 +2208,7 @@ Module boxed. (let boxed := M.alloc (| boxed |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2338,11 +2338,11 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.copy (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "alloc::boxed::Box", 0 |) |) in - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2384,7 +2384,7 @@ Module boxed. (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2497,7 +2497,7 @@ Module boxed. | [], [] => ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.alloc (| (* Unsize *) M.pointer_coercion @@ -2549,9 +2549,9 @@ Module boxed. | [], [] => ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.copy (| - let bytes := + let~ bytes := M.alloc (| (* Unsize *) M.pointer_coercion @@ -2626,7 +2626,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let boxed := + let~ boxed := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2648,7 +2648,7 @@ Module boxed. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2700,7 +2700,7 @@ Module boxed. (let self := M.alloc (| self |) in let source := M.alloc (| source |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", T, [], "clone_from", [] |), @@ -2742,7 +2742,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3009,7 +3009,7 @@ Module boxed. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ H ] |), @@ -3501,14 +3501,14 @@ Module boxed. ltac:(M.monadic (let slice := M.alloc (| slice |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] |) |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3521,7 +3521,7 @@ Module boxed. [ M.read (| len |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -3970,7 +3970,7 @@ Module boxed. ltac:(M.monadic (let boxed_slice := M.alloc (| boxed_slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3978,7 +3978,7 @@ Module boxed. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -4024,7 +4024,7 @@ Module boxed. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -4232,7 +4232,7 @@ Module boxed. (M.read (| M.get_constant (| "alloc::boxed::N" |) |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let boxed_slice := + let~ boxed_slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4363,7 +4363,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4371,7 +4371,7 @@ Module boxed. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4529,7 +4529,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4537,7 +4537,7 @@ Module boxed. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4696,7 +4696,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4704,7 +4704,7 @@ Module boxed. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4868,7 +4868,7 @@ Module boxed. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let ptr := M.alloc (| M.read (| M.read (| self |) |) |) in + let~ ptr := M.alloc (| M.read (| M.read (| self |) |) |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5499,7 +5499,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), @@ -5584,7 +5584,7 @@ Module boxed. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5598,7 +5598,7 @@ Module boxed. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6107,7 +6107,7 @@ Module boxed. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let raw := + let~ raw := M.alloc (| (* Unsize *) M.pointer_coercion @@ -6170,7 +6170,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let err := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |) in + let~ err := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6288,7 +6288,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let err := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |) in + let~ err := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| self |)) |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6553,7 +6553,7 @@ Module boxed. (* Unsize *) M.pointer_coercion (M.read (| - let err1 := + let~ err1 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6571,7 +6571,7 @@ Module boxed. [ M.read (| str_err |) ] |) |) in - let err2 := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| err1 |)) |) in + let~ err2 := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| err1 |)) |) in M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| err2 |)) |) |)))) | _, _ => M.impossible @@ -6853,7 +6853,7 @@ Module boxed. (let self := M.alloc (| self |) in let request := M.alloc (| request |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::error::Error", T, [], "provide", [] |), diff --git a/CoqOfRust/alloc/boxed/thin.v b/CoqOfRust/alloc/boxed/thin.v index cd16ea033..1b96ebe0f 100644 --- a/CoqOfRust/alloc/boxed/thin.v +++ b/CoqOfRust/alloc/boxed/thin.v @@ -55,14 +55,14 @@ Module boxed. ltac:(M.monadic (let value := M.alloc (| value |) in M.read (| - let meta := + let~ meta := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::metadata::metadata", [ T ] |), [ value ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -214,14 +214,14 @@ Module boxed. ltac:(M.monadic (let value := M.alloc (| value |) in M.read (| - let meta := + let~ meta := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::metadata::metadata", [ Dyn ] |), [ M.read (| M.use (M.alloc (| (* Unsize *) M.pointer_coercion value |)) |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -356,7 +356,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -367,7 +367,7 @@ Module boxed. [ M.read (| self |) ] |) |) in - let metadata := + let~ metadata := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -378,7 +378,7 @@ Module boxed. [ M.read (| self |) ] |) |) in - let pointer := + let~ pointer := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::metadata::from_raw_parts", [ T ] |), @@ -418,7 +418,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -429,7 +429,7 @@ Module boxed. [ M.read (| self |) ] |) |) in - let metadata := + let~ metadata := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -440,7 +440,7 @@ Module boxed. [ M.read (| self |) ] |) |) in - let pointer := + let~ pointer := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::metadata::from_raw_parts_mut", [ T ] |), @@ -480,7 +480,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let value := + let~ value := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -493,8 +493,8 @@ Module boxed. [ M.read (| self |) ] |) |) in - let value := M.copy (| M.use (M.alloc (| M.read (| value |) |)) |) in - let _ := + let~ value := M.copy (| M.use (M.alloc (| M.read (| value |) |)) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -564,7 +564,7 @@ Module boxed. (let header := M.alloc (| header |) in let value := M.alloc (| value |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -649,7 +649,7 @@ Module boxed. (let header := M.alloc (| header |) in let value := M.alloc (| value |) in M.read (| - let value_layout := + let~ value_layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -684,7 +684,7 @@ Module boxed. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let layout := M.copy (| γ1_0 |) in let value_offset := M.copy (| γ1_1 |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -710,7 +710,7 @@ Module boxed. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -722,7 +722,7 @@ Module boxed. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -793,14 +793,14 @@ Module boxed. |))); fun γ => ltac:(M.monadic - (let ptr := + (let~ ptr := M.alloc (| M.call_closure (| M.get_function (| "alloc::alloc::alloc", [] |), [ M.read (| layout |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -837,7 +837,7 @@ Module boxed. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -864,13 +864,13 @@ Module boxed. ] |) |) in - let result := + let~ result := M.alloc (| Value.StructTuple "alloc::boxed::thin::WithHeader" [ M.read (| ptr |); Value.StructTuple "core::marker::PhantomData" [] ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ H ] |), @@ -887,7 +887,7 @@ Module boxed. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -974,7 +974,7 @@ Module boxed. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _guard := + let~ _guard := M.alloc (| Value.StructRecord "alloc::boxed::thin::drop::DropGuard" @@ -999,7 +999,7 @@ Module boxed. ("_marker", Value.StructTuple "core::marker::PhantomData" []) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::drop_in_place", [ T ] |), @@ -1036,7 +1036,7 @@ Module boxed. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let hp := + let~ hp := M.alloc (| M.rust_cast (M.call_closure (| @@ -1073,7 +1073,7 @@ Module boxed. ] |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1082,7 +1082,7 @@ Module boxed. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/alloc/collections/binary_heap/mod.v b/CoqOfRust/alloc/collections/binary_heap/mod.v index dda500ce1..eb1c496b7 100644 --- a/CoqOfRust/alloc/collections/binary_heap/mod.v +++ b/CoqOfRust/alloc/collections/binary_heap/mod.v @@ -152,7 +152,7 @@ Module collections. 0 |) in let original_len := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -183,7 +183,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -243,7 +243,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -252,7 +252,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -394,7 +394,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -403,7 +403,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -458,7 +458,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -477,7 +477,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -488,7 +488,7 @@ Module collections. (M.alloc (| BinOp.Pure.gt (M.read (| len |)) (Value.Integer 1) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -508,7 +508,7 @@ Module collections. |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -608,7 +608,7 @@ Module collections. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -640,7 +640,7 @@ Module collections. 0 |) in let original_len := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -763,7 +763,7 @@ Module collections. (let self := M.alloc (| self |) in let source := M.alloc (| source |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -940,7 +940,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1223,7 +1223,7 @@ Module collections. ltac:(M.monadic (let item := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1250,7 +1250,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", [ T ] |), @@ -1278,7 +1278,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1328,7 +1328,7 @@ Module collections. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1339,7 +1339,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1357,7 +1357,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1405,7 +1405,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1416,7 +1416,7 @@ Module collections. [ self ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1431,14 +1431,14 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := end_ in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := - let ptr := + let~ _ := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1455,7 +1455,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::swap", [ T ] |), @@ -1473,7 +1473,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1492,7 +1492,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1552,7 +1552,7 @@ Module collections. let start := M.alloc (| start |) in let pos := M.alloc (| pos |) in M.read (| - let hole := + let~ hole := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1581,7 +1581,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1607,13 +1607,13 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let parent := + let~ parent := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") @@ -1622,13 +1622,11 @@ Module collections. [] |), [ hole ] - |), - Value.Integer 1 - |), - Value.Integer 2 - |) + |)) + (Value.Integer 1)) + (Value.Integer 2) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1686,7 +1684,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1705,7 +1703,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1781,7 +1779,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let hole := + let~ hole := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1810,26 +1808,24 @@ Module collections. ] |) |) in - let child := + let~ child := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") [ T ], "pos", [] |), [ hole ] - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1856,14 +1852,14 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := child in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", @@ -1898,19 +1894,17 @@ Module collections. |), [ hole; - BinOp.Panic.add (| - Integer.Usize, - M.read (| child |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| child |)) + (Value.Integer 1) ] |) |) ] - |)) - |) + |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1970,7 +1964,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1983,15 +1977,15 @@ Module collections. [ hole; M.read (| child |) ] |) |) in - let _ := + let~ _ := M.write (| child, - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") @@ -2000,10 +1994,8 @@ Module collections. [] |), [ hole ] - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2011,7 +2003,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2033,11 +2025,10 @@ Module collections. LogicalOp.and (| BinOp.Pure.eq (M.read (| child |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - Value.Integer 1 - |)), + (BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (Value.Integer 1)), ltac:(M.monadic (M.call_closure (| M.get_trait_method (| @@ -2078,7 +2069,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2118,7 +2109,7 @@ Module collections. (let self := M.alloc (| self |) in let pos := M.alloc (| pos |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2129,7 +2120,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2194,7 +2185,7 @@ Module collections. (let self := M.alloc (| self |) in let pos := M.alloc (| pos |) in M.read (| - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2205,8 +2196,8 @@ Module collections. [ M.read (| self |) ] |) |) in - let start := M.copy (| pos |) in - let hole := + let~ start := M.copy (| pos |) in + let~ hole := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2235,26 +2226,24 @@ Module collections. ] |) |) in - let child := + let~ child := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") [ T ], "pos", [] |), [ hole ] - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2278,14 +2267,14 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := child in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", @@ -2318,19 +2307,17 @@ Module collections. |), [ hole; - BinOp.Panic.add (| - Integer.Usize, - M.read (| child |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| child |)) + (Value.Integer 1) ] |) |) ] - |)) - |) + |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2343,15 +2330,15 @@ Module collections. [ hole; M.read (| child |) ] |) |) in - let _ := + let~ _ := M.write (| child, - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::Hole") @@ -2360,10 +2347,8 @@ Module collections. [] |), [ hole ] - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2371,7 +2356,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -2380,7 +2365,7 @@ Module collections. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2391,15 +2376,11 @@ Module collections. (M.alloc (| BinOp.Pure.eq (M.read (| child |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub Integer.Usize (M.read (| end_ |)) (Value.Integer 1)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2414,7 +2395,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| pos, M.call_closure (| @@ -2426,7 +2407,7 @@ Module collections. [ hole ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2436,7 +2417,7 @@ Module collections. [ M.read (| hole |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2503,7 +2484,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2533,11 +2514,11 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let tail_len := + let~ tail_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") @@ -2546,11 +2527,10 @@ Module collections. [] |), [ M.read (| self |) ] - |), - M.read (| start |) - |) + |)) + (M.read (| start |)) |) in - let better_to_rebuild := + let~ better_to_rebuild := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2599,10 +2579,10 @@ Module collections. |) in M.alloc (| BinOp.Pure.lt - (BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.call_closure (| + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -2612,29 +2592,27 @@ Module collections. [] |), [ M.read (| self |) ] - |) - |)) - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| tail_len |), - M.call_closure (| + |))) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| tail_len |)) + (M.call_closure (| M.get_associated_function (| Self, "log2_fast.rebuild_tail", [] |), [ M.read (| start |) ] - |) - |)) + |))) |))); fun γ => ltac:(M.monadic (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.call_closure (| + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -2644,13 +2622,11 @@ Module collections. [] |), [ M.read (| self |) ] - |) - |)) - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| tail_len |), - Value.Integer 11 - |)) + |))) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| tail_len |)) + (Value.Integer 11)) |))) ] |))) @@ -2665,7 +2641,7 @@ Module collections. (let γ := M.use better_to_rebuild in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2721,7 +2697,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2740,7 +2716,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2752,7 +2733,7 @@ Module collections. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2807,20 +2788,19 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::binary_heap::BinaryHeap") [ T; A ], "len", [] |), [ M.read (| self |) ] - |), - Value.Integer 2 - |) + |)) + (Value.Integer 2) |) in M.loop (| ltac:(M.monadic @@ -2834,13 +2814,13 @@ Module collections. (M.alloc (| BinOp.Pure.gt (M.read (| n |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2859,7 +2839,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -2897,7 +2877,7 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2930,7 +2910,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2948,7 +2928,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let start := + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2965,7 +2945,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2987,7 +2967,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3056,7 +3036,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::collections::binary_heap::RebuildOnDrop" @@ -3075,8 +3055,8 @@ Module collections. ("heap", M.read (| self |)) ] |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3108,7 +3088,7 @@ Module collections. ltac:(M.monadic (let e := M.copy (| γ |) in M.read (| - let keep := + let~ keep := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3121,7 +3101,7 @@ Module collections. [ f; Value.Tuple [ M.read (| e |) ] ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3149,7 +3129,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| guard, @@ -3163,15 +3143,14 @@ Module collections. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in keep |))) @@ -3344,7 +3323,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3384,7 +3363,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3491,7 +3470,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3753,7 +3732,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3807,7 +3786,7 @@ Module collections. (let data := M.alloc (| data |) in let pos := M.alloc (| pos |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3816,7 +3795,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3861,7 +3840,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let elt := + let~ elt := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), @@ -3976,7 +3955,7 @@ Module collections. (let self := M.alloc (| self |) in let index := M.alloc (| index |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3985,7 +3964,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4029,7 +4008,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4038,7 +4017,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4139,7 +4118,7 @@ Module collections. (let self := M.alloc (| self |) in let index := M.alloc (| index |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4148,7 +4127,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4192,7 +4171,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4201,7 +4180,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4254,8 +4233,8 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let ptr := + let~ _ := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4274,7 +4253,7 @@ Module collections. ] |) |) in - let index_ptr := + let~ index_ptr := M.alloc (| (* MutToConstPointer *) M.pointer_coercion @@ -4283,7 +4262,7 @@ Module collections. [ M.read (| ptr |); M.read (| index |) ] |)) |) in - let hole_ptr := + let~ hole_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -4299,7 +4278,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -4307,7 +4286,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4346,7 +4325,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pos := + let~ pos := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4354,7 +4333,7 @@ Module collections. "pos" |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -5462,7 +5441,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let exact := + let~ exact := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5972,20 +5951,20 @@ Module collections. 0 |) in let item := M.copy (| γ0_0 |) in - let guard := + let~ guard := M.alloc (| Value.StructTuple "alloc::collections::binary_heap::drop::DropGuard" [ M.read (| self |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::drop", [ T ] |), [ M.read (| item |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6005,7 +5984,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -6077,7 +6056,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let exact := + let~ exact := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6178,13 +6157,13 @@ Module collections. ltac:(M.monadic (let vec := M.alloc (| vec |) in M.read (| - let heap := + let~ heap := M.alloc (| Value.StructRecord "alloc::collections::binary_heap::BinaryHeap" [ ("data", M.read (| vec |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6476,7 +6455,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::collections::binary_heap::RebuildOnDrop" @@ -6495,7 +6474,7 @@ Module collections. ("heap", M.read (| self |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6539,7 +6518,7 @@ Module collections. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6568,7 +6547,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6615,7 +6594,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6677,7 +6656,7 @@ Module collections. (let γ := M.read (| γ |) in let item := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6710,7 +6689,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/append.v b/CoqOfRust/alloc/collections/btree/append.v index 3bea5168d..306616f79 100644 --- a/CoqOfRust/alloc/collections/btree/append.v +++ b/CoqOfRust/alloc/collections/btree/append.v @@ -44,7 +44,7 @@ Module collections. let length := M.alloc (| length |) in let alloc := M.alloc (| alloc |) in M.read (| - let iter := + let~ iter := M.alloc (| Value.StructTuple "alloc::collections::btree::append::MergeIter" @@ -160,7 +160,7 @@ Module collections. let length := M.alloc (| length |) in let alloc := M.alloc (| alloc |) in M.read (| - let cur_node := + let~ cur_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -216,7 +216,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -237,7 +237,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -254,7 +254,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -269,7 +274,7 @@ Module collections. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let key := M.copy (| γ1_0 |) in let value := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -308,7 +313,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -336,9 +341,9 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let open_node := + (let~ open_node := M.copy (| Value.DeclaredButUndefined |) in - let test_node := + let~ test_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -359,7 +364,7 @@ Module collections. [ M.read (| cur_node |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -393,7 +398,7 @@ Module collections. 0 |) in let parent := M.copy (| γ0_0 |) in - let parent := + let~ parent := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -462,7 +467,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| open_node, M.read (| @@ -475,7 +480,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| test_node, M.call_closure (| @@ -517,7 +522,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| open_node, M.call_closure (| @@ -558,11 +563,11 @@ Module collections. ] |))) |) in - let tree_height := + let~ tree_height := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -579,11 +584,10 @@ Module collections. [] |), [ open_node ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let right_tree := + let~ right_tree := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -615,7 +619,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -647,7 +651,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -667,7 +671,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -682,7 +691,7 @@ Module collections. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -724,7 +733,7 @@ Module collections. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -750,7 +759,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| cur_node, M.call_closure (| @@ -820,15 +829,14 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.read (| length |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -837,7 +845,7 @@ Module collections. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/borrow.v b/CoqOfRust/alloc/collections/btree/borrow.v index 2aecd7330..a3603bbf8 100644 --- a/CoqOfRust/alloc/collections/btree/borrow.v +++ b/CoqOfRust/alloc/collections/btree/borrow.v @@ -62,7 +62,7 @@ Module collections. ltac:(M.monadic (let t := M.alloc (| t |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -75,7 +75,7 @@ Module collections. [ M.read (| t |) ] |) |) in - let new_ref := + let~ new_ref := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v b/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v index 85155e834..9e3cd6b15 100644 --- a/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v +++ b/CoqOfRust/alloc/collections/btree/dedup_sorted_iter.v @@ -92,7 +92,7 @@ Module collections. M.read (| M.loop (| ltac:(M.monadic - (let next := + (let~ next := M.copy (| M.match_operator (| M.alloc (| @@ -128,7 +128,9 @@ Module collections. next)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -140,7 +142,7 @@ Module collections. ] |) |) in - let peeked := + let~ peeked := M.copy (| M.match_operator (| M.alloc (| @@ -174,7 +176,9 @@ Module collections. peeked)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| diff --git a/CoqOfRust/alloc/collections/btree/fix.v b/CoqOfRust/alloc/collections/btree/fix.v index fb0edbcb6..e0b6b589c 100644 --- a/CoqOfRust/alloc/collections/btree/fix.v +++ b/CoqOfRust/alloc/collections/btree/fix.v @@ -62,7 +62,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -163,7 +163,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let parent := + let~ parent := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -188,7 +188,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -201,15 +201,14 @@ Module collections. |), [ left_parent_kv; - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - M.read (| len |) - |) + |)) + (M.read (| len |)) ] |) |) in @@ -260,7 +259,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let parent := + let~ parent := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -285,7 +284,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -298,15 +297,14 @@ Module collections. |), [ right_parent_kv; - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - M.read (| len |) - |) + |)) + (M.read (| len |)) ] |) |) in @@ -468,6 +466,8 @@ Module collections. "core::result::Result::Ok", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.Bool true |) |) @@ -584,7 +584,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -621,7 +621,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -655,7 +655,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -708,7 +708,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -771,7 +771,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -819,7 +819,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -872,7 +872,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -935,7 +935,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -995,7 +995,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let cur_node := + let~ cur_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1046,7 +1046,7 @@ Module collections. 0 |) in let internal := M.copy (| γ0_0 |) in - let last_kv := + let~ last_kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1087,7 +1087,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1099,7 +1099,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1121,15 +1121,14 @@ Module collections. |), [ last_kv ] |)) - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| + (BinOp.Wrap.mul + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - Value.Integer 2 - |))) + |)) + (Value.Integer 2))) |)) in let _ := M.is_constant_or_break_match (| @@ -1159,7 +1158,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let right_child_len := + let~ right_child_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1172,7 +1171,7 @@ Module collections. [ last_kv ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1194,7 +1193,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1207,15 +1206,14 @@ Module collections. |), [ last_kv; - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - M.read (| right_child_len |) - |) + |)) + (M.read (| right_child_len |)) ] |) |) in @@ -1223,7 +1221,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| cur_node, M.call_closure (| @@ -1243,7 +1241,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1338,7 +1336,7 @@ Module collections. 0 |) in let internal_kv := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| self, M.call_closure (| @@ -1393,7 +1391,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1405,7 +1403,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1528,7 +1526,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1606,7 +1604,7 @@ Module collections. 0 |) in let internal_kv := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| self, M.call_closure (| @@ -1661,7 +1659,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1673,7 +1671,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1796,7 +1794,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1861,7 +1859,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let internal_kv := + let~ internal_kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1884,7 +1882,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let left_len := + let~ left_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1897,7 +1895,7 @@ Module collections. [ internal_kv ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1906,7 +1904,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1994,23 +1992,22 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let count := + (let~ count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - Value.Integer 1 - |); + |)) + (Value.Integer 1); M.read (| left_len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2026,7 +2023,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2094,7 +2091,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let internal_kv := + let~ internal_kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2117,7 +2114,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let right_len := + let~ right_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2130,7 +2127,7 @@ Module collections. [ internal_kv ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2139,7 +2136,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2227,23 +2224,22 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let count := + (let~ count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - Value.Integer 1 - |); + |)) + (Value.Integer 1); M.read (| right_len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2259,7 +2255,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/map.v b/CoqOfRust/alloc/collections/btree/map.v index 66ded1df3..17a70f88b 100644 --- a/CoqOfRust/alloc/collections/btree/map.v +++ b/CoqOfRust/alloc/collections/btree/map.v @@ -408,7 +408,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -670,7 +670,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let map := M.copy (| γ0_0 |) in let dormant_map := M.copy (| γ0_1 |) in - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -974,7 +974,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let map := M.copy (| γ0_0 |) in let dormant_map := M.copy (| γ0_1 |) in - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1173,7 +1173,7 @@ Module collections. 0 |) in let handle := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1432,7 +1432,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let range := + let~ range := M.alloc (| Value.StructRecord "alloc::collections::btree::map::Iter" @@ -1661,7 +1661,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1694,7 +1694,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1703,7 +1703,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -1794,7 +1794,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1827,7 +1827,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1836,7 +1836,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -2683,7 +2683,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let range := + let~ range := M.alloc (| Value.StructRecord "alloc::collections::btree::map::Range" @@ -2818,7 +2818,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2959,7 +2959,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3192,7 +3192,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3417,7 +3417,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3745,7 +3745,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let map := M.copy (| γ0_0 |) in let dormant_map := M.copy (| γ0_1 |) in - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3879,7 +3879,7 @@ Module collections. ] |) |) in - let kv := + let~ kv := M.copy (| M.match_operator (| M.alloc (| @@ -4237,7 +4237,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4565,7 +4565,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let map := M.copy (| γ0_0 |) in let dormant_map := M.copy (| γ0_1 |) in - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4699,7 +4699,7 @@ Module collections. ] |) |) in - let kv := + let~ kv := M.copy (| M.match_operator (| M.alloc (| @@ -5104,7 +5104,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5374,7 +5374,7 @@ Module collections. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5597,7 +5597,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let map := M.copy (| γ0_0 |) in let dormant_map := M.copy (| γ0_1 |) in - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5855,7 +5855,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5993,7 +5993,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6024,7 +6024,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6052,7 +6052,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6073,7 +6073,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let self_iter := + let~ self_iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6142,7 +6142,7 @@ Module collections. ] |) |) in - let other_iter := + let~ other_iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6211,7 +6211,7 @@ Module collections. ] |) |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6687,7 +6687,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "alloc::collections::btree::map::entry::Entry::Vacant" [ @@ -6948,7 +6949,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7025,7 +7026,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let total_num := + let~ total_num := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7038,7 +7039,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let left_root := + let~ left_root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7092,7 +7093,7 @@ Module collections. ] |) |) in - let right_root := + let~ right_root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7161,7 +7162,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let new_left_len := M.copy (| γ0_0 |) in let right_len := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7373,7 +7374,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let root := M.copy (| γ0_0 |) in let dormant_root := M.copy (| γ0_1 |) in - let front := + let~ front := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7608,7 +7609,7 @@ Module collections. (let iter := M.alloc (| iter |) in let alloc := M.alloc (| alloc |) in M.read (| - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7631,8 +7632,8 @@ Module collections. ] |) |) in - let length := M.alloc (| Value.Integer 0 |) in - let _ := + let~ length := M.alloc (| Value.Integer 0 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7753,7 +7754,7 @@ Module collections. 0 |) in let root := M.alloc (| γ1_0 |) in - let full_range := + let~ full_range := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7877,7 +7878,7 @@ Module collections. 0 |) in let root := M.alloc (| γ1_0 |) in - let full_range := + let~ full_range := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8134,7 +8135,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.copy (| M.match_operator (| M.alloc (| @@ -8168,7 +8169,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -8214,7 +8216,7 @@ Module collections. ] |) |) in - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8421,7 +8423,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let root := M.copy (| γ0_0 |) in let dormant_root := M.copy (| γ0_1 |) in - let root_node := + let~ root_node := M.copy (| M.match_operator (| M.alloc (| @@ -8450,7 +8452,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -8524,7 +8528,7 @@ Module collections. ] |) |) in - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8686,7 +8690,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let root_node := + let~ root_node := M.copy (| M.match_operator (| M.alloc (| @@ -8720,7 +8724,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -8766,7 +8771,7 @@ Module collections. ] |) |) in - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8973,7 +8978,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let root := M.copy (| γ0_0 |) in let dormant_root := M.copy (| γ0_1 |) in - let root_node := + let~ root_node := M.copy (| M.match_operator (| M.alloc (| @@ -9002,7 +9007,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -9076,7 +9083,7 @@ Module collections. ] |) |) in - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9314,7 +9321,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9323,7 +9330,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -9541,7 +9548,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9550,7 +9557,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -9780,7 +9787,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9789,7 +9796,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -9997,7 +10004,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10006,7 +10013,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -10186,7 +10193,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10259,7 +10266,7 @@ Module collections. 0 |) in let root := M.copy (| γ0_0 |) in - let full_range := + let~ full_range := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10494,13 +10501,13 @@ Module collections. 0 |) in let kv := M.copy (| γ0_0 |) in - let guard := + let~ guard := M.alloc (| Value.StructTuple "alloc::collections::btree::map::drop::DropGuard" [ M.read (| self |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10525,7 +10532,7 @@ Module collections. [ M.read (| kv |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -10545,7 +10552,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -11943,7 +11950,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := + let~ edge := M.copy (| M.match_operator (| M.alloc (| @@ -12258,7 +12265,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -12453,7 +12460,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12491,7 +12498,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.read (| M.SubPointer.get_struct_record_field (| @@ -12502,11 +12509,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| @@ -12551,7 +12557,7 @@ Module collections. fun γ => ltac:(M.monadic (M.read (| - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12643,7 +12649,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12680,7 +12686,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -12764,7 +12770,7 @@ Module collections. |) in let kv := M.copy (| γ0_0 |) in let pos := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12789,7 +12795,7 @@ Module collections. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12834,7 +12840,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -14348,7 +14354,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let inputs := + let~ inputs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14376,7 +14382,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14422,7 +14428,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14547,7 +14553,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14583,7 +14589,7 @@ Module collections. let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14634,7 +14640,7 @@ Module collections. let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14684,7 +14690,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14798,7 +14804,7 @@ Module collections. let γ0_1 := M.read (| γ0_1 |) in let v := M.copy (| γ0_1 |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14852,7 +14858,7 @@ Module collections. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14903,7 +14909,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -14922,7 +14928,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -14934,7 +14942,7 @@ Module collections. 0 |) in let elt := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15429,7 +15437,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15470,7 +15478,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15909,7 +15917,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16166,7 +16175,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16323,7 +16332,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16580,7 +16590,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -17134,7 +17144,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let next := + let~ next := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17147,7 +17157,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17308,7 +17318,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17321,7 +17331,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17532,7 +17542,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -17837,7 +17848,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -17993,7 +18004,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18298,7 +18310,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -19414,7 +19426,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -20133,7 +20146,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -21052,7 +21066,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := + let~ edge := M.copy (| M.match_operator (| M.alloc (| @@ -21091,7 +21105,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21132,10 +21147,12 @@ Module collections. ltac:(M.monadic (let root := M.copy (| γ |) in let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in M.alloc (| M.never_to_any (| M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21175,7 +21192,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21219,7 +21236,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| root |), Value.StructTuple @@ -21245,7 +21262,7 @@ Module collections. |) ] |) in - let _ := + let~ _ := let β := M.read (| M.SubPointer.get_struct_record_field (| @@ -21256,11 +21273,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.return_ (| Value.Tuple [] |) |) @@ -21352,7 +21368,7 @@ Module collections. ] |) |) in - let handle := + let~ handle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21417,7 +21433,7 @@ Module collections. ltac:(M.monadic (let ins := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -21447,7 +21463,7 @@ Module collections. ] |) |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21629,7 +21645,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -21713,7 +21729,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.read (| M.SubPointer.get_struct_record_field (| @@ -21724,7 +21740,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) @@ -21781,7 +21797,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := + let~ edge := M.copy (| M.match_operator (| M.alloc (| @@ -21820,7 +21836,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21861,10 +21878,12 @@ Module collections. ltac:(M.monadic (let root := M.copy (| γ |) in let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in M.alloc (| M.never_to_any (| M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21904,7 +21923,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -21948,7 +21967,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| root |), Value.StructTuple @@ -21974,7 +21993,7 @@ Module collections. |) ] |) in - let _ := + let~ _ := let β := M.read (| M.SubPointer.get_struct_record_field (| @@ -21985,11 +22004,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.return_ (| Value.Tuple [] |) |) @@ -22081,7 +22099,7 @@ Module collections. ] |) |) in - let handle := + let~ handle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -22146,7 +22164,7 @@ Module collections. ltac:(M.monadic (let ins := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -22176,7 +22194,7 @@ Module collections. ] |) |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -22358,7 +22376,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -22442,7 +22460,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.read (| M.SubPointer.get_struct_record_field (| @@ -22453,7 +22471,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) @@ -22494,7 +22512,7 @@ Module collections. let key := M.alloc (| key |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -22579,7 +22597,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -22666,7 +22684,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -22712,7 +22730,7 @@ Module collections. let key := M.alloc (| key |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -22797,7 +22815,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -22884,7 +22902,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -22930,7 +22948,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let current := + let~ current := M.copy (| M.match_operator (| M.alloc (| @@ -23042,7 +23060,7 @@ Module collections. ] |) |) in - let emptied_internal_root := M.alloc (| Value.Bool false |) in + let~ emptied_internal_root := M.alloc (| Value.Bool false |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23105,7 +23123,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let kv := M.copy (| γ0_0 |) in let pos := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -23171,7 +23189,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.read (| M.SubPointer.get_struct_record_field (| @@ -23182,9 +23200,9 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23196,7 +23214,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -23282,7 +23300,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -23370,7 +23388,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let current := + let~ current := M.copy (| M.match_operator (| M.alloc (| @@ -23482,7 +23500,7 @@ Module collections. ] |) |) in - let emptied_internal_root := M.alloc (| Value.Bool false |) in + let~ emptied_internal_root := M.alloc (| Value.Bool false |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23545,7 +23563,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let kv := M.copy (| γ0_0 |) in let pos := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -23611,7 +23629,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.read (| M.SubPointer.get_struct_record_field (| @@ -23622,9 +23640,9 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23636,7 +23654,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -23722,7 +23740,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/map/entry.v b/CoqOfRust/alloc/collections/btree/map/entry.v index 834413ae8..7a3b3651e 100644 --- a/CoqOfRust/alloc/collections/btree/map/entry.v +++ b/CoqOfRust/alloc/collections/btree/map/entry.v @@ -894,7 +894,7 @@ Module collections. 0 |) in let entry := M.copy (| γ0_0 |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1049,7 +1049,7 @@ Module collections. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1288,7 +1288,7 @@ Module collections. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let out_ptr := + let~ out_ptr := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -1299,7 +1299,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let map := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ map := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1324,7 +1325,7 @@ Module collections. ] |) |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1359,7 +1360,7 @@ Module collections. ] |) |) in - let val_ptr := + let~ val_ptr := M.copy (| M.use (M.alloc (| @@ -1411,7 +1412,7 @@ Module collections. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| map |), @@ -1440,7 +1441,7 @@ Module collections. |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| map |), @@ -1461,7 +1462,7 @@ Module collections. let handle := M.copy (| γ0_0 |) in M.alloc (| M.read (| - let new_handle := + let~ new_handle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1540,7 +1541,7 @@ Module collections. ltac:(M.monadic (let ins := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1570,7 +1571,7 @@ Module collections. ] |) |) in - let map := + let~ map := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1595,7 +1596,7 @@ Module collections. ] |) |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1740,7 +1741,7 @@ Module collections. ] |) |) in - let val_ptr := + let~ val_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1765,7 +1766,7 @@ Module collections. [ M.read (| new_handle |) ] |) |) in - let map := + let~ map := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1791,7 +1792,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| map |), @@ -1800,11 +1801,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in val_ptr |) @@ -2189,7 +2189,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let emptied_internal_root := M.alloc (| Value.Bool false |) in + let~ emptied_internal_root := M.alloc (| Value.Bool false |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2254,7 +2254,7 @@ Module collections. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let old_kv := M.copy (| γ0_0 |) in - let map := + let~ map := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2279,7 +2279,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| map |), @@ -2288,9 +2288,9 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2302,7 +2302,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2360,7 +2360,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/mem.v b/CoqOfRust/alloc/collections/btree/mem.v index 457039a31..30f0f1214 100644 --- a/CoqOfRust/alloc/collections/btree/mem.v +++ b/CoqOfRust/alloc/collections/btree/mem.v @@ -83,11 +83,11 @@ Module collections. (let v := M.alloc (| v |) in let change := M.alloc (| change |) in M.read (| - let guard := + let~ guard := M.alloc (| Value.StructTuple "alloc::collections::btree::mem::replace::PanicGuard" [] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), @@ -114,8 +114,8 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let new_value := M.copy (| γ0_0 |) in let ret := M.copy (| γ0_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -123,7 +123,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/alloc/collections/btree/merge_iter.v b/CoqOfRust/alloc/collections/btree/merge_iter.v index 8bd75442d..fc8de705e 100644 --- a/CoqOfRust/alloc/collections/btree/merge_iter.v +++ b/CoqOfRust/alloc/collections/btree/merge_iter.v @@ -440,9 +440,9 @@ Module collections. (let self := M.alloc (| self |) in let cmp := M.alloc (| cmp |) in M.read (| - let a_next := M.copy (| Value.DeclaredButUndefined |) in - let b_next := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ a_next := M.copy (| Value.DeclaredButUndefined |) in + let~ b_next := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -482,12 +482,12 @@ Module collections. 0 |) in let next := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.write (| a_next, Value.StructTuple "core::option::Option::Some" [ M.read (| next |) ] |) in - let _ := + let~ _ := M.write (| b_next, M.call_closure (| @@ -523,12 +523,12 @@ Module collections. 0 |) in let next := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.write (| b_next, Value.StructTuple "core::option::Option::Some" [ M.read (| next |) ] |) in - let _ := + let~ _ := M.write (| a_next, M.call_closure (| @@ -551,7 +551,8 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| a_next, M.call_closure (| @@ -571,7 +572,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| b_next, M.call_closure (| @@ -594,7 +595,7 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -641,7 +642,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.write (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::merge_iter::MergeIterInner", @@ -682,7 +685,9 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.write (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::merge_iter::MergeIterInner", @@ -721,7 +726,11 @@ Module collections. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| Value.Tuple [] |))) ] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -779,10 +788,10 @@ Module collections. M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -797,8 +806,7 @@ Module collections. "a" |) ] - |) - |); + |)); M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", @@ -850,10 +858,10 @@ Module collections. |) ] |); - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -868,8 +876,7 @@ Module collections. "b" |) ] - |) - |) + |)) ] |))); fun γ => diff --git a/CoqOfRust/alloc/collections/btree/navigate.v b/CoqOfRust/alloc/collections/btree/navigate.v index 01c448588..a1f63f019 100644 --- a/CoqOfRust/alloc/collections/btree/navigate.v +++ b/CoqOfRust/alloc/collections/btree/navigate.v @@ -789,7 +789,7 @@ Module collections. ltac:(M.monadic (let front := M.copy (| γ |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -884,7 +884,7 @@ Module collections. ] |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1162,7 +1162,7 @@ Module collections. ltac:(M.monadic (let back := M.copy (| γ |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1257,7 +1257,7 @@ Module collections. ] |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2396,7 +2396,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2424,7 +2424,7 @@ Module collections. 0 |) in let root := M.alloc (| γ2_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2491,6 +2491,7 @@ Module collections. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic @@ -2566,7 +2567,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2594,7 +2595,7 @@ Module collections. 0 |) in let root := M.alloc (| γ2_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2661,6 +2662,7 @@ Module collections. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic @@ -3254,7 +3256,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3263,7 +3265,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3324,7 +3326,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let front := + let~ front := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3421,7 +3423,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3430,7 +3432,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3491,7 +3493,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let back := + let~ back := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3756,7 +3758,7 @@ Module collections. let upper_edge_idx := M.copy (| γ1_2 |) in let lower_child_bound := M.copy (| γ1_3 |) in let upper_child_bound := M.copy (| γ1_4 |) in - let lower_edge := + let~ lower_edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3799,7 +3801,7 @@ Module collections. ] |) |) in - let upper_edge := + let~ upper_edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3941,7 +3943,7 @@ Module collections. 0 |) in let b := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3997,12 +3999,12 @@ Module collections. M.SubPointer.get_tuple_field (| γ, 1 |) in let lhs := M.copy (| γ0_0 |) in let lhs := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| lower_edge, M.read (| lhs |) |) in - let _ := + let~ _ := M.write (| lower_child_bound, M.read (| lhs |) @@ -4010,7 +4012,7 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4066,12 +4068,12 @@ Module collections. M.SubPointer.get_tuple_field (| γ, 1 |) in let lhs := M.copy (| γ0_0 |) in let lhs := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| upper_edge, M.read (| lhs |) |) in - let _ := + let~ _ := M.write (| upper_child_bound, M.read (| lhs |) @@ -4165,7 +4167,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let node := M.copy (| self |) in + let~ node := M.copy (| self |) in M.alloc (| M.never_to_any (| M.read (| @@ -4316,7 +4318,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let node := M.copy (| self |) in + let~ node := M.copy (| self |) in M.alloc (| M.never_to_any (| M.read (| @@ -4478,7 +4480,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let node := M.copy (| self |) in + let~ node := M.copy (| self |) in M.alloc (| M.never_to_any (| M.read (| @@ -4560,7 +4562,7 @@ Module collections. 0 |) in let edge := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| node, M.call_closure (| @@ -4588,7 +4590,7 @@ Module collections. [ M.read (| edge |) ] |) |) in - let _ := + let~ _ := M.write (| bound, M.read (| new_bound |) |) in M.alloc (| Value.Tuple [] |))) ] @@ -4640,7 +4642,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let node := M.copy (| self |) in + let~ node := M.copy (| self |) in M.alloc (| M.never_to_any (| M.read (| @@ -4722,7 +4724,7 @@ Module collections. 0 |) in let edge := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| node, M.call_closure (| @@ -4750,7 +4752,7 @@ Module collections. [ M.read (| edge |) ] |) |) in - let _ := + let~ _ := M.write (| bound, M.read (| new_bound |) |) in M.alloc (| Value.Tuple [] |))) ] @@ -5000,7 +5002,7 @@ Module collections. 0 |) in let internal := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5034,7 +5036,7 @@ Module collections. ] |) |) in - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5117,7 +5119,7 @@ Module collections. 0 |) in let leaf := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5189,7 +5191,7 @@ Module collections. 0 |) in let kv := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5276,7 +5278,7 @@ Module collections. 0 |) in let internal := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5367,8 +5369,8 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := M.alloc (| Value.Integer 0 |) in - let _ := + let~ result := M.alloc (| Value.Integer 0 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5424,10 +5426,10 @@ Module collections. let β := result in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -5444,8 +5446,7 @@ Module collections. [] |), [ node ] - |) - |) + |)) |))); fun γ => ltac:(M.monadic @@ -5459,10 +5460,10 @@ Module collections. let β := result in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -5479,8 +5480,7 @@ Module collections. [] |), [ node ] - |) - |) + |)) |))); fun γ => ltac:(M.monadic @@ -5576,7 +5576,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let self2 := + let~ self2 := M.alloc (| M.call_closure (| M.get_function (| @@ -5639,7 +5639,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let self2 := + let~ self2 := M.alloc (| M.call_closure (| M.get_function (| @@ -5715,7 +5715,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5949,7 +5949,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6195,7 +6195,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := M.copy (| self |) in + let~ edge := M.copy (| self |) in M.alloc (| M.never_to_any (| M.read (| @@ -6401,7 +6401,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6641,7 +6641,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -6701,7 +6706,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6941,7 +6946,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -6989,7 +6999,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7078,7 +7088,7 @@ Module collections. 0 |) in let parent_edge := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| edge, M.call_closure (| @@ -7110,7 +7120,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -7631,7 +7641,7 @@ Module collections. ltac:(M.monadic (let leaf_edge := M.copy (| γ |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7881,7 +7891,7 @@ Module collections. ltac:(M.monadic (let leaf_edge := M.copy (| γ |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8081,7 +8091,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_function (| @@ -8178,7 +8188,7 @@ Module collections. ltac:(M.monadic (let leaf_edge := M.copy (| γ |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8390,7 +8400,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_function (| @@ -8487,7 +8497,7 @@ Module collections. ltac:(M.monadic (let leaf_edge := M.copy (| γ |) in M.read (| - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8842,7 +8852,7 @@ Module collections. 0 |) in let internal_kv := M.copy (| γ0_0 |) in - let next_internal_edge := + let~ next_internal_edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9005,7 +9015,7 @@ Module collections. 0 |) in let internal_kv := M.copy (| γ0_0 |) in - let next_internal_edge := + let~ next_internal_edge := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/node.v b/CoqOfRust/alloc/collections/btree/node.v index 4aa6f2211..f5212a95c 100644 --- a/CoqOfRust/alloc/collections/btree/node.v +++ b/CoqOfRust/alloc/collections/btree/node.v @@ -10,48 +10,43 @@ Module collections. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |))) + (Value.Integer 1) |))). Definition value_MIN_LEN_AFTER_SPLIT : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |)) + (Value.Integer 1) |))). Definition value_KV_IDX_CENTER : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |)) + (Value.Integer 1) |))). Definition value_EDGE_IDX_LEFT_OF_CENTER : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::node::B" |) |)) + (Value.Integer 1) |))). Definition value_EDGE_IDX_RIGHT_OF_CENTER : Value.t := @@ -108,7 +103,7 @@ Module collections. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -140,7 +135,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -183,7 +178,7 @@ Module collections. ltac:(M.monadic (let alloc := M.alloc (| alloc |) in M.read (| - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -199,7 +194,7 @@ Module collections. [ M.read (| alloc |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -299,7 +294,7 @@ Module collections. ltac:(M.monadic (let alloc := M.alloc (| alloc |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -317,7 +312,7 @@ Module collections. [ M.read (| alloc |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -687,7 +682,7 @@ Module collections. (let child := M.alloc (| child |) in let alloc := M.alloc (| alloc |) in M.read (| - let new_node := + let~ new_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -698,7 +693,7 @@ Module collections. [ M.read (| alloc |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -751,17 +746,16 @@ Module collections. |), [ M.read (| new_node |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| child, "alloc::collections::btree::node::NodeRef", "height" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) @@ -793,7 +787,7 @@ Module collections. (let internal := M.alloc (| internal |) in let height := M.alloc (| height |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -802,7 +796,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -835,7 +829,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -893,7 +887,7 @@ Module collections. ] |) |) in - let this := + let~ this := M.alloc (| Value.StructRecord "alloc::collections::btree::node::NodeRef" @@ -903,7 +897,7 @@ Module collections. ("_marker", Value.StructTuple "core::marker::PhantomData" []) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -969,7 +963,7 @@ Module collections. (let node := M.alloc (| node |) in let height := M.alloc (| height |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -978,7 +972,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1153,7 +1147,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1309,7 +1303,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1326,7 +1320,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1338,7 +1334,7 @@ Module collections. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1350,7 +1346,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1412,7 +1408,7 @@ Module collections. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1521,7 +1517,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1539,7 +1535,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1607,7 +1603,7 @@ Module collections. let val := M.alloc (| val |) in let edge := M.alloc (| edge |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1625,17 +1621,16 @@ Module collections. "height" |) |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::NodeRef", "height" |) - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -1654,7 +1649,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1672,7 +1667,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1685,7 +1680,7 @@ Module collections. [ M.read (| M.read (| len |) |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1716,13 +1711,10 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.read (| len |) in - M.write (| - β, - BinOp.Panic.add (| Integer.U16, M.read (| β |), Value.Integer 1 |) - |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.U16 (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1753,7 +1745,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1784,7 +1776,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1831,7 +1823,7 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.add (| Integer.Usize, M.read (| idx |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| idx |)) (Value.Integer 1) ] |); M.read (| @@ -1844,7 +1836,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1899,7 +1891,7 @@ Module collections. |), [ M.read (| self |) ] |); - BinOp.Panic.add (| Integer.Usize, M.read (| idx |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| idx |)) (Value.Integer 1) ] |) ] @@ -2106,9 +2098,9 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.get_constant (| "alloc::collections::btree::node::ascend_discriminant" |) in - let leaf_ptr := + let~ leaf_ptr := M.alloc (| (* MutToConstPointer *) M.pointer_coercion @@ -2273,17 +2265,16 @@ Module collections. |), [ M.read (| M.read (| parent |) |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::NodeRef", "height" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |)); ("idx", @@ -2391,7 +2382,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2446,7 +2437,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2459,7 +2450,7 @@ Module collections. [ self ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2525,7 +2516,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2538,7 +2529,7 @@ Module collections. [ self ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2578,7 +2569,7 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) |) @@ -2685,7 +2676,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2697,7 +2688,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -2744,7 +2735,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -2820,7 +2811,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2857,7 +2848,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2971,7 +2962,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let height := + let~ height := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -2979,7 +2970,7 @@ Module collections. "height" |) |) in - let node := + let~ node := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -2987,7 +2978,7 @@ Module collections. "node" |) |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3038,8 +3029,8 @@ Module collections. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::alloc::Allocator", A, [], "deallocate", [] |), @@ -3182,7 +3173,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3218,7 +3209,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3502,7 +3493,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3557,7 +3548,7 @@ Module collections. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3571,7 +3562,7 @@ Module collections. [ self ] |) |) in - let keys := + let~ keys := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| leaf |), @@ -3579,7 +3570,7 @@ Module collections. "keys" |) |) in - let vals := + let~ vals := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| leaf |), @@ -3587,9 +3578,9 @@ Module collections. "vals" |) |) in - let keys := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| keys |)) |) in - let vals := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| vals |)) |) in - let key := + let~ keys := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| keys |)) |) in + let~ vals := M.alloc (| (* Unsize *) M.pointer_coercion (M.read (| vals |)) |) in + let~ key := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3616,7 +3607,7 @@ Module collections. ] |) |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3685,7 +3676,7 @@ Module collections. let parent := M.alloc (| parent |) in let parent_idx := M.alloc (| parent_idx |) in M.read (| - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3703,7 +3694,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| leaf |), @@ -3712,7 +3703,7 @@ Module collections. |), Value.StructTuple "core::option::Option::Some" [ M.read (| parent |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3751,7 +3742,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3760,7 +3751,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3848,7 +3839,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3857,7 +3848,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4374,7 +4365,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let root_node := + let~ root_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4392,7 +4383,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4410,7 +4401,7 @@ Module collections. [ root_node ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| leaf |), @@ -4495,7 +4486,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -4649,7 +4640,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4682,7 +4673,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let top := + let~ top := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4690,7 +4681,7 @@ Module collections. "node" |) |) in - let internal_self := + let~ internal_self := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4724,7 +4715,7 @@ Module collections. ] |) |) in - let internal_node := + let~ internal_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4742,7 +4733,7 @@ Module collections. [ internal_self ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4777,7 +4768,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4786,9 +4777,9 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4806,7 +4797,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::alloc::Allocator", A, [], "deallocate", [] |), @@ -5008,7 +4999,7 @@ Module collections. let key := M.alloc (| key |) in let val := M.alloc (| val |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5026,7 +5017,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5039,7 +5030,7 @@ Module collections. [ M.read (| M.read (| len |) |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5070,15 +5061,12 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.read (| len |) in - M.write (| - β, - BinOp.Panic.add (| Integer.U16, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.U16 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5455,7 +5443,7 @@ Module collections. (let node := M.alloc (| node |) in let idx := M.alloc (| idx |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5464,7 +5452,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5623,17 +5611,16 @@ Module collections. "node" |) |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |))) | _, _ => M.impossible @@ -6044,7 +6031,7 @@ Module collections. (let node := M.alloc (| node |) in let idx := M.alloc (| idx |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6053,7 +6040,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6186,17 +6173,16 @@ Module collections. "node" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) ] @@ -6367,7 +6353,7 @@ Module collections. ltac:(M.monadic (let edge_idx := M.alloc (| edge_idx |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6376,7 +6362,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6426,15 +6412,14 @@ Module collections. (M.alloc (| Value.Tuple [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::node::KV_IDX_CENTER" |) - |), - Value.Integer 1 - |); + |)) + (Value.Integer 1); Value.StructTuple "alloc::collections::btree::node::LeftOrRight::Left" [ M.read (| edge_idx |) ] @@ -6475,35 +6460,31 @@ Module collections. (M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::node::KV_IDX_CENTER" |) - |), - Value.Integer 1 - |); + |)) + (Value.Integer 1); Value.StructTuple "alloc::collections::btree::node::LeftOrRight::Right" [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| edge_idx |), - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| edge_idx |)) + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::node::KV_IDX_CENTER" |) - |), - Value.Integer 1 - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) + (Value.Integer 1)) ] ] |))) @@ -6559,7 +6540,7 @@ Module collections. let key := M.alloc (| key |) in let val := M.alloc (| val |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6568,7 +6549,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6634,11 +6615,11 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_len := + let~ new_len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -6658,11 +6639,10 @@ Module collections. "node" |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_insert", [ K ] |), @@ -6707,7 +6687,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_insert", [ V ] |), @@ -6752,7 +6732,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -6900,7 +6880,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let handle := + let~ handle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6976,7 +6956,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let middle_kv_idx := M.copy (| γ0_0 |) in let insertion := M.copy (| γ0_1 |) in - let middle := + let~ middle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7010,7 +6990,7 @@ Module collections. ] |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7035,7 +7015,7 @@ Module collections. [ M.read (| middle |); M.read (| alloc |) ] |) |) in - let insertion_edge := + let~ insertion_edge := M.copy (| M.match_operator (| insertion, @@ -7167,7 +7147,7 @@ Module collections. ] |) |) in - let handle := + let~ handle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7329,6 +7309,7 @@ Module collections. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in let handle := M.copy (| γ0_1 |) in M.alloc (| M.never_to_any (| @@ -7406,7 +7387,7 @@ Module collections. M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.write (| split, M.read (| @@ -7519,7 +7500,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -7593,7 +7579,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7714,7 +7700,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7753,7 +7739,7 @@ Module collections. ] |) |) in - let idx := + let~ idx := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -7761,7 +7747,7 @@ Module collections. "idx" |) |) in - let child := + let~ child := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7784,7 +7770,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7836,7 +7822,7 @@ Module collections. let val := M.alloc (| val |) in let edge := M.alloc (| edge |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7845,7 +7831,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7911,7 +7897,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7920,7 +7906,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7938,9 +7924,9 @@ Module collections. "height" |) |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7950,9 +7936,8 @@ Module collections. "alloc::collections::btree::node::NodeRef", "height" |) - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) |)) in let _ := M.is_constant_or_break_match (| @@ -7979,11 +7964,11 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_len := + let~ new_len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -8003,11 +7988,10 @@ Module collections. "node" |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_insert", [ K ] |), @@ -8052,7 +8036,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_insert", [ V ] |), @@ -8097,7 +8081,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8153,25 +8137,23 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_len |)) + (Value.Integer 1)) ] ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |), - Value.Integer 1 - |); + |)) + (Value.Integer 1); M.read (| M.SubPointer.get_struct_record_field (| edge, @@ -8182,7 +8164,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -8207,7 +8189,7 @@ Module collections. |), M.rust_cast (M.read (| new_len |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8232,23 +8214,18 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |), - Value.Integer 1 - |)); + |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add Integer.Usize (M.read (| new_len |)) (Value.Integer 1)) ] ] |) @@ -8303,7 +8280,7 @@ Module collections. let edge := M.alloc (| edge |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8321,9 +8298,9 @@ Module collections. "height" |) |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| self, @@ -8333,9 +8310,8 @@ Module collections. "alloc::collections::btree::node::NodeRef", "height" |) - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -8391,7 +8367,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8442,7 +8418,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let middle_kv_idx := M.copy (| γ0_0 |) in let insertion := M.copy (| γ0_1 |) in - let middle := + let~ middle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8476,7 +8452,7 @@ Module collections. ] |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8501,7 +8477,7 @@ Module collections. [ M.read (| middle |); M.read (| alloc |) ] |) |) in - let insertion_edge := + let~ insertion_edge := M.copy (| M.match_operator (| insertion, @@ -8633,7 +8609,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8719,9 +8695,9 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.get_constant (| "alloc::collections::btree::node::descend_discriminant" |) in - let parent_ptr := + let~ parent_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8745,7 +8721,7 @@ Module collections. ] |) |) in - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8810,9 +8786,9 @@ Module collections. [ ("node", M.read (| node |)); ("height", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| self, @@ -8822,9 +8798,8 @@ Module collections. "alloc::collections::btree::node::NodeRef", "height" |) - |), - Value.Integer 1 - |)); + |)) + (Value.Integer 1)); ("_marker", Value.StructTuple "core::marker::PhantomData" []) ] |) @@ -8941,7 +8916,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8950,7 +8925,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9017,7 +8992,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9039,7 +9014,7 @@ Module collections. ] |) |) in - let k := + let~ k := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9076,7 +9051,7 @@ Module collections. ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9201,7 +9176,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9210,7 +9185,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9277,7 +9252,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9359,7 +9334,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9368,7 +9343,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9435,7 +9410,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9457,7 +9432,7 @@ Module collections. ] |) |) in - let k := + let~ k := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9494,7 +9469,7 @@ Module collections. ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9559,7 +9534,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9568,7 +9543,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9635,7 +9610,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9655,7 +9630,7 @@ Module collections. ] |) |) in - let key := + let~ key := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9692,7 +9667,7 @@ Module collections. ] |) |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9837,7 +9812,7 @@ Module collections. (let self := M.alloc (| self |) in let new_node := M.alloc (| new_node |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9846,7 +9821,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9913,7 +9888,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9933,25 +9908,23 @@ Module collections. ] |) |) in - let new_len := + let~ new_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_len |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| old_len |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| new_node |), @@ -9960,7 +9933,7 @@ Module collections. |), M.rust_cast (M.read (| new_len |)) |) in - let k := + let~ k := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10003,7 +9976,7 @@ Module collections. ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10046,7 +10019,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::move_to_slice", [ K ] |), @@ -10079,17 +10052,16 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |), - Value.Integer 1 - |)); + |)) + (Value.Integer 1)); ("end_", M.read (| old_len |)) ] ] @@ -10118,7 +10090,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::move_to_slice", [ V ] |), @@ -10151,17 +10123,16 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::btree::node::Handle", "idx" |) - |), - Value.Integer 1 - |)); + |)) + (Value.Integer 1)); ("end_", M.read (| old_len |)) ] ] @@ -10190,7 +10161,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10316,7 +10287,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10325,7 +10296,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10392,7 +10363,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10412,7 +10383,7 @@ Module collections. ] |) |) in - let key := + let~ key := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10449,7 +10420,7 @@ Module collections. ] |) |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10512,7 +10483,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10521,7 +10492,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10588,7 +10559,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let leaf := + let~ leaf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10608,7 +10579,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10645,7 +10616,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10727,7 +10698,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let new_node := + let~ new_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10738,7 +10709,7 @@ Module collections. [ M.read (| alloc |) ] |) |) in - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10761,7 +10732,7 @@ Module collections. [ self; M.read (| new_node |) ] |) |) in - let right := + let~ right := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10823,7 +10794,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10847,7 +10818,7 @@ Module collections. ] |) |) in - let k := + let~ k := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_remove", [ K ] |), @@ -10891,7 +10862,7 @@ Module collections. ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_remove", [ V ] |), @@ -10935,7 +10906,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10959,7 +10930,7 @@ Module collections. ] |), M.rust_cast - (BinOp.Panic.sub (| Integer.Usize, M.read (| old_len |), Value.Integer 1 |)) + (BinOp.Wrap.sub Integer.Usize (M.read (| old_len |)) (Value.Integer 1)) |) in M.alloc (| Value.Tuple @@ -11042,7 +11013,7 @@ Module collections. (let self := M.alloc (| self |) in let alloc := M.alloc (| alloc |) in M.read (| - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11066,7 +11037,7 @@ Module collections. ] |) |) in - let new_node := + let~ new_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11077,7 +11048,7 @@ Module collections. [ M.read (| alloc |) ] |) |) in - let kv := + let~ kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11107,7 +11078,7 @@ Module collections. ] |) |) in - let new_len := + let~ new_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11132,7 +11103,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11188,23 +11159,21 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "alloc::collections::btree::node::Handle", "idx" |) - |), - Value.Integer 1 - |)); + |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| old_len |)) + (Value.Integer 1)) ] ] |); @@ -11240,18 +11209,17 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_len |)) + (Value.Integer 1)) ] ] |) ] |) |) in - let height := + let~ height := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -11263,7 +11231,7 @@ Module collections. "height" |) |) in - let right := + let~ right := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11322,7 +11290,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let self1 := + let~ self1 := M.alloc (| M.call_closure (| M.get_function (| @@ -11346,7 +11314,7 @@ Module collections. [ self ] |) |) in - let self2 := + let~ self2 := M.alloc (| M.call_closure (| M.get_function (| @@ -11657,11 +11625,11 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -11681,10 +11649,9 @@ Module collections. "left_child" |) ] - |), - Value.Integer 1 - |), - M.call_closure (| + |)) + (Value.Integer 1)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::btree::node::NodeRef") @@ -11704,8 +11671,7 @@ Module collections. "right_child" |) ] - |) - |)) + |))) (M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" |) |)))) | _, _ => M.impossible end. @@ -11816,7 +11782,7 @@ Module collections. let parent_node := M.copy (| γ0_0 |) in let parent_idx := M.copy (| γ0_1 |) in let _marker := M.copy (| γ0_2 |) in - let old_parent_len := + let~ old_parent_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11834,7 +11800,7 @@ Module collections. [ parent_node ] |) |) in - let left_node := + let~ left_node := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -11842,7 +11808,7 @@ Module collections. "left_child" |) |) in - let old_left_len := + let~ old_left_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11861,7 +11827,7 @@ Module collections. [ left_node ] |) |) in - let right_node := + let~ right_node := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -11869,7 +11835,7 @@ Module collections. "right_child" |) |) in - let right_len := + let~ right_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11888,19 +11854,17 @@ Module collections. [ right_node ] |) |) in - let new_left_len := + let~ new_left_len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |), - M.read (| right_len |) - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)) + (M.read (| right_len |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11939,8 +11903,8 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -11960,7 +11924,7 @@ Module collections. |), M.rust_cast (M.read (| new_left_len |)) |) in - let parent_key := + let~ parent_key := M.alloc (| M.call_closure (| M.get_function (| @@ -12004,7 +11968,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12038,7 +12002,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12109,11 +12073,10 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", M.read (| new_left_len |)) ] ] @@ -12121,7 +12084,7 @@ Module collections. ] |) |) in - let parent_val := + let~ parent_val := M.alloc (| M.call_closure (| M.get_function (| @@ -12165,7 +12128,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12199,7 +12162,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12270,11 +12233,10 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", M.read (| new_left_len |)) ] ] @@ -12282,7 +12244,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12338,23 +12300,21 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_parent_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| old_parent_len |)) + (Value.Integer 1)) ] ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| parent_idx |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| parent_idx |)) + (Value.Integer 1) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12376,17 +12336,16 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| parent_idx |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| parent_idx |)) + (Value.Integer 1)); ("end_", M.read (| old_parent_len |)) ] ] |) |) in - let _ := + let~ _ := let β := M.call_closure (| M.get_associated_function (| @@ -12405,7 +12364,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.U16, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.U16 (M.read (| β |)) (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -12430,7 +12389,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let left_node := + let~ left_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12468,7 +12427,7 @@ Module collections. ] |) |) in - let right_node := + let~ right_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12488,7 +12447,7 @@ Module collections. [ M.read (| right_node |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12547,11 +12506,10 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| right_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| right_len |)) + (Value.Integer 1)) ] ] |); @@ -12597,24 +12555,22 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)) ] ] |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12641,22 +12597,20 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)) ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12710,7 +12664,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13033,7 +12987,7 @@ Module collections. let track_edge_idx := M.alloc (| track_edge_idx |) in let alloc := M.alloc (| alloc |) in M.read (| - let old_left_len := + let~ old_left_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13057,7 +13011,7 @@ Module collections. ] |) |) in - let right_len := + let~ right_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13081,7 +13035,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13148,7 +13102,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let child := + let~ child := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13161,7 +13115,7 @@ Module collections. [ M.read (| self |); M.read (| alloc |) ] |) |) in - let new_idx := + let~ new_idx := M.copy (| M.match_operator (| track_edge_idx, @@ -13186,15 +13140,13 @@ Module collections. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |), - M.read (| idx |) - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)) + (M.read (| idx |)) |))) ] |) @@ -13249,7 +13201,7 @@ Module collections. (let self := M.alloc (| self |) in let track_right_edge_idx := M.alloc (| track_right_edge_idx |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13289,11 +13241,10 @@ Module collections. "right_child" |) |); - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.read (| track_right_edge_idx |) - |) + BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.read (| track_right_edge_idx |)) ] |) |) @@ -13322,7 +13273,7 @@ Module collections. (let self := M.alloc (| self |) in let track_left_edge_idx := M.alloc (| track_left_edge_idx |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13445,7 +13396,7 @@ Module collections. (let self := M.alloc (| self |) in let count := M.alloc (| count |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13469,7 +13420,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let left_node := + let~ left_node := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13477,7 +13428,7 @@ Module collections. "left_child" |) |) in - let old_left_len := + let~ old_left_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13495,7 +13446,7 @@ Module collections. [ M.read (| left_node |) ] |) |) in - let right_node := + let~ right_node := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13503,7 +13454,7 @@ Module collections. "right_child" |) |) in - let old_right_len := + let~ old_right_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13521,7 +13472,7 @@ Module collections. [ M.read (| right_node |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13532,11 +13483,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| old_right_len |), - M.read (| count |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| old_right_len |)) + (M.read (| count |))) (M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" @@ -13561,7 +13511,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13590,23 +13540,15 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_left_len := + let~ new_left_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_left_len |), - M.read (| count |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| old_left_len |)) (M.read (| count |)) |) in - let new_right_len := + let~ new_right_len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_right_len |), - M.read (| count |) - |) + BinOp.Wrap.add Integer.Usize (M.read (| old_right_len |)) (M.read (| count |)) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -13625,7 +13567,7 @@ Module collections. |), M.rust_cast (M.read (| new_left_len |)) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -13644,8 +13586,8 @@ Module collections. |), M.rust_cast (M.read (| new_right_len |)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_shr", [ K ] |), @@ -13680,7 +13622,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::collections::btree::node::slice_shr", [ V ] |), @@ -13715,7 +13657,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -13748,11 +13690,10 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)); ("end_", M.read (| old_left_len |)) ] ] @@ -13782,18 +13723,17 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| count |)) + (Value.Integer 1)) ] ] |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -13826,11 +13766,10 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)); ("end_", M.read (| old_left_len |)) ] ] @@ -13860,18 +13799,17 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| count |)) + (Value.Integer 1)) ] ] |) ] |) |) in - let k := + let~ k := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13901,7 +13839,7 @@ Module collections. ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13969,7 +13907,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13999,18 +13937,17 @@ Module collections. |), [ M.read (| right_node |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| count |)) + (Value.Integer 1) ] |); M.read (| k |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14040,11 +13977,10 @@ Module collections. |), [ M.read (| right_node |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| count |)) + (Value.Integer 1) ] |); M.read (| v |) @@ -14143,7 +14079,7 @@ Module collections. 0 |) in let right := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -14198,11 +14134,10 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_right_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_right_len |)) + (Value.Integer 1)) ] ] |); @@ -14210,7 +14145,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -14265,17 +14200,15 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)) ] ] |); @@ -14322,7 +14255,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14344,11 +14277,10 @@ Module collections. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_right_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_right_len |)) + (Value.Integer 1)) ] ] |) @@ -14464,7 +14396,7 @@ Module collections. (let self := M.alloc (| self |) in let count := M.alloc (| count |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14488,7 +14420,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let left_node := + let~ left_node := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -14496,7 +14428,7 @@ Module collections. "left_child" |) |) in - let old_left_len := + let~ old_left_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14514,7 +14446,7 @@ Module collections. [ M.read (| left_node |) ] |) |) in - let right_node := + let~ right_node := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -14522,7 +14454,7 @@ Module collections. "right_child" |) |) in - let old_right_len := + let~ old_right_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14540,7 +14472,7 @@ Module collections. [ M.read (| right_node |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14551,11 +14483,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - M.read (| count |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (M.read (| count |))) (M.read (| M.get_constant (| "alloc::collections::btree::node::CAPACITY" @@ -14580,7 +14511,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14609,23 +14540,15 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_left_len := + let~ new_left_len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - M.read (| count |) - |) + BinOp.Wrap.add Integer.Usize (M.read (| old_left_len |)) (M.read (| count |)) |) in - let new_right_len := + let~ new_right_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_right_len |), - M.read (| count |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| old_right_len |)) (M.read (| count |)) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -14644,7 +14567,7 @@ Module collections. |), M.rust_cast (M.read (| new_left_len |)) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -14663,8 +14586,8 @@ Module collections. |), M.rust_cast (M.read (| new_right_len |)) |) in - let _ := - let k := + let~ _ := + let~ k := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14691,17 +14614,13 @@ Module collections. |), [ M.read (| right_node |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| count |)) (Value.Integer 1) ] |) ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14728,11 +14647,7 @@ Module collections. |), [ M.read (| right_node |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| count |)) (Value.Integer 1) ] |) ] @@ -14776,7 +14691,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let k := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14810,7 +14725,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14844,7 +14759,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -14883,11 +14798,10 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| count |)) + (Value.Integer 1)) ] ] |); @@ -14922,11 +14836,10 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", M.read (| new_left_len |)) ] ] @@ -14934,7 +14847,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -14973,11 +14886,10 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| count |)) + (Value.Integer 1)) ] ] |); @@ -15012,11 +14924,10 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", M.read (| new_left_len |)) ] ] @@ -15024,7 +14935,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -15068,7 +14979,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -15204,7 +15115,7 @@ Module collections. 0 |) in let right := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -15299,24 +15210,22 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)) ] ] |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -15371,11 +15280,10 @@ Module collections. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_right_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| old_right_len |)) + (Value.Integer 1)) ] ] |); @@ -15383,7 +15291,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15404,22 +15312,20 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)) ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15441,11 +15347,10 @@ Module collections. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_right_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_right_len |)) + (Value.Integer 1)) ] ] |) @@ -15835,7 +15740,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15956,7 +15861,7 @@ Module collections. (let self := M.alloc (| self |) in let right := M.alloc (| right |) in M.read (| - let new_left_len := + let~ new_left_len := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -15964,7 +15869,7 @@ Module collections. "idx" |) |) in - let left_node := + let~ left_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16009,7 +15914,7 @@ Module collections. ] |) |) in - let old_left_len := + let~ old_left_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16027,15 +15932,14 @@ Module collections. [ left_node ] |) |) in - let new_right_len := + let~ new_right_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_left_len |), - M.read (| new_left_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| old_left_len |)) + (M.read (| new_left_len |)) |) in - let right_node := + let~ right_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16053,7 +15957,7 @@ Module collections. [ M.read (| right |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16099,7 +16003,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16155,7 +16059,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -16175,7 +16079,7 @@ Module collections. |), M.rust_cast (M.read (| new_left_len |)) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -16195,7 +16099,7 @@ Module collections. |), M.rust_cast (M.read (| new_right_len |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -16273,7 +16177,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -16408,7 +16312,7 @@ Module collections. 0 |) in let right := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -16466,17 +16370,15 @@ Module collections. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_left_len |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| new_left_len |)) + (Value.Integer 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_left_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| old_left_len |)) + (Value.Integer 1)) ] ] |); @@ -16522,18 +16424,17 @@ Module collections. [ ("start", Value.Integer 1); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_right_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_right_len |)) + (Value.Integer 1)) ] ] |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16560,11 +16461,10 @@ Module collections. [ ("start", Value.Integer 1); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| new_right_len |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| new_right_len |)) + (Value.Integer 1)) ] ] |) @@ -17021,7 +16921,7 @@ Module collections. let idx := M.alloc (| idx |) in let val := M.alloc (| val |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17034,7 +16934,7 @@ Module collections. [ M.read (| slice |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17043,7 +16943,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17075,7 +16975,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let slice_ptr := + let~ slice_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17088,7 +16988,7 @@ Module collections. [ M.read (| slice |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17099,15 +16999,11 @@ Module collections. (M.alloc (| BinOp.Pure.gt (M.read (| len |)) - (BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |)) + (BinOp.Wrap.add Integer.Usize (M.read (| idx |)) (Value.Integer 1)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -17145,22 +17041,19 @@ Module collections. |), [ M.read (| slice_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1) ] |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| idx |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| idx |))) + (Value.Integer 1) ] |) |) in @@ -17168,7 +17061,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17218,7 +17111,7 @@ Module collections. (let slice := M.alloc (| slice |) in let idx := M.alloc (| idx |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17231,7 +17124,7 @@ Module collections. [ M.read (| slice |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17240,7 +17133,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17272,7 +17165,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let slice_ptr := + let~ slice_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17285,7 +17178,7 @@ Module collections. [ M.read (| slice |) ] |) |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17307,7 +17200,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -17327,7 +17220,7 @@ Module collections. |), [ M.read (| slice_ptr |); - BinOp.Panic.add (| Integer.Usize, M.read (| idx |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| idx |)) (Value.Integer 1) ] |)); M.call_closure (| @@ -17340,11 +17233,10 @@ Module collections. |), [ M.read (| slice_ptr |); M.read (| idx |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| idx |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| idx |))) + (Value.Integer 1) ] |) |) in @@ -17371,7 +17263,7 @@ Module collections. (let slice := M.alloc (| slice |) in let distance := M.alloc (| distance |) in M.read (| - let slice_ptr := + let~ slice_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17384,7 +17276,7 @@ Module collections. [ M.read (| slice |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -17405,9 +17297,9 @@ Module collections. [ M.read (| slice_ptr |); M.read (| distance |) ] |)); M.read (| slice_ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -17416,9 +17308,8 @@ Module collections. [] |), [ M.read (| slice |) ] - |), - M.read (| distance |) - |) + |)) + (M.read (| distance |)) ] |) |) in @@ -17445,7 +17336,7 @@ Module collections. (let slice := M.alloc (| slice |) in let distance := M.alloc (| distance |) in M.read (| - let slice_ptr := + let~ slice_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17458,7 +17349,7 @@ Module collections. [ M.read (| slice |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -17477,9 +17368,9 @@ Module collections. |), [ M.read (| slice_ptr |); M.read (| distance |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -17488,9 +17379,8 @@ Module collections. [] |), [ M.read (| slice |) ] - |), - M.read (| distance |) - |) + |)) + (M.read (| distance |)) ] |) |) in @@ -17517,7 +17407,7 @@ Module collections. (let src := M.alloc (| src |) in let dst := M.alloc (| dst |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17571,7 +17461,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/alloc/collections/btree/remove.v b/CoqOfRust/alloc/collections/btree/remove.v index 55e38bb10..b89f2f57c 100644 --- a/CoqOfRust/alloc/collections/btree/remove.v +++ b/CoqOfRust/alloc/collections/btree/remove.v @@ -253,7 +253,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let old_kv := M.copy (| γ0_0 |) in let pos := M.copy (| γ0_1 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -320,7 +320,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -342,7 +342,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -368,7 +368,7 @@ Module collections. [ pos ] |) |) in - let new_pos := + let~ new_pos := M.copy (| M.match_operator (| M.alloc (| @@ -451,7 +451,7 @@ Module collections. 0 |) in let left_parent_kv := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -464,7 +464,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -486,15 +486,14 @@ Module collections. |), [ left_parent_kv ] |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) |)) in let _ := M.is_constant_or_break_match (| @@ -583,7 +582,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -599,7 +598,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -696,7 +695,7 @@ Module collections. 0 |) in let right_parent_kv := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -709,7 +708,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -731,15 +730,14 @@ Module collections. |), [ right_parent_kv ] |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::btree::map::MIN_LEN" |) - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) |)) in let _ := M.is_constant_or_break_match (| @@ -828,7 +826,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -844,7 +842,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -965,7 +963,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| pos, M.call_closure (| @@ -1156,7 +1154,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1241,7 +1239,7 @@ Module collections. let handle_emptied_internal_root := M.alloc (| handle_emptied_internal_root |) in let alloc := M.alloc (| alloc |) in M.read (| - let left_leaf_kv := + let~ left_leaf_kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1323,7 +1321,7 @@ Module collections. ] |) |) in - let left_leaf_kv := + let~ left_leaf_kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1422,7 +1420,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let left_kv := M.copy (| γ0_0 |) in let left_hole := M.copy (| γ0_1 |) in - let internal := + let~ internal := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1509,7 +1507,7 @@ Module collections. ] |) |) in - let old_kv := + let~ old_kv := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1537,7 +1535,7 @@ Module collections. ] |) |) in - let pos := + let~ pos := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/btree/search.v b/CoqOfRust/alloc/collections/btree/search.v index f5279396a..deec8c25a 100644 --- a/CoqOfRust/alloc/collections/btree/search.v +++ b/CoqOfRust/alloc/collections/btree/search.v @@ -87,7 +87,8 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.StructTuple "alloc::collections::btree::search::SearchBound::AllIncluded" [] @@ -441,7 +442,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let is_set := + let~ is_set := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -487,7 +488,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.read (| start |); M.read (| end_ |) ] |), [ @@ -776,7 +777,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let lower_bound := + let~ lower_bound := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -789,7 +790,7 @@ Module collections. [ M.read (| start |) ] |) |) in - let upper_bound := + let~ upper_bound := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -867,7 +868,7 @@ Module collections. M.SubPointer.get_tuple_field (| γ, 1 |) in let upper_edge_idx := M.copy (| γ0_0 |) in let upper_child_bound := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -922,7 +923,7 @@ Module collections. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -938,7 +939,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -998,7 +999,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -1049,7 +1050,7 @@ Module collections. (M.alloc (| Value.Tuple [] |))) ] |) in - let common_edge := + let~ common_edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1138,7 +1139,7 @@ Module collections. |) in let common_edge := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| self, M.call_closure (| @@ -1166,12 +1167,12 @@ Module collections. [ M.read (| common_edge |) ] |) |) in - let _ := + let~ _ := M.write (| lower_bound, M.read (| lower_child_bound |) |) in - let _ := + let~ _ := M.write (| upper_bound, M.read (| upper_child_bound |) @@ -1252,7 +1253,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let edge_idx := M.copy (| γ0_0 |) in let bound := M.copy (| γ0_1 |) in - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1341,7 +1342,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let edge_idx := M.copy (| γ0_0 |) in let bound := M.copy (| γ0_1 |) in - let edge := + let~ edge := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1529,7 +1530,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1542,7 +1543,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let keys := + let~ keys := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1560,7 +1561,7 @@ Module collections. [ node ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1572,7 +1573,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1618,7 +1619,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1679,7 +1680,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1700,7 +1701,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1744,21 +1750,31 @@ Module collections. |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))); + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Greater" + |) in + M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "alloc::collections::btree::search::IndexResult::KV" [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| start_index |), - M.read (| offset |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| start_index |)) + (M.read (| offset |)) ] |) |) @@ -1766,18 +1782,22 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Less" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "alloc::collections::btree::search::IndexResult::Edge" [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| start_index |), - M.read (| offset |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| start_index |)) + (M.read (| offset |)) ] |) |) @@ -1943,11 +1963,10 @@ Module collections. M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1); Value.StructTuple "alloc::collections::btree::search::SearchBound::AllIncluded" [] @@ -1967,7 +1986,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::btree::search::SearchBound::AllIncluded" + |) in + M.alloc (| Value.Tuple [ Value.Integer 0; @@ -1978,7 +2002,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::btree::search::SearchBound::AllExcluded" + |) in + M.alloc (| Value.Tuple [ M.call_closure (| @@ -2084,11 +2113,10 @@ Module collections. M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1); Value.StructTuple "alloc::collections::btree::search::SearchBound::AllExcluded" [] @@ -2161,7 +2189,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::btree::search::SearchBound::AllIncluded" + |) in + M.alloc (| Value.Tuple [ M.call_closure (| @@ -2181,7 +2214,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::btree::search::SearchBound::AllExcluded" + |) in + M.alloc (| Value.Tuple [ M.read (| start_index |); diff --git a/CoqOfRust/alloc/collections/btree/set.v b/CoqOfRust/alloc/collections/btree/set.v index f2a3486ad..8a1d43209 100644 --- a/CoqOfRust/alloc/collections/btree/set.v +++ b/CoqOfRust/alloc/collections/btree/set.v @@ -292,7 +292,7 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1756,6 +1756,11 @@ Module collections. γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Greater" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic @@ -1769,6 +1774,11 @@ Module collections. γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::cmp::Ordering::Less" + |) in Value.Tuple [])) ], M.closure @@ -1802,7 +1812,12 @@ Module collections. M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - let self_iter := + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in + let~ self_iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1816,7 +1831,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1843,7 +1858,12 @@ Module collections. M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in - let self_iter := + let _ := + M.is_struct_tuple (| + γ0_1, + "core::cmp::Ordering::Equal" + |) in + let~ self_iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1857,7 +1877,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1894,9 +1914,9 @@ Module collections. |), [ M.read (| self |) ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1906,13 +1926,12 @@ Module collections. [] |), [ M.read (| other |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" |) - |) - |)) + |))) |) in let _ := M.is_constant_or_break_match (| @@ -2320,6 +2339,11 @@ Module collections. γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Greater" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic @@ -2333,6 +2357,11 @@ Module collections. γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::cmp::Ordering::Less" + |) in Value.Tuple [])) ], M.closure @@ -2358,6 +2387,11 @@ Module collections. M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| Value.StructTuple "alloc::collections::btree::set::IntersectionInner::Answer" @@ -2373,6 +2407,11 @@ Module collections. M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::cmp::Ordering::Equal" + |) in M.alloc (| Value.StructTuple "alloc::collections::btree::set::IntersectionInner::Answer" @@ -2398,9 +2437,9 @@ Module collections. |), [ M.read (| self |) ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -2410,13 +2449,12 @@ Module collections. [] |), [ M.read (| other |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" |) - |) - |)) + |))) |) in let _ := M.is_constant_or_break_match (| @@ -2458,9 +2496,9 @@ Module collections. |), [ M.read (| other |) ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -2470,13 +2508,12 @@ Module collections. [] |), [ M.read (| self |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" |) - |) - |)) + |))) |) in let _ := M.is_constant_or_break_match (| @@ -2849,7 +2886,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3026,7 +3063,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let other_min := M.copy (| γ0_0 |) in let other_max := M.copy (| γ0_1 |) in - let self_iter := + let~ self_iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3039,7 +3076,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3056,7 +3093,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Less" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) @@ -3064,6 +3106,11 @@ Module collections. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3080,10 +3127,17 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Greater" + |) in + M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3100,7 +3154,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Greater" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.Bool false |) |) |) @@ -3108,6 +3167,11 @@ Module collections. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3124,10 +3188,17 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Less" + |) in + M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3150,9 +3221,9 @@ Module collections. |), [ self_iter ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -3162,13 +3233,12 @@ Module collections. [] |), [ M.read (| other |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "alloc::collections::btree::set::ITER_PERFORMANCE_TIPPING_SIZE_DIFF" |) - |) - |)) + |))) |)) in let _ := M.is_constant_or_break_match (| @@ -3198,7 +3268,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3218,7 +3288,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -3294,7 +3369,7 @@ Module collections. |)))); fun γ => ltac:(M.monadic - (let other_iter := + (let~ other_iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3308,7 +3383,7 @@ Module collections. [ M.read (| other |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3324,7 +3399,7 @@ Module collections. [ other_iter ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3340,7 +3415,7 @@ Module collections. [ other_iter ] |) |) in - let self_next := + let~ self_next := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3453,7 +3528,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Less" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -3464,7 +3544,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.write (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.write (| self_next, M.call_closure (| M.get_trait_method (| @@ -3482,7 +3567,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [] |))) + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Greater" + |) in + M.alloc (| Value.Tuple [] |))) ] |))); fun γ => @@ -3490,7 +3580,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -4090,7 +4180,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4179,7 +4269,7 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4435,7 +4525,7 @@ Module collections. (let iter := M.alloc (| iter |) in let alloc := M.alloc (| alloc |) in M.read (| - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4486,7 +4576,7 @@ Module collections. ] |) |) in - let map := + let~ map := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4551,7 +4641,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let inputs := + let~ inputs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4579,7 +4669,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4625,7 +4715,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4722,7 +4812,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4763,7 +4853,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4774,7 +4864,7 @@ Module collections. [ (* Unsize *) M.pointer_coercion arr ] |) |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4835,7 +4925,7 @@ Module collections. ] |) |) in - let map := + let~ map := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5164,7 +5254,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pred := + let~ pred := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5172,7 +5262,7 @@ Module collections. "pred" |) |) in - let mapped_pred := + let~ mapped_pred := M.alloc (| M.closure (fun γ => @@ -5370,7 +5460,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5403,7 +5493,7 @@ Module collections. ltac:(M.monadic (let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5444,7 +5534,7 @@ Module collections. (let self := M.alloc (| self |) in let elem := M.alloc (| elem |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5490,7 +5580,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5555,7 +5645,7 @@ Module collections. (let γ := M.read (| γ |) in let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7431,7 +7521,7 @@ Module collections. |) in let self_iter := M.alloc (| γ1_0 |) in let other_iter := M.alloc (| γ1_1 |) in - let self_next := + let~ self_next := M.copy (| M.match_operator (| M.alloc (| @@ -7593,7 +7683,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Less" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -7607,6 +7702,11 @@ Module collections. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + let~ _ := M.write (| self_next, M.read (| @@ -7696,7 +7796,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7721,6 +7821,11 @@ Module collections. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Greater" + |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7770,7 +7875,7 @@ Module collections. M.read (| M.loop (| ltac:(M.monadic - (let self_next := + (let~ self_next := M.copy (| M.match_operator (| M.alloc (| @@ -8394,11 +8499,10 @@ Module collections. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| a_len |), - M.read (| b_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| a_len |)) + (M.read (| b_len |)) ] ] |))) @@ -8682,7 +8786,7 @@ Module collections. |) in let a := M.alloc (| γ1_0 |) in let b := M.alloc (| γ1_1 |) in - let a_next := + let~ a_next := M.copy (| M.match_operator (| M.alloc (| @@ -8759,7 +8863,7 @@ Module collections. ] |) |) in - let b_next := + let~ b_next := M.copy (| M.match_operator (| M.alloc (| @@ -8857,7 +8961,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.write (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Less" + |) in + M.write (| a_next, M.read (| M.match_operator (| @@ -8948,7 +9057,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.write (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Greater" + |) in + M.write (| b_next, M.read (| M.match_operator (| @@ -9039,7 +9153,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -9078,7 +9197,7 @@ Module collections. M.read (| M.loop (| ltac:(M.monadic - (let small_next := + (let~ small_next := M.copy (| M.match_operator (| M.alloc (| @@ -9357,6 +9476,7 @@ Module collections. "alloc::collections::btree::set::IntersectionInner::Answer", 0 |) in + let _ := M.is_struct_tuple (| γ1_0, "core::option::Option::None" |) in M.alloc (| Value.Tuple [ @@ -9621,11 +9741,10 @@ Module collections. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| a_len |), - M.read (| b_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| a_len |)) + (M.read (| b_len |)) ] ] |))) diff --git a/CoqOfRust/alloc/collections/btree/split.v b/CoqOfRust/alloc/collections/btree/split.v index dbacabca0..83cf5439d 100644 --- a/CoqOfRust/alloc/collections/btree/split.v +++ b/CoqOfRust/alloc/collections/btree/split.v @@ -52,7 +52,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let length_a := M.copy (| γ0_0 |) in let length_b := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -102,7 +102,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| length_a, M.call_closure (| @@ -141,16 +141,15 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| length_b, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| total_num |), - M.read (| length_a |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| total_num |)) + (M.read (| length_a |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -162,7 +161,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -243,7 +242,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -285,7 +284,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| length_b, M.call_closure (| @@ -324,16 +323,15 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| length_a, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| total_num |), - M.read (| length_b |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| total_num |)) + (M.read (| length_b |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -345,7 +343,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -426,7 +424,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -522,8 +520,8 @@ Module collections. let key := M.alloc (| key |) in let alloc := M.alloc (| alloc |) in M.read (| - let left_root := M.copy (| self |) in - let right_root := + let~ left_root := M.copy (| self |) in + let~ right_root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -561,7 +559,7 @@ Module collections. ] |) |) in - let left_node := + let~ left_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -579,7 +577,7 @@ Module collections. [ M.read (| left_root |) ] |) |) in - let right_node := + let~ right_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -597,10 +595,10 @@ Module collections. [ right_root ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic - (let split_edge := + (let~ split_edge := M.copy (| M.match_operator (| M.alloc (| @@ -668,7 +666,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -754,7 +752,7 @@ Module collections. 0 |) in let node := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.write (| left_node, M.call_closure (| @@ -780,7 +778,7 @@ Module collections. [ M.read (| edge |) ] |) |) in - let _ := + let~ _ := M.write (| right_node, M.call_closure (| @@ -859,7 +857,7 @@ Module collections. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -883,7 +881,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -927,7 +925,7 @@ Module collections. (let height := M.alloc (| height |) in let alloc := M.alloc (| alloc |) in M.read (| - let root := + let~ root := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -950,7 +948,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -975,7 +973,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -994,7 +992,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1005,7 +1008,7 @@ Module collections. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/collections/linked_list.v b/CoqOfRust/alloc/collections/linked_list.v index 27f0f5946..3cc9b2d75 100644 --- a/CoqOfRust/alloc/collections/linked_list.v +++ b/CoqOfRust/alloc/collections/linked_list.v @@ -656,7 +656,7 @@ Module collections. (let self := M.alloc (| self |) in let node := M.alloc (| node |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -680,7 +680,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -698,11 +698,11 @@ Module collections. |), Value.StructTuple "core::option::Option::None" [] |) in - let node := + let~ node := M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| node |) ] |) in - let _ := + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -712,7 +712,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.write (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", @@ -749,7 +750,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -758,17 +759,14 @@ Module collections. |), M.read (| node |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", "len" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -857,7 +855,7 @@ Module collections. ltac:(M.monadic (let node := M.copy (| γ |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -896,7 +894,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -911,7 +909,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -921,7 +919,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.write (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", @@ -962,7 +965,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -971,11 +974,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in node |))) @@ -1020,7 +1022,7 @@ Module collections. (let self := M.alloc (| self |) in let node := M.alloc (| node |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -1038,7 +1040,7 @@ Module collections. |), Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -1062,11 +1064,11 @@ Module collections. |) |) |) in - let node := + let~ node := M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| node |) ] |) in - let _ := + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1076,7 +1078,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.write (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", @@ -1113,7 +1116,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1122,17 +1125,14 @@ Module collections. |), M.read (| node |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", "len" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -1221,7 +1221,7 @@ Module collections. ltac:(M.monadic (let node := M.copy (| γ |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1260,7 +1260,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1275,7 +1275,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1285,7 +1285,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.write (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", @@ -1326,7 +1331,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1335,11 +1340,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in node |))) @@ -1384,7 +1388,7 @@ Module collections. (let self := M.alloc (| self |) in let node := M.alloc (| node |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1397,7 +1401,7 @@ Module collections. [ node ] |) |) in - let _ := + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| M.read (| node |), @@ -1440,7 +1444,8 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.write (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", @@ -1456,7 +1461,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| M.read (| node |), @@ -1499,7 +1504,8 @@ Module collections. |))); fun γ => ltac:(M.monadic - (M.write (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", @@ -1515,17 +1521,14 @@ Module collections. |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", "len" |) in - M.write (| - β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -1580,7 +1583,7 @@ Module collections. let splice_end := M.alloc (| splice_end |) in let splice_length := M.alloc (| splice_length |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1594,7 +1597,7 @@ Module collections. 0 |) in let existing_prev := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -1621,7 +1624,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1635,7 +1638,7 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1649,7 +1652,7 @@ Module collections. 0 |) in let existing_next := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -1676,7 +1679,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1690,8 +1693,8 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -1709,7 +1712,7 @@ Module collections. |), M.read (| existing_prev |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -1728,7 +1731,7 @@ Module collections. M.read (| existing_next |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1737,7 +1740,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| splice_length |) |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| splice_length |)) |) in M.alloc (| Value.Tuple [] |) |))) @@ -1771,7 +1774,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let head := + let~ head := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1794,7 +1797,7 @@ Module collections. ] |) |) in - let tail := + let~ tail := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1817,7 +1820,7 @@ Module collections. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_function (| "core::mem::replace", [ Ty.path "usize" ] |), @@ -1844,7 +1847,7 @@ Module collections. 0 |) in let head := M.copy (| γ0_0 |) in - let tail := + let~ tail := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1948,10 +1951,10 @@ Module collections. 0 |) in let split_node := M.copy (| γ0_0 |) in - let first_part_head := M.copy (| Value.DeclaredButUndefined |) in - let first_part_tail := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let _ := + let~ first_part_head := M.copy (| Value.DeclaredButUndefined |) in + let~ first_part_tail := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ _ := M.write (| first_part_tail, M.call_closure (| @@ -1993,7 +1996,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2007,8 +2010,8 @@ Module collections. 0 |) in let tail := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -2031,7 +2034,7 @@ Module collections. Value.StructTuple "core::option::Option::None" [] |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| first_part_head, M.read (| @@ -2045,7 +2048,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| first_part_head, Value.StructTuple "core::option::Option::None" [] @@ -2053,7 +2056,7 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let first_part := + let~ first_part := M.alloc (| Value.StructRecord "alloc::collections::linked_list::LinkedList" @@ -2075,7 +2078,7 @@ Module collections. ("marker", Value.StructTuple "core::marker::PhantomData" []) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2084,24 +2087,23 @@ Module collections. |), Value.StructTuple "core::option::Option::Some" [ M.read (| split_node |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", "len" |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", "len" |) - |), - M.read (| at_ |) - |) + |)) + (M.read (| at_ |)) |) in first_part)); fun γ => @@ -2218,10 +2220,10 @@ Module collections. 0 |) in let split_node := M.copy (| γ0_0 |) in - let second_part_head := M.copy (| Value.DeclaredButUndefined |) in - let second_part_tail := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let _ := + let~ second_part_head := M.copy (| Value.DeclaredButUndefined |) in + let~ second_part_tail := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ _ := M.write (| second_part_head, M.call_closure (| @@ -2263,7 +2265,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2277,8 +2279,8 @@ Module collections. 0 |) in let head := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -2301,7 +2303,7 @@ Module collections. Value.StructTuple "core::option::Option::None" [] |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| second_part_tail, M.read (| @@ -2315,7 +2317,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| second_part_tail, Value.StructTuple "core::option::Option::None" [] @@ -2323,7 +2325,7 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let second_part := + let~ second_part := M.alloc (| Value.StructRecord "alloc::collections::linked_list::LinkedList" @@ -2331,17 +2333,16 @@ Module collections. ("head", M.read (| second_part_head |)); ("tail", M.read (| second_part_tail |)); ("len", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::LinkedList", "len" |) - |), - M.read (| at_ |) - |)); + |)) + (M.read (| at_ |))); ("alloc", M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), @@ -2356,7 +2357,7 @@ Module collections. ("marker", Value.StructTuple "core::marker::PhantomData" []) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2365,7 +2366,7 @@ Module collections. |), Value.StructTuple "core::option::Option::Some" [ M.read (| split_node |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2800,7 +2801,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3406,7 +3407,7 @@ Module collections. (let self := M.alloc (| self |) in let elt := M.alloc (| elt |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3436,7 +3437,7 @@ Module collections. ] |) |) in - let node_ptr := + let~ node_ptr := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3469,7 +3470,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3568,7 +3569,7 @@ Module collections. (let self := M.alloc (| self |) in let elt := M.alloc (| elt |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3598,7 +3599,7 @@ Module collections. ] |) |) in - let node_ptr := + let~ node_ptr := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3631,7 +3632,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3757,7 +3758,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3768,7 +3769,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3814,7 +3815,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3934,7 +3935,7 @@ Module collections. |))) ] |) in - let split_node := + let~ split_node := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3945,31 +3946,27 @@ Module collections. M.use (M.alloc (| BinOp.Pure.le - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| at_ |), - Value.Integer 1 - |)) - (BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| at_ |), - Value.Integer 1 - |) - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| at_ |)) + (Value.Integer 1)) + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (Value.Integer 1)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| at_ |)) + (Value.Integer 1))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3982,7 +3979,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4002,11 +3999,10 @@ Module collections. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| at_ |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| at_ |)) + (Value.Integer 1)) ] ] |) @@ -4017,7 +4013,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4036,7 +4032,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -4049,7 +4050,7 @@ Module collections. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4079,7 +4080,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let iter := + (let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4092,7 +4093,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4112,19 +4113,16 @@ Module collections. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| at_ |), - Value.Integer 1 - |) - |)) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (Value.Integer 1)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| at_ |)) + (Value.Integer 1))) ] ] |) @@ -4135,7 +4133,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4154,7 +4152,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -4167,7 +4170,7 @@ Module collections. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4248,7 +4251,7 @@ Module collections. (let self := M.alloc (| self |) in let at_ := M.alloc (| at_ |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4259,7 +4262,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4304,13 +4307,12 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset_from_end := + let~ offset_from_end := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| at_ |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| at_ |))) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4323,7 +4325,7 @@ Module collections. BinOp.Pure.le (M.read (| at_ |)) (M.read (| offset_from_end |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let cursor := + let~ cursor := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4336,7 +4338,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4361,7 +4363,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4380,7 +4382,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4391,7 +4398,7 @@ Module collections. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4435,7 +4442,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let cursor := + (let~ cursor := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4448,7 +4455,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4476,7 +4483,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4495,7 +4502,12 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4506,7 +4518,7 @@ Module collections. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4574,7 +4586,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4648,7 +4660,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let cursor := + let~ cursor := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4711,7 +4723,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4737,7 +4749,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4758,7 +4770,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4795,7 +4807,7 @@ Module collections. (let self := M.alloc (| self |) in let filter := M.alloc (| filter |) in M.read (| - let it := + let~ it := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4803,7 +4815,7 @@ Module collections. "head" |) |) in - let old_len := + let~ old_len := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4938,7 +4950,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", @@ -4999,8 +5012,8 @@ Module collections. 0 |) in let other_head := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -5024,7 +5037,7 @@ Module collections. "core::option::Option::Some" [ M.read (| other_head |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -5049,7 +5062,7 @@ Module collections. [ M.read (| tail |) ] |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5081,7 +5094,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5090,10 +5103,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_function (| "core::mem::replace", [ Ty.path "usize" ] @@ -5106,8 +5119,7 @@ Module collections. |); Value.Integer 0 ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -5154,13 +5166,13 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let guard := + let~ guard := M.alloc (| Value.StructTuple "alloc::collections::linked_list::drop::DropGuard" [ M.read (| self |) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5221,7 +5233,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -5230,7 +5242,7 @@ Module collections. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5359,7 +5371,7 @@ Module collections. ltac:(M.monadic (let node := M.copy (| γ |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5377,7 +5389,7 @@ Module collections. [ M.read (| node |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5386,13 +5398,12 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5600,7 +5611,7 @@ Module collections. ltac:(M.monadic (let node := M.copy (| γ |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5618,7 +5629,7 @@ Module collections. [ M.read (| node |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5627,13 +5638,12 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5855,7 +5865,7 @@ Module collections. ltac:(M.monadic (let node := M.copy (| γ |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5873,7 +5883,7 @@ Module collections. [ M.read (| node |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5882,13 +5892,12 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6096,7 +6105,7 @@ Module collections. ltac:(M.monadic (let node := M.copy (| γ |) in M.read (| - let node := + let~ node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6114,7 +6123,7 @@ Module collections. [ M.read (| node |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6123,13 +6132,12 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6702,7 +6710,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6723,7 +6732,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6742,7 +6751,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6770,7 +6779,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6779,7 +6788,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -6841,7 +6850,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6862,7 +6872,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6914,7 +6924,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6942,7 +6952,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7119,7 +7129,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let next := + let~ next := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -7130,7 +7140,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7257,7 +7268,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let prev := + let~ prev := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -7268,7 +7279,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7617,7 +7629,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7638,7 +7651,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7657,7 +7670,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7685,7 +7698,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7694,7 +7707,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -7756,7 +7769,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7777,7 +7791,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7829,7 +7843,7 @@ Module collections. 0 |) in let current := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7857,7 +7871,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8034,7 +8048,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let next := + let~ next := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -8045,7 +8059,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8172,7 +8187,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let prev := + let~ prev := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -8183,7 +8198,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8361,7 +8377,7 @@ Module collections. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let spliced_node := + let~ spliced_node := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8428,7 +8444,7 @@ Module collections. ] |) |) in - let node_next := + let~ node_next := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -8439,7 +8455,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8477,7 +8494,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8541,7 +8558,7 @@ Module collections. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8595,7 +8612,7 @@ Module collections. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let spliced_node := + let~ spliced_node := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8662,7 +8679,7 @@ Module collections. ] |) |) in - let node_prev := + let~ node_prev := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -8673,7 +8690,8 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8711,7 +8729,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8741,17 +8759,14 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::CursorMut", "index" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -8781,7 +8796,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let unlinked_node := + let~ unlinked_node := M.copy (| M.match_operator (| M.alloc (| @@ -8859,7 +8874,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8884,7 +8899,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8904,7 +8919,7 @@ Module collections. ] |) |) in - let unlinked_node := + let~ unlinked_node := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8985,7 +9000,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let unlinked_node := + let~ unlinked_node := M.copy (| M.match_operator (| M.alloc (| @@ -9070,7 +9085,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9095,7 +9110,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9115,7 +9130,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -9133,7 +9148,7 @@ Module collections. |), Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -9217,7 +9232,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let split_off_idx := + let~ split_off_idx := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9255,22 +9270,21 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::CursorMut", "index" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |))) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9303,7 +9317,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9367,7 +9381,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let split_off_idx := + let~ split_off_idx := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9375,7 +9389,7 @@ Module collections. "index" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9435,7 +9449,7 @@ Module collections. (let self := M.alloc (| self |) in let elt := M.alloc (| elt |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9455,17 +9469,14 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::CursorMut", "index" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -9496,7 +9507,7 @@ Module collections. (let self := M.alloc (| self |) in let elt := M.alloc (| elt |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9549,7 +9560,7 @@ Module collections. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9558,7 +9569,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -9631,7 +9642,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9697,7 +9708,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9713,7 +9724,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9722,11 +9733,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -9816,7 +9823,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9882,7 +9889,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9933,16 +9940,16 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::CursorMut", "index" |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| @@ -9954,9 +9961,8 @@ Module collections. "alloc::collections::linked_list::LinkedList", "len" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -10207,7 +10213,7 @@ Module collections. let splice_head := M.copy (| γ0_0 |) in let splice_tail := M.copy (| γ0_1 |) in let splice_len := M.copy (| γ0_2 |) in - let node_next := + let~ node_next := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -10218,7 +10224,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10259,7 +10267,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10330,7 +10338,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10433,7 +10441,7 @@ Module collections. let splice_head := M.copy (| γ0_0 |) in let splice_tail := M.copy (| γ0_1 |) in let splice_len := M.copy (| γ0_2 |) in - let node_prev := + let~ node_prev := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -10444,7 +10452,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.SubPointer.get_struct_record_field (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10485,7 +10495,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10517,7 +10527,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10526,11 +10536,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| splice_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| splice_len |)) |) in M.alloc (| Value.Tuple [] |))) ] @@ -10604,7 +10613,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -10625,7 +10634,7 @@ Module collections. 0 |) in let node := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10653,7 +10662,7 @@ Module collections. |) |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10662,11 +10671,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10724,7 +10729,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10803,7 +10808,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -10837,23 +10842,22 @@ Module collections. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::ExtractIf", "old_len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::linked_list::ExtractIf", "idx" |) - |) - |) + |)) ] ])) | _, _ => M.impossible @@ -11168,7 +11172,7 @@ Module collections. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let list := + let~ list := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11181,7 +11185,7 @@ Module collections. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11367,7 +11371,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11398,7 +11402,7 @@ Module collections. (let self := M.alloc (| self |) in let elem := M.alloc (| elem |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11444,7 +11448,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11532,7 +11536,7 @@ Module collections. ltac:(M.monadic (let other := M.alloc (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11584,7 +11588,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11646,7 +11650,7 @@ Module collections. (let γ := M.read (| γ |) in let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11948,7 +11952,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let list := + let~ list := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11970,7 +11974,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12037,7 +12041,7 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let iter_other := + let~ iter_other := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12048,7 +12052,7 @@ Module collections. [ M.read (| other |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12081,7 +12085,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12110,7 +12114,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -12166,7 +12170,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -12196,7 +12200,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -12211,7 +12217,7 @@ Module collections. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let elem := M.copy (| γ1_0 |) in let elem_other := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12252,7 +12258,7 @@ Module collections. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12388,7 +12394,7 @@ Module collections. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_length_prefix", [] |), @@ -12431,7 +12437,7 @@ Module collections. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -12450,7 +12456,9 @@ Module collections. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -12462,7 +12470,7 @@ Module collections. 0 |) in let elt := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/alloc/collections/mod.v b/CoqOfRust/alloc/collections/mod.v index cbe23b04a..36ebeeb52 100644 --- a/CoqOfRust/alloc/collections/mod.v +++ b/CoqOfRust/alloc/collections/mod.v @@ -257,6 +257,11 @@ Module collections. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + |) in M.alloc (| Value.StructTuple "alloc::collections::TryReserveErrorKind::CapacityOverflow" @@ -343,7 +348,7 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -353,7 +358,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -510,6 +515,11 @@ Module collections. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -656,7 +666,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -731,7 +741,7 @@ Module collections. val)) ] |) in - let reason := + let~ reason := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -742,11 +752,21 @@ Module collections. [ fun γ => ltac:(M.monadic - (Value.String + (let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + |) in + Value.String " because the computed capacity exceeded the collection's maximum")); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "alloc::collections::TryReserveErrorKind::AllocError" + |) in + M.alloc (| M.read (| Value.String " because the memory allocator returned an error" |) diff --git a/CoqOfRust/alloc/collections/vec_deque/drain.v b/CoqOfRust/alloc/collections/vec_deque/drain.v index dd7c515c5..2c3cef0bd 100644 --- a/CoqOfRust/alloc/collections/vec_deque/drain.v +++ b/CoqOfRust/alloc/collections/vec_deque/drain.v @@ -54,7 +54,7 @@ Module collections. let drain_start := M.alloc (| drain_start |) in let drain_len := M.alloc (| drain_len |) in M.read (| - let orig_len := + let~ orig_len := M.alloc (| M.call_closure (| M.get_function (| "core::mem::replace", [ Ty.path "usize" ] |), @@ -68,17 +68,15 @@ Module collections. ] |) |) in - let tail_len := + let~ tail_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| orig_len |), - M.read (| drain_start |) - |), - M.read (| drain_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| orig_len |)) + (M.read (| drain_start |))) + (M.read (| drain_len |)) |) in M.alloc (| Value.StructRecord @@ -150,7 +148,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let deque := + let~ deque := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -169,7 +167,7 @@ Module collections. ] |) |) in - let logical_remaining_range := + let~ logical_remaining_range := M.alloc (| Value.StructRecord "core::ops::range::Range" @@ -183,23 +181,22 @@ Module collections. |) |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "idx" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "remaining" |) - |) - |)) + |))) ] |) in M.match_operator (| @@ -511,7 +508,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let guard := + let~ guard := M.alloc (| Value.StructTuple "alloc::collections::vec_deque::drain::drop::DropGuard" @@ -571,7 +568,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let front := M.copy (| γ0_0 |) in let back := M.copy (| γ0_1 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| @@ -586,10 +583,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -598,10 +595,9 @@ Module collections. [] |), [ M.read (| front |) ] - |) - |) + |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| @@ -616,10 +612,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -628,10 +624,9 @@ Module collections. [] |), [ M.read (| front |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -641,7 +636,7 @@ Module collections. [ M.read (| front |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -656,7 +651,7 @@ Module collections. |), Value.Integer 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -712,7 +707,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -748,7 +743,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let wrapped_idx := + let~ wrapped_idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -787,7 +782,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -796,9 +791,9 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -807,7 +802,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -863,7 +858,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -919,7 +914,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -955,7 +950,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -964,9 +959,9 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let wrapped_idx := + let~ wrapped_idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -995,23 +990,22 @@ Module collections. |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "idx" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::drain::Drain", "remaining" |) - |) - |) + |)) ] |) |) in diff --git a/CoqOfRust/alloc/collections/vec_deque/into_iter.v b/CoqOfRust/alloc/collections/vec_deque/into_iter.v index ac2750c99..a6a003650 100644 --- a/CoqOfRust/alloc/collections/vec_deque/into_iter.v +++ b/CoqOfRust/alloc/collections/vec_deque/into_iter.v @@ -218,7 +218,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -267,7 +267,7 @@ Module collections. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -279,7 +279,7 @@ Module collections. "len" |) |) in - let rem := + let~ rem := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -291,7 +291,7 @@ Module collections. (M.alloc (| BinOp.Pure.lt (M.read (| len |)) (M.read (| n |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -311,11 +311,11 @@ Module collections. |) |) in M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| len |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| len |)) |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -460,7 +460,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::collections::vec_deque::into_iter::try_fold::Guard" @@ -500,7 +500,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| init, M.read (| @@ -571,7 +571,7 @@ Module collections. ltac:(M.monadic (let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -580,11 +580,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -702,7 +701,7 @@ Module collections. ltac:(M.monadic (let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -711,11 +710,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -943,7 +941,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let raw_arr := + let~ raw_arr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -954,7 +952,7 @@ Module collections. [] |) |) in - let raw_arr_ptr := + let~ raw_arr_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1003,7 +1001,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1035,7 +1033,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1060,7 +1058,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1094,7 +1092,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1107,15 +1105,14 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| M.get_constant (| "alloc::collections::vec_deque::into_iter::next_chunk::N" |) - |) - |) + |)) |) in M.return_ (| Value.StructTuple @@ -1156,7 +1153,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1184,24 +1181,23 @@ Module collections. ] |) |) in - let remaining := + let~ remaining := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "alloc::collections::vec_deque::into_iter::next_chunk::N" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| head |) ] - |) - |) + |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1227,7 +1223,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1265,7 +1261,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1298,7 +1294,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1311,15 +1307,14 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| M.get_constant (| "alloc::collections::vec_deque::into_iter::next_chunk::N" |) - |) - |) + |)) |) in M.alloc (| Value.StructTuple @@ -1355,7 +1350,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1400,29 +1395,28 @@ Module collections. ] |) |) in - let init := + let~ init := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| head |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| tail |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1435,7 +1429,7 @@ Module collections. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1554,7 +1548,7 @@ Module collections. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1566,7 +1560,7 @@ Module collections. "len" |) |) in - let rem := + let~ rem := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1578,7 +1572,7 @@ Module collections. (M.alloc (| BinOp.Pure.lt (M.read (| len |)) (M.read (| n |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1598,11 +1592,11 @@ Module collections. |) |) in M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| len |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| len |)) |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1618,11 +1612,7 @@ Module collections. "alloc::collections::vec_deque::into_iter::IntoIter", "inner" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| n |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| n |)) ] |) |) in @@ -1717,7 +1707,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::collections::vec_deque::into_iter::try_rfold::Guard" @@ -1757,7 +1747,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| init, M.read (| @@ -1828,7 +1818,7 @@ Module collections. ltac:(M.monadic (let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -1837,11 +1827,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -1959,7 +1948,7 @@ Module collections. ltac:(M.monadic (let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -1968,11 +1957,10 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| M.call_closure (| diff --git a/CoqOfRust/alloc/collections/vec_deque/iter.v b/CoqOfRust/alloc/collections/vec_deque/iter.v index cb918bfb7..b2d8988b8 100644 --- a/CoqOfRust/alloc/collections/vec_deque/iter.v +++ b/CoqOfRust/alloc/collections/vec_deque/iter.v @@ -272,7 +272,8 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -339,7 +340,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let remaining := + let~ remaining := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -388,7 +389,7 @@ Module collections. 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -455,7 +456,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -497,7 +498,7 @@ Module collections. let accum := M.alloc (| accum |) in let f := M.alloc (| f |) in M.read (| - let accum := + let~ accum := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -567,7 +568,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let acc := + let~ acc := M.copy (| M.match_operator (| M.alloc (| @@ -713,7 +714,7 @@ Module collections. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let i1_len := + let~ i1_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -780,11 +781,7 @@ Module collections. "alloc::collections::vec_deque::iter::Iter", "i2" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| idx |), - M.read (| i1_len |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| idx |)) (M.read (| i1_len |)) ] |) |))) @@ -874,7 +871,8 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -987,7 +985,7 @@ Module collections. 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1059,7 +1057,7 @@ Module collections. let accum := M.alloc (| accum |) in let f := M.alloc (| f |) in M.read (| - let accum := + let~ accum := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1129,7 +1127,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let acc := + let~ acc := M.copy (| M.match_operator (| M.alloc (| @@ -1259,9 +1257,9 @@ Module collections. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], @@ -1276,8 +1274,8 @@ Module collections. "i1" |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "core::slice::iter::Iter") [ T ], @@ -1292,8 +1290,7 @@ Module collections. "i2" |) ] - |) - |))) + |)))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/collections/vec_deque/iter_mut.v b/CoqOfRust/alloc/collections/vec_deque/iter_mut.v index 47304d099..662cb5aad 100644 --- a/CoqOfRust/alloc/collections/vec_deque/iter_mut.v +++ b/CoqOfRust/alloc/collections/vec_deque/iter_mut.v @@ -207,7 +207,8 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -320,7 +321,7 @@ Module collections. 0 |) in let remaining := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -387,7 +388,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -429,7 +430,7 @@ Module collections. let accum := M.alloc (| accum |) in let f := M.alloc (| f |) in M.read (| - let accum := + let~ accum := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -499,7 +500,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let acc := + let~ acc := M.copy (| M.match_operator (| M.alloc (| @@ -645,7 +646,7 @@ Module collections. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let i1_len := + let~ i1_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -714,11 +715,10 @@ Module collections. "alloc::collections::vec_deque::iter_mut::IterMut", "i2" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| idx |), - M.read (| i1_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| idx |)) + (M.read (| i1_len |)) ] |) |))) @@ -810,7 +810,8 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -923,7 +924,7 @@ Module collections. 0 |) in let remaining := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -995,7 +996,7 @@ Module collections. let accum := M.alloc (| accum |) in let f := M.alloc (| f |) in M.read (| - let accum := + let~ accum := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1065,7 +1066,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let acc := + let~ acc := M.copy (| M.match_operator (| M.alloc (| @@ -1195,9 +1196,9 @@ Module collections. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], @@ -1212,8 +1213,8 @@ Module collections. "i1" |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "core::slice::iter::IterMut") [ T ], @@ -1228,8 +1229,7 @@ Module collections. "i2" |) ] - |) - |))) + |)))) | _, _ => M.impossible end. diff --git a/CoqOfRust/alloc/collections/vec_deque/macros.v b/CoqOfRust/alloc/collections/vec_deque/macros.v index 63cda35a1..46f27d2f4 100644 --- a/CoqOfRust/alloc/collections/vec_deque/macros.v +++ b/CoqOfRust/alloc/collections/vec_deque/macros.v @@ -27,7 +27,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -201,7 +201,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -376,7 +376,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -551,7 +551,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -725,7 +725,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -903,7 +903,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/alloc/collections/vec_deque/mod.v b/CoqOfRust/alloc/collections/vec_deque/mod.v index bd430c57c..434543d19 100644 --- a/CoqOfRust/alloc/collections/vec_deque/mod.v +++ b/CoqOfRust/alloc/collections/vec_deque/mod.v @@ -33,7 +33,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let deq := + let~ deq := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -66,7 +66,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -123,7 +123,7 @@ Module collections. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -134,7 +134,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -242,13 +242,13 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let front := M.copy (| γ0_0 |) in let back := M.copy (| γ0_1 |) in - let _back_dropper := + let~ _back_dropper := M.alloc (| Value.StructTuple "alloc::collections::vec_deque::drop::Dropper" [ M.read (| back |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -404,7 +404,7 @@ Module collections. let off := M.alloc (| off |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -473,23 +473,22 @@ Module collections. |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| range, "core::ops::range::Range", "end" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| range, "core::ops::range::Range", "start" |) - |) - |) + |)) ] |))) | _, _ => M.impossible @@ -690,7 +689,7 @@ Module collections. let dst := M.alloc (| dst |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -699,7 +698,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -710,11 +709,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| dst |), - M.read (| len |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| dst |)) + (M.read (| len |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -821,7 +819,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -830,7 +828,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -841,11 +839,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| src |), - M.read (| len |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| src |)) + (M.read (| len |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -952,7 +949,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -1039,7 +1036,7 @@ Module collections. let dst := M.alloc (| dst |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1048,7 +1045,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1059,11 +1056,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| dst |), - M.read (| len |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| dst |)) + (M.read (| len |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -1170,7 +1166,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1179,7 +1175,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1190,11 +1186,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| src |), - M.read (| len |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| src |)) + (M.read (| len |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -1301,7 +1296,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -1499,7 +1494,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1508,7 +1503,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1519,9 +1514,9 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] @@ -1535,9 +1530,9 @@ Module collections. |), [ M.read (| src |); M.read (| dst |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -1547,20 +1542,18 @@ Module collections. [] |), [ M.read (| self |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "abs_diff", [] |), [ M.read (| src |); M.read (| dst |) ] - |) - |) + |)) ] - |), - M.read (| len |) - |)) + |)) + (M.read (| len |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -1667,7 +1660,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1698,7 +1691,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let dst_after_src := + let~ dst_after_src := M.alloc (| BinOp.Pure.lt (M.call_closure (| @@ -1711,41 +1704,39 @@ Module collections. |)) (M.read (| len |)) |) in - let src_pre_wrap_len := + let~ src_pre_wrap_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |), - M.read (| src |) - |) + |)) + (M.read (| src |)) |) in - let dst_pre_wrap_len := + let~ dst_pre_wrap_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |), - M.read (| dst |) - |) + |)) + (M.read (| dst |)) |) in - let src_wraps := + let~ src_wraps := M.alloc (| BinOp.Pure.lt (M.read (| src_pre_wrap_len |)) (M.read (| len |)) |) in - let dst_wraps := + let~ dst_wraps := M.alloc (| BinOp.Pure.lt (M.read (| dst_pre_wrap_len |)) (M.read (| len |)) |) in @@ -1771,7 +1762,7 @@ Module collections. M.read (| γ0_2 |), Value.Bool false |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1807,7 +1798,7 @@ Module collections. |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1825,7 +1816,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1837,17 +1828,15 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| src |), - M.read (| dst_pre_wrap_len |) - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| src |)) + (M.read (| dst_pre_wrap_len |)); Value.Integer 0; - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| dst_pre_wrap_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| dst_pre_wrap_len |)) ] |) |) in @@ -1866,7 +1855,7 @@ Module collections. |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1878,21 +1867,19 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| src |), - M.read (| dst_pre_wrap_len |) - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| src |)) + (M.read (| dst_pre_wrap_len |)); Value.Integer 0; - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| dst_pre_wrap_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| dst_pre_wrap_len |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1928,7 +1915,7 @@ Module collections. M.read (| γ0_2 |), Value.Bool false |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1946,7 +1933,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1959,16 +1946,14 @@ Module collections. [ M.read (| self |); Value.Integer 0; - BinOp.Panic.add (| - Integer.Usize, - M.read (| dst |), - M.read (| src_pre_wrap_len |) - |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| src_pre_wrap_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| dst |)) + (M.read (| src_pre_wrap_len |)); + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| src_pre_wrap_len |)) ] |) |) in @@ -1987,7 +1972,7 @@ Module collections. M.read (| γ0_2 |), Value.Bool false |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2000,20 +1985,18 @@ Module collections. [ M.read (| self |); Value.Integer 0; - BinOp.Panic.add (| - Integer.Usize, - M.read (| dst |), - M.read (| src_pre_wrap_len |) - |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| src_pre_wrap_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| dst |)) + (M.read (| src_pre_wrap_len |)); + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| src_pre_wrap_len |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2046,7 +2029,7 @@ Module collections. M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool true |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2058,7 +2041,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2100,15 +2083,14 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let delta := + let~ delta := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| dst_pre_wrap_len |), - M.read (| src_pre_wrap_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| dst_pre_wrap_len |)) + (M.read (| src_pre_wrap_len |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2126,7 +2108,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2139,16 +2121,15 @@ Module collections. [ M.read (| self |); Value.Integer 0; - BinOp.Panic.add (| - Integer.Usize, - M.read (| dst |), - M.read (| src_pre_wrap_len |) - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| dst |)) + (M.read (| src_pre_wrap_len |)); M.read (| delta |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2162,11 +2143,10 @@ Module collections. M.read (| self |); M.read (| delta |); Value.Integer 0; - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| dst_pre_wrap_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| dst_pre_wrap_len |)) ] |) |) in @@ -2182,7 +2162,7 @@ Module collections. M.is_constant_or_break_match (| M.read (| γ0_1 |), Value.Bool true |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2194,7 +2174,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2236,15 +2216,14 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let delta := + let~ delta := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| src_pre_wrap_len |), - M.read (| dst_pre_wrap_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| src_pre_wrap_len |)) + (M.read (| dst_pre_wrap_len |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2258,15 +2237,14 @@ Module collections. M.read (| self |); Value.Integer 0; M.read (| delta |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| src_pre_wrap_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| src_pre_wrap_len |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2278,9 +2256,9 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -2289,15 +2267,14 @@ Module collections. [] |), [ M.read (| self |) ] - |), - M.read (| delta |) - |); + |)) + (M.read (| delta |)); Value.Integer 0; M.read (| delta |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2353,7 +2330,7 @@ Module collections. let dst := M.alloc (| dst |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2362,7 +2339,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2418,20 +2395,19 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let head_room := + let~ head_room := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |), - M.read (| dst |) - |) + |)) + (M.read (| dst |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2453,7 +2429,7 @@ Module collections. (M.read (| head_room |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -2518,7 +2494,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let left := M.copy (| γ0_0 |) in let right := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2565,7 +2541,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2638,7 +2614,7 @@ Module collections. let iter := M.alloc (| iter |) in let written := M.alloc (| written |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2676,7 +2652,7 @@ Module collections. let i := M.copy (| γ0_0 |) in let element := M.copy (| γ0_1 |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2689,24 +2665,22 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| dst |), - M.read (| i |) - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| dst |)) + (M.read (| i |)); M.read (| element |) ] |) |) in - let _ := + let~ _ := let β := M.read (| written |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) @@ -2774,28 +2748,27 @@ Module collections. let iter := M.alloc (| iter |) in let len := M.alloc (| len |) in M.read (| - let head_room := + let~ head_room := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |), - M.read (| dst |) - |) + |)) + (M.read (| dst |)) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::collections::vec_deque::write_iter_wrapping::Guard" [ ("deque", M.read (| self |)); ("written", Value.Integer 0) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2808,7 +2781,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2839,8 +2812,8 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2992,7 +2965,7 @@ Module collections. (let self := M.alloc (| self |) in let old_capacity := M.alloc (| old_capacity |) in M.read (| - let new_capacity := + let~ new_capacity := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3003,7 +2976,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3012,7 +2985,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3051,7 +3024,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3068,50 +3041,47 @@ Module collections. "head" |) |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_capacity |), - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| old_capacity |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |) - |)) + |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let head_len := + (let~ head_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_capacity |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| old_capacity |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |) - |) + |)) |) in - let tail_len := + let~ tail_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |), - M.read (| head_len |) - |) + |)) + (M.read (| head_len |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3127,11 +3097,10 @@ Module collections. (M.read (| tail_len |)), ltac:(M.monadic (BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| new_capacity |), - M.read (| old_capacity |) - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| new_capacity |)) + (M.read (| old_capacity |))) (M.read (| tail_len |)))) |) |)) in @@ -3140,7 +3109,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3161,16 +3130,15 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let new_head := + (let~ new_head := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| new_capacity |), - M.read (| head_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| new_capacity |)) + (M.read (| head_len |)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3195,7 +3163,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3209,7 +3177,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3218,7 +3186,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3395,7 +3363,7 @@ Module collections. let capacity := M.alloc (| capacity |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3404,7 +3372,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3455,7 +3423,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3464,7 +3432,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3600,7 +3568,7 @@ Module collections. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3687,7 +3655,7 @@ Module collections. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3755,7 +3723,7 @@ Module collections. let i := M.alloc (| i |) in let j := M.alloc (| j |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3791,7 +3759,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3827,7 +3795,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ri := + let~ ri := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3838,7 +3806,7 @@ Module collections. [ M.read (| self |); M.read (| i |) ] |) |) in - let rj := + let~ rj := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3962,7 +3930,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let new_cap := + let~ new_cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3988,7 +3956,7 @@ Module collections. ] |) |) in - let old_cap := + let~ old_cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4010,7 +3978,7 @@ Module collections. BinOp.Pure.gt (M.read (| new_cap |)) (M.read (| old_cap |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4035,7 +4003,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4081,7 +4049,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let new_cap := + let~ new_cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4107,7 +4075,7 @@ Module collections. ] |) |) in - let old_cap := + let~ old_cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4129,7 +4097,7 @@ Module collections. BinOp.Pure.gt (M.read (| new_cap |)) (M.read (| old_cap |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4154,7 +4122,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4202,7 +4170,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let new_cap := + let~ new_cap := M.copy (| M.match_operator (| M.alloc (| @@ -4303,7 +4271,7 @@ Module collections. ] |) |) in - let old_cap := + let~ old_cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4314,7 +4282,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4327,7 +4295,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4420,7 +4388,7 @@ Module collections. val)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4472,7 +4440,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let new_cap := + let~ new_cap := M.copy (| M.match_operator (| M.alloc (| @@ -4573,7 +4541,7 @@ Module collections. ] |) |) in - let old_cap := + let~ old_cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4584,7 +4552,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4597,7 +4565,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4690,7 +4658,7 @@ Module collections. val)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4729,7 +4697,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4836,7 +4804,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let target_cap := + let~ target_cap := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "max", [] |), @@ -4852,7 +4820,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4888,7 +4856,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let tail_outside := + let~ tail_outside := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4907,11 +4875,10 @@ Module collections. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| target_cap |), - Value.Integer 1 - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| target_cap |)) + (Value.Integer 1); M.call_closure (| M.get_associated_function (| Ty.apply @@ -4926,28 +4893,27 @@ Module collections. |) |); M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |) - |) + |)) |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4968,7 +4934,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5006,8 +4972,8 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5038,7 +5004,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5076,31 +5042,29 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |) - |), - M.read (| target_cap |) - |) + |))) + (M.read (| target_cap |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5148,11 +5112,11 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let head_len := + let~ head_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -5162,26 +5126,24 @@ Module collections. [] |), [ M.read (| self |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "head" |) - |) - |) + |)) |) in - let new_head := + let~ new_head := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| target_cap |), - M.read (| head_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| target_cap |)) + (M.read (| head_len |)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5207,7 +5169,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5227,7 +5189,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5245,7 +5207,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5254,7 +5216,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5325,7 +5287,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5334,7 +5296,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5454,7 +5416,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5523,22 +5485,21 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let begin := + let~ begin := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| front |) ] - |) - |) + |)) |) in - let drop_back := + let~ drop_back := M.copy (| M.use (M.alloc (| @@ -5561,7 +5522,7 @@ Module collections. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5570,7 +5531,7 @@ Module collections. |), M.read (| len |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5583,9 +5544,9 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let drop_back := + (let~ drop_back := M.copy (| M.use (M.alloc (| M.read (| back |) |)) |) in - let drop_front := + let~ drop_front := M.copy (| M.use (M.alloc (| @@ -5608,7 +5569,7 @@ Module collections. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5617,13 +5578,13 @@ Module collections. |), M.read (| len |) |) in - let _back_dropper := + let~ _back_dropper := M.alloc (| Value.StructTuple "alloc::collections::vec_deque::truncate::Dropper" [ M.read (| drop_back |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6093,9 +6054,9 @@ Module collections. |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| end_ |)) (M.read (| start |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6125,7 +6086,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let wrapped_start := + (let~ wrapped_start := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6138,11 +6099,11 @@ Module collections. [ M.read (| self |); M.read (| start |) ] |) |) in - let head_len := + let~ head_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -6151,9 +6112,8 @@ Module collections. [] |), [ M.read (| self |) ] - |), - M.read (| wrapped_start |) - |) + |)) + (M.read (| wrapped_start |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6178,11 +6138,10 @@ Module collections. [ ("start", M.read (| wrapped_start |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| wrapped_start |), - M.read (| len |) - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| wrapped_start |)) + (M.read (| len |))) ]; Value.StructRecord "core::ops::range::Range" @@ -6194,13 +6153,12 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let tail_len := + (let~ tail_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| head_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| head_len |)) |) in M.alloc (| Value.Tuple @@ -6295,7 +6253,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a_range := M.copy (| γ0_0 |) in let b_range := M.copy (| γ0_1 |) in - let a := + let~ a := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6306,7 +6264,7 @@ Module collections. [ M.read (| self |); M.read (| a_range |) ] |) |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6405,7 +6363,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a_range := M.copy (| γ0_0 |) in let b_range := M.copy (| γ0_1 |) in - let a := + let~ a := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6416,7 +6374,7 @@ Module collections. [ M.read (| self |); M.read (| a_range |) ] |) |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6553,10 +6511,10 @@ Module collections. |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - let drain_start := M.copy (| start |) in - let drain_len := + let~ drain_start := M.copy (| start |) in + let~ drain_len := M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| end_ |)) (M.read (| start |)) |) in M.alloc (| M.call_closure (| @@ -6594,7 +6552,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6605,7 +6563,7 @@ Module collections. [ M.read (| self |); Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6865,7 +6823,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let old_head := + (let~ old_head := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6873,7 +6831,7 @@ Module collections. "head" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6889,7 +6847,7 @@ Module collections. [ M.read (| self |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6898,7 +6856,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -6966,7 +6924,7 @@ Module collections. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6975,7 +6933,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -7046,7 +7004,7 @@ Module collections. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7068,7 +7026,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7085,7 +7043,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7111,18 +7069,15 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7170,7 +7125,7 @@ Module collections. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7192,7 +7147,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7209,7 +7164,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7240,17 +7195,14 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -7280,24 +7232,23 @@ Module collections. "head" |) |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") [ T; A ], "capacity", [] |), [ M.read (| self |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |) - |)))) + |))))) | _, _ => M.impossible end. @@ -7326,7 +7277,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let length := + let~ length := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7334,7 +7285,7 @@ Module collections. "len" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7351,7 +7302,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7436,7 +7387,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let length := + let~ length := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7444,7 +7395,7 @@ Module collections. "len" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7458,16 +7409,15 @@ Module collections. ltac:(M.monadic (BinOp.Pure.lt (M.read (| index |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| length |), - Value.Integer 1 - |)))) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| length |)) + (Value.Integer 1)))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7480,11 +7430,10 @@ Module collections. [ M.read (| self |); M.read (| index |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| length |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| length |)) + (Value.Integer 1) ] |) |) in @@ -7577,7 +7526,7 @@ Module collections. let index := M.alloc (| index |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7629,7 +7578,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7651,7 +7600,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7668,19 +7617,18 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let k := + let~ k := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |), - M.read (| index |) - |) + |)) + (M.read (| index |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7690,7 +7638,7 @@ Module collections. (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| k |)) (M.read (| index |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7720,18 +7668,17 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| index |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| index |)) + (Value.Integer 1) ] |); M.read (| k |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7755,7 +7702,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7764,12 +7711,12 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let old_head := + (let~ old_head := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7777,7 +7724,7 @@ Module collections. "head" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7803,7 +7750,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7825,7 +7772,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7849,7 +7796,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7858,7 +7805,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -7908,7 +7855,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7939,7 +7886,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let wrapped_idx := + let~ wrapped_idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7950,7 +7897,7 @@ Module collections. [ M.read (| self |); M.read (| index |) ] |) |) in - let elem := + let~ elem := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -7965,25 +7912,23 @@ Module collections. |) ] |) in - let k := + let~ k := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |), - M.read (| index |) - |), - Value.Integer 1 - |) + |)) + (M.read (| index |))) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7996,7 +7941,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8024,7 +7969,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8033,12 +7978,12 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let old_head := + (let~ old_head := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8046,7 +7991,7 @@ Module collections. "head" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8064,7 +8009,7 @@ Module collections. [ M.read (| self |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8088,7 +8033,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8097,7 +8042,7 @@ Module collections. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -8168,7 +8113,7 @@ Module collections. (let self := M.alloc (| self |) in let at_ := M.alloc (| at_ |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8176,7 +8121,7 @@ Module collections. "len" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8216,11 +8161,9 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let other_len := - M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| at_ |) |) - |) in - let other := + let~ other_len := + M.alloc (| BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| at_ |)) |) in + let~ other := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8246,7 +8189,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8265,7 +8208,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let first_half := M.copy (| γ0_0 |) in let second_half := M.copy (| γ0_1 |) in - let first_len := + let~ first_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8276,7 +8219,7 @@ Module collections. [ M.read (| first_half |) ] |) |) in - let second_len := + let~ second_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8302,15 +8245,14 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let amount_in_first := + let~ amount_in_first := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| first_len |), - M.read (| at_ |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| first_len |)) + (M.read (| at_ |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8350,7 +8292,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8394,23 +8336,21 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let offset := + (let~ offset := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| at_ |), - M.read (| first_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| at_ |)) + (M.read (| first_len |)) |) in - let amount_in_second := + let~ amount_in_second := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| second_len |), - M.read (| offset |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| second_len |)) + (M.read (| offset |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8455,7 +8395,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8464,7 +8404,7 @@ Module collections. |), M.read (| at_ |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| other, @@ -8516,7 +8456,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8530,7 +8470,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8573,7 +8513,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| other |), @@ -8582,7 +8522,7 @@ Module collections. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| other |), @@ -8598,7 +8538,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8618,7 +8558,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8637,7 +8577,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let left := M.copy (| γ0_0 |) in let right := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8672,7 +8612,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8694,24 +8634,23 @@ Module collections. |), [ M.read (| self |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| left |) ] - |) - |) + |)) ] |); M.read (| right |) @@ -8721,7 +8660,7 @@ Module collections. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8730,19 +8669,18 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "alloc::collections::vec_deque::VecDeque", "len" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| other |), @@ -8751,7 +8689,7 @@ Module collections. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| other |), @@ -8786,7 +8724,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8880,7 +8818,7 @@ Module collections. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8888,9 +8826,9 @@ Module collections. "len" |) |) in - let idx := M.alloc (| Value.Integer 0 |) in - let cur := M.alloc (| Value.Integer 0 |) in - let _ := + let~ idx := M.alloc (| Value.Integer 0 |) in + let~ cur := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -8905,7 +8843,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8952,15 +8890,14 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := cur in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.break (||) |) @@ -8969,17 +8906,17 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := cur in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := let β := idx in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -8987,7 +8924,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -8996,7 +8933,7 @@ Module collections. ] |))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -9011,7 +8948,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9058,15 +8995,14 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := cur in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.continue (||) |) @@ -9075,7 +9011,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9088,17 +9024,17 @@ Module collections. [ M.read (| self |); M.read (| idx |); M.read (| cur |) ] |) |) in - let _ := + let~ _ := let β := cur in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := let β := idx in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -9106,7 +9042,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -9123,7 +9059,7 @@ Module collections. (let γ := M.use (M.alloc (| BinOp.Pure.ne (M.read (| cur |)) (M.read (| idx |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9166,7 +9102,7 @@ Module collections. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9175,7 +9111,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9220,7 +9156,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let old_cap := + let~ old_cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9231,7 +9167,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9249,8 +9185,8 @@ Module collections. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9262,7 +9198,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9271,7 +9207,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9347,7 +9283,7 @@ Module collections. let new_len := M.alloc (| new_len |) in let generator := M.alloc (| generator |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9401,11 +9337,10 @@ Module collections. |), [ M.read (| generator |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| new_len |), - M.read (| len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| new_len |)) + (M.read (| len |)) ] |) ] @@ -9413,7 +9348,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9571,7 +9506,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9582,7 +9517,7 @@ Module collections. (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9595,7 +9530,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9690,7 +9625,7 @@ Module collections. |) in let head := M.copy (| γ1_0 |) in let len := M.copy (| γ1_1 |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9703,7 +9638,7 @@ Module collections. [ M.read (| self |) ] |) |) in - let cap := + let~ cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9716,32 +9651,23 @@ Module collections. [ M.read (| self |) ] |) |) in - let free := + let~ free := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| cap |), - M.read (| len |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| cap |)) (M.read (| len |)) |) in - let head_len := + let~ head_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| cap |), - M.read (| head |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| cap |)) (M.read (| head |)) |) in - let tail := + let~ tail := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| head_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| head_len |)) |) in - let tail_len := M.copy (| tail |) in - let _ := + let~ tail_len := M.copy (| tail |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9757,8 +9683,8 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9776,7 +9702,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9795,7 +9721,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9824,8 +9750,8 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9844,7 +9770,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9858,17 +9784,16 @@ Module collections. [ M.read (| self |); Value.Integer 0; - BinOp.Panic.add (| - Integer.Usize, - M.read (| tail |), - M.read (| head_len |) - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| tail |)) + (M.read (| head_len |)); M.read (| tail_len |) ] |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9897,7 +9822,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9915,7 +9840,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9940,7 +9865,7 @@ Module collections. (M.alloc (| Value.Tuple [] |))) ] |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9973,7 +9898,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9987,7 +9912,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9999,7 +9924,7 @@ Module collections. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10017,7 +9942,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10048,7 +9973,7 @@ Module collections. (M.alloc (| Value.Tuple [] |))) ] |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10077,7 +10002,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10091,7 +10016,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10168,7 +10093,7 @@ Module collections. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10204,19 +10129,18 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let k := + let~ k := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |), - M.read (| n |) - |) + |)) + (M.read (| n |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10277,7 +10201,7 @@ Module collections. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10313,19 +10237,18 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let k := + let~ k := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::collections::vec_deque::VecDeque", "len" |) - |), - M.read (| n |) - |) + |)) + (M.read (| n |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10384,7 +10307,7 @@ Module collections. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10393,7 +10316,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10404,11 +10327,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| mid |), - Value.Integer 2 - |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| mid |)) + (Value.Integer 2)) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -10445,8 +10367,8 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10485,7 +10407,7 @@ Module collections. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10527,7 +10449,7 @@ Module collections. (let self := M.alloc (| self |) in let k := M.alloc (| k |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10536,7 +10458,7 @@ Module collections. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10547,11 +10469,10 @@ Module collections. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| k |), - Value.Integer 2 - |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| k |)) + (Value.Integer 2)) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -10588,7 +10509,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10614,7 +10535,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10759,7 +10680,7 @@ Module collections. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let front := M.copy (| γ0_0 |) in let back := M.copy (| γ0_1 |) in - let cmp_back := + let~ cmp_back := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10823,6 +10744,7 @@ Module collections. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| Value.StructTuple "core::result::Result::Ok" @@ -10851,6 +10773,8 @@ Module collections. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Less" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10899,10 +10823,10 @@ Module collections. fun γ => ltac:(M.monadic (let idx := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -10911,8 +10835,7 @@ Module collections. [] |), [ M.read (| front |) ] - |) - |))) + |)))) ] |) | _ => M.impossible (||) @@ -10930,18 +10853,17 @@ Module collections. fun γ => ltac:(M.monadic (let idx := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| front |) ] - |) - |))) + |)))) ] |) | _ => M.impossible (||) @@ -11158,25 +11080,24 @@ Module collections. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "partition_point", [ P ] |), [ M.read (| back |); M.read (| pred |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| front |) ] - |) - |) + |)) |))); fun γ => ltac:(M.monadic @@ -11242,12 +11163,12 @@ Module collections. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let extra := + let~ extra := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| new_len |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| new_len |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::collections::vec_deque::VecDeque") @@ -11256,8 +11177,7 @@ Module collections. [] |), [ M.read (| self |) ] - |) - |) + |)) |) in M.alloc (| M.call_closure (| @@ -11279,7 +11199,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11381,7 +11301,7 @@ Module collections. (let logical_index := M.alloc (| logical_index |) in let capacity := M.alloc (| capacity |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11389,7 +11309,7 @@ Module collections. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11417,11 +11337,10 @@ Module collections. |), ltac:(M.monadic (BinOp.Pure.lt - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| logical_index |), - M.read (| capacity |) - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| logical_index |)) + (M.read (| capacity |))) (M.read (| capacity |)))) |)) |)) in @@ -11463,11 +11382,10 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| logical_index |), - M.read (| capacity |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| logical_index |)) + (M.read (| capacity |)) |))); fun γ => ltac:(M.monadic logical_index) ] @@ -11529,7 +11447,7 @@ Module collections. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11704,7 +11622,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let front := + let~ front := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11715,20 +11633,19 @@ Module collections. [ M.read (| sa |) ] |) |) in - let mid := + let~ mid := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| oa |) ] - |), - M.read (| front |) - |) + |)) + (M.read (| front |)) |) in M.match_operator (| M.alloc (| @@ -11784,7 +11701,7 @@ Module collections. let sb_mid := M.copy (| γ0_0 |) in let sb_back := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11800,7 +11717,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -11901,7 +11818,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -11958,7 +11875,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11974,7 +11891,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -12075,7 +11992,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -12132,7 +12049,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12148,7 +12065,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -12249,7 +12166,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -12396,7 +12313,7 @@ Module collections. |))); fun γ => ltac:(M.monadic - (let front := + (let~ front := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12407,20 +12324,19 @@ Module collections. [ M.read (| oa |) ] |) |) in - let mid := + let~ mid := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| sa |) ] - |), - M.read (| front |) - |) + |)) + (M.read (| front |)) |) in M.match_operator (| M.alloc (| @@ -12476,7 +12392,7 @@ Module collections. let ob_mid := M.copy (| γ0_0 |) in let ob_back := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12492,7 +12408,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -12593,7 +12509,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -12650,7 +12566,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12666,7 +12582,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -12767,7 +12683,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -12824,7 +12740,7 @@ Module collections. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12840,7 +12756,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -12941,7 +12857,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -13255,7 +13171,7 @@ Module collections. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_length_prefix", [] |), @@ -13271,7 +13187,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13643,7 +13559,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13686,7 +13602,7 @@ Module collections. (let self := M.alloc (| self |) in let elem := M.alloc (| elem |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13715,7 +13631,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13762,7 +13678,7 @@ Module collections. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13812,7 +13728,7 @@ Module collections. (let γ := M.read (| γ |) in let elem := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13843,7 +13759,7 @@ Module collections. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14039,7 +13955,7 @@ Module collections. ltac:(M.monadic (let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14050,7 +13966,7 @@ Module collections. [ other ] |) |) in - let other := + let~ other := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14063,7 +13979,7 @@ Module collections. [ M.read (| other |) ] |) |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14095,7 +14011,7 @@ Module collections. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14120,7 +14036,7 @@ Module collections. ] |) |) in - let cap := + let~ cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14145,7 +14061,7 @@ Module collections. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ A ] |), @@ -14178,7 +14094,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14214,7 +14130,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -14315,7 +14231,7 @@ Module collections. ltac:(M.monadic (let arr := M.alloc (| arr |) in M.read (| - let deq := + let~ deq := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14328,7 +14244,7 @@ Module collections. [ M.read (| M.get_constant (| "alloc::collections::vec_deque::N" |) |) ] |) |) in - let arr := + let~ arr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14341,7 +14257,7 @@ Module collections. [ M.read (| arr |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14357,7 +14273,7 @@ Module collections. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -14403,7 +14319,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| deq, @@ -14412,7 +14328,7 @@ Module collections. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| deq, diff --git a/CoqOfRust/alloc/collections/vec_deque/spec_extend.v b/CoqOfRust/alloc/collections/vec_deque/spec_extend.v index ba408b82d..557969317 100644 --- a/CoqOfRust/alloc/collections/vec_deque/spec_extend.v +++ b/CoqOfRust/alloc/collections/vec_deque/spec_extend.v @@ -100,7 +100,7 @@ Module collections. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -123,7 +123,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -192,7 +192,7 @@ Module collections. 0 |) in let element := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -214,7 +214,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -234,7 +234,7 @@ Module collections. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -332,7 +332,7 @@ Module collections. 0 |) in let additional := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -344,7 +344,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ low; additional ] |), [ @@ -381,7 +381,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -483,7 +483,7 @@ Module collections. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -496,7 +496,7 @@ Module collections. [ M.read (| self |); M.read (| additional |) ] |) |) in - let written := + let~ written := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -532,7 +532,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -544,7 +544,7 @@ Module collections. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ additional; written ] |), [ @@ -581,7 +581,7 @@ Module collections. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -710,7 +710,7 @@ Module collections. (let self := M.alloc (| self |) in let iterator := M.alloc (| iterator |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -723,7 +723,7 @@ Module collections. [ iterator ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -744,8 +744,8 @@ Module collections. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -776,7 +776,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -785,21 +785,20 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -906,7 +905,7 @@ Module collections. (let self := M.alloc (| self |) in let iterator := M.alloc (| iterator |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -917,7 +916,7 @@ Module collections. [ iterator ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -938,7 +937,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -969,7 +968,7 @@ Module collections. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -978,14 +977,13 @@ Module collections. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |) |))) diff --git a/CoqOfRust/alloc/ffi/c_str.v b/CoqOfRust/alloc/ffi/c_str.v index fe386aad1..c6b98e812 100644 --- a/CoqOfRust/alloc/ffi/c_str.v +++ b/CoqOfRust/alloc/ffi/c_str.v @@ -586,6 +586,11 @@ Module ffi. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + |) in M.alloc (| Value.StructTuple "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" @@ -627,7 +632,7 @@ Module ffi. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -637,7 +642,7 @@ Module ffi. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -777,6 +782,11 @@ Module ffi. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1446,7 +1456,7 @@ Module ffi. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1455,7 +1465,7 @@ Module ffi. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1558,7 +1568,7 @@ Module ffi. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1571,7 +1581,7 @@ Module ffi. [ v; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1632,18 +1642,17 @@ Module ffi. ltac:(M.monadic (let ptr := M.alloc (| ptr |) in M.read (| - let len := + let~ len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_function (| "alloc::ffi::c_str::from_raw::strlen", [] |), [ (* MutToConstPointer *) M.pointer_coercion (M.read (| ptr |)) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts_mut", [ Ty.path "i8" ] |), @@ -1818,7 +1827,7 @@ Module ffi. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_function (| @@ -1837,7 +1846,7 @@ Module ffi. ] |) |) in - let _nul := + let~ _nul := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1850,7 +1859,7 @@ Module ffi. [ vec ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1859,7 +1868,7 @@ Module ffi. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -1914,7 +1923,7 @@ Module ffi. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -2023,9 +2032,9 @@ Module ffi. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", @@ -2040,9 +2049,8 @@ Module ffi. |) |) ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) ] ] |))) @@ -2165,7 +2173,7 @@ Module ffi. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let this := + let~ this := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2229,7 +2237,7 @@ Module ffi. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2238,7 +2246,7 @@ Module ffi. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2249,9 +2257,9 @@ Module ffi. (M.alloc (| UnOp.Pure.not (BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -2285,9 +2293,8 @@ Module ffi. ] |) ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -2398,7 +2405,7 @@ Module ffi. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let nul_pos := + let~ nul_pos := M.alloc (| M.call_closure (| M.get_function (| "core::slice::memchr::memchr", [] |), @@ -2434,11 +2441,7 @@ Module ffi. let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.Usize, - M.read (| nul_pos |), - Value.Integer 1 - |)) + (BinOp.Wrap.add Integer.Usize (M.read (| nul_pos |)) (Value.Integer 1)) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -2491,7 +2494,8 @@ Module ffi. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ @@ -2532,7 +2536,7 @@ Module ffi. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -2705,7 +2709,7 @@ Module ffi. | [], [] => ltac:(M.monadic (M.read (| - let a := + let~ a := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2827,7 +2831,7 @@ Module ffi. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let boxed := + let~ boxed := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2993,7 +2997,7 @@ Module ffi. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let raw := + let~ raw := M.alloc (| M.rust_cast (M.call_closure (| @@ -3071,7 +3075,7 @@ Module ffi. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let v := + let~ v := M.copy (| M.match_operator (| M.alloc (| @@ -3339,7 +3343,7 @@ Module ffi. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let arc := + let~ arc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3430,7 +3434,7 @@ Module ffi. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let arc := + let~ arc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3515,7 +3519,7 @@ Module ffi. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let rc := + let~ rc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3606,7 +3610,7 @@ Module ffi. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let rc := + let~ rc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3690,7 +3694,7 @@ Module ffi. | [], [] => ltac:(M.monadic (M.read (| - let boxed := + let~ boxed := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3946,7 +3950,12 @@ Module ffi. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "alloc::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", @@ -4159,7 +4168,7 @@ Module ffi. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_function (| @@ -4190,7 +4199,7 @@ Module ffi. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4213,7 +4222,7 @@ Module ffi. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| target |), diff --git a/CoqOfRust/alloc/fmt.v b/CoqOfRust/alloc/fmt.v index 7d47d38f1..98a05ad2b 100644 --- a/CoqOfRust/alloc/fmt.v +++ b/CoqOfRust/alloc/fmt.v @@ -75,7 +75,7 @@ Module fmt. ltac:(M.monadic (let args := M.alloc (| args |) in M.read (| - let capacity := + let~ capacity := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -86,7 +86,7 @@ Module fmt. [ args ] |) |) in - let output := + let~ output := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -97,7 +97,7 @@ Module fmt. [ M.read (| capacity |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/raw_vec.v b/CoqOfRust/alloc/raw_vec.v index d45c31d8d..4a847980e 100644 --- a/CoqOfRust/alloc/raw_vec.v +++ b/CoqOfRust/alloc/raw_vec.v @@ -318,7 +318,7 @@ Module raw_vec. (let self := M.alloc (| self |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -326,7 +326,7 @@ Module raw_vec. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -388,7 +388,7 @@ Module raw_vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -401,7 +401,7 @@ Module raw_vec. [ M.read (| self |) ] |) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_function (| @@ -557,7 +557,7 @@ Module raw_vec. |))); fun γ => ltac:(M.monadic - (let layout := + (let~ layout := M.copy (| M.match_operator (| M.alloc (| @@ -600,7 +600,7 @@ Module raw_vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -645,14 +645,19 @@ Module raw_vec. |))) ] |) in - let result := + let~ result := M.copy (| M.match_operator (| init, [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "alloc::raw_vec::AllocInit::Uninitialized" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::alloc::Allocator", @@ -666,7 +671,9 @@ Module raw_vec. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "alloc::raw_vec::AllocInit::Zeroed" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::alloc::Allocator", @@ -681,7 +688,7 @@ Module raw_vec. ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| result, @@ -951,14 +958,14 @@ Module raw_vec. [ fun γ => ltac:(M.monadic - (let align := + (let~ align := M.alloc (| M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] |) |) in - let size := + let~ size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -981,7 +988,7 @@ Module raw_vec. ] |) |) in - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1094,7 +1101,7 @@ Module raw_vec. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Self, "do_reserve_and_handle.reserve", [] |), @@ -1126,7 +1133,7 @@ Module raw_vec. (let self := M.alloc (| self |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::raw_vec::handle_reserve", [] |), @@ -1174,7 +1181,7 @@ Module raw_vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1194,7 +1201,7 @@ Module raw_vec. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1277,8 +1284,8 @@ Module raw_vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -1320,7 +1327,7 @@ Module raw_vec. let len := M.alloc (| len |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::raw_vec::handle_reserve", [] |), @@ -1372,7 +1379,7 @@ Module raw_vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1392,7 +1399,7 @@ Module raw_vec. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1475,8 +1482,8 @@ Module raw_vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -1517,7 +1524,7 @@ Module raw_vec. (let self := M.alloc (| self |) in let cap := M.alloc (| cap |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::raw_vec::handle_reserve", [] |), @@ -1595,7 +1602,7 @@ Module raw_vec. let ptr := M.alloc (| ptr |) in let cap := M.alloc (| cap |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1631,7 +1638,7 @@ Module raw_vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1687,7 +1694,7 @@ Module raw_vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1696,7 +1703,7 @@ Module raw_vec. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1734,7 +1741,7 @@ Module raw_vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1773,7 +1780,7 @@ Module raw_vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let required_cap := + let~ required_cap := M.copy (| M.match_operator (| M.alloc (| @@ -1865,27 +1872,26 @@ Module raw_vec. ] |) |) in - let cap := + let~ cap := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), [ - BinOp.Panic.mul (| - Integer.Usize, - M.read (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::raw_vec::RawVec", "cap" |) - |), - Value.Integer 2 - |); + |)) + (Value.Integer 2); M.read (| required_cap |) ] |) |) in - let cap := + let~ cap := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), @@ -1895,7 +1901,7 @@ Module raw_vec. ] |) |) in - let new_layout := + let~ new_layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1906,7 +1912,7 @@ Module raw_vec. [ M.read (| cap |) ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -2001,7 +2007,7 @@ Module raw_vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2050,7 +2056,7 @@ Module raw_vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2089,7 +2095,7 @@ Module raw_vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let cap := + let~ cap := M.copy (| M.match_operator (| M.alloc (| @@ -2181,7 +2187,7 @@ Module raw_vec. ] |) |) in - let new_layout := + let~ new_layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2192,7 +2198,7 @@ Module raw_vec. [ M.read (| cap |) ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -2287,7 +2293,7 @@ Module raw_vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2348,7 +2354,7 @@ Module raw_vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2452,7 +2458,7 @@ Module raw_vec. [ fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2468,7 +2474,7 @@ Module raw_vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2489,7 +2495,7 @@ Module raw_vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2507,7 +2513,7 @@ Module raw_vec. [] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2519,9 +2525,9 @@ Module raw_vec. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let ptr := + (let~ ptr := M.copy (| - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2541,7 +2547,7 @@ Module raw_vec. ] |) |) in - let new_layout := + let~ new_layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2722,7 +2728,7 @@ Module raw_vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2798,7 +2804,7 @@ Module raw_vec. M.catch_return (| ltac:(M.monadic (M.read (| - let new_layout := + let~ new_layout := M.copy (| M.match_operator (| M.alloc (| @@ -2911,7 +2917,7 @@ Module raw_vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2995,7 +3001,7 @@ Module raw_vec. val)) ] |) in - let memory := + let~ memory := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3013,7 +3019,7 @@ Module raw_vec. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let ptr := M.copy (| γ1_0 |) in let old_layout := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3025,7 +3031,7 @@ Module raw_vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -3083,7 +3089,7 @@ Module raw_vec. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -3119,7 +3125,7 @@ Module raw_vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -3370,6 +3376,11 @@ Module raw_vec. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "alloc::collections::TryReserveErrorKind::CapacityOverflow" + |) in M.alloc (| M.never_to_any (| M.call_closure (| diff --git a/CoqOfRust/alloc/rc.v b/CoqOfRust/alloc/rc.v index 2b4bd961b..929b1983a 100644 --- a/CoqOfRust/alloc/rc.v +++ b/CoqOfRust/alloc/rc.v @@ -386,7 +386,7 @@ Module rc. ltac:(M.monadic (let data_fn := M.alloc (| data_fn |) in M.read (| - let uninit_ptr := + let~ uninit_ptr := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -480,7 +480,7 @@ Module rc. ] |) |) in - let init_ptr := + let~ init_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -497,7 +497,7 @@ Module rc. [ M.read (| uninit_ptr |) ] |) |) in - let weak := + let~ weak := M.alloc (| Value.StructRecord "alloc::rc::Weak" @@ -506,7 +506,7 @@ Module rc. ("alloc", Value.StructTuple "alloc::alloc::Global" []) ] |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -530,9 +530,9 @@ Module rc. [ M.read (| data_fn |); Value.Tuple [ weak ] ] |) |) in - let strong := + let~ strong := M.copy (| - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -545,7 +545,7 @@ Module rc. [ M.read (| init_ptr |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -559,7 +559,7 @@ Module rc. ] |) |) in - let prev_value := + let~ prev_value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -576,7 +576,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -585,7 +585,7 @@ Module rc. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ prev_value; M.alloc (| Value.Integer 0 |) ] @@ -618,7 +618,7 @@ Module rc. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -673,7 +673,7 @@ Module rc. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -702,7 +702,7 @@ Module rc. |) |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1739,7 +1739,7 @@ Module rc. let allocate := M.alloc (| allocate |) in let mem_to_rcbox := M.alloc (| mem_to_rcbox |) in M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_function (| "alloc::rc::rcbox_layout_for_value_layout", [] |), @@ -1843,14 +1843,14 @@ Module rc. M.catch_return (| ltac:(M.monadic (M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_function (| "alloc::rc::rcbox_layout_for_value_layout", [] |), [ M.read (| value_layout |) ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -1938,7 +1938,7 @@ Module rc. ] |) |) in - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1975,8 +1975,8 @@ Module rc. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1985,7 +1985,7 @@ Module rc. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -2041,7 +2041,7 @@ Module rc. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -2078,7 +2078,7 @@ Module rc. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2102,7 +2102,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3282,7 +3282,7 @@ Module rc. (Value.Integer 1) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), @@ -3300,7 +3300,7 @@ Module rc. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ A ] |), @@ -3313,7 +3313,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3335,7 +3335,7 @@ Module rc. ] |) |) in - let _weak := + let~ _weak := M.alloc (| Value.StructRecord "alloc::rc::Weak" @@ -3351,7 +3351,7 @@ Module rc. ("alloc", M.read (| alloc |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3429,7 +3429,7 @@ Module rc. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3440,7 +3440,7 @@ Module rc. [ this ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3476,7 +3476,7 @@ Module rc. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3532,14 +3532,14 @@ Module rc. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_function (| "alloc::rc::data_offset", [ T ] |), [ M.read (| ptr |) ] |) |) in - let rc_ptr := + let~ rc_ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -3587,7 +3587,7 @@ Module rc. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3609,7 +3609,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3617,7 +3617,7 @@ Module rc. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3724,9 +3724,9 @@ Module rc. | [], [ this ] => ltac:(M.monadic (let this := M.alloc (| this |) in - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.apply (Ty.path "alloc::rc::RcBox") [ T ], @@ -3744,9 +3744,8 @@ Module rc. [ M.read (| this |) ] |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -3810,7 +3809,7 @@ Module rc. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let rc := + let~ rc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3832,7 +3831,7 @@ Module rc. ] |) |) in - let _rc_clone := + let~ _rc_clone := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3869,7 +3868,7 @@ Module rc. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -4145,7 +4144,7 @@ Module rc. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4166,7 +4165,7 @@ Module rc. (Value.Integer 1) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let rc := + let~ rc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4188,7 +4187,7 @@ Module rc. ] |) |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4202,7 +4201,7 @@ Module rc. [ rc ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4234,7 +4233,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| this |), M.call_closure (| @@ -4276,7 +4275,7 @@ Module rc. M.read (| γ |), Value.Bool true |) in - let rc := + let~ rc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4304,7 +4303,7 @@ Module rc. ] |) |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4322,7 +4321,7 @@ Module rc. [ rc ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4355,7 +4354,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4377,7 +4376,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4399,7 +4398,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -4662,14 +4661,14 @@ Module rc. ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| - let value_size := + let~ value_size := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of_val", [ T ] |), [ M.read (| src |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4690,7 +4689,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), @@ -4729,7 +4728,7 @@ Module rc. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let bptr := M.copy (| γ0_0 |) in let alloc := M.copy (| γ0_1 |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4745,7 +4744,7 @@ Module rc. [ M.rust_cast (M.read (| bptr |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5152,7 +5151,7 @@ Module rc. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5170,7 +5169,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -5275,7 +5274,7 @@ Module rc. (let iter := M.alloc (| iter |) in let len := M.alloc (| len |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5288,8 +5287,8 @@ Module rc. [ M.read (| len |) ] |) |) in - let mem := M.alloc (| M.rust_cast (M.rust_cast (M.read (| ptr |))) |) in - let layout := + let~ mem := M.alloc (| M.rust_cast (M.rust_cast (M.read (| ptr |))) |) in + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5300,7 +5299,7 @@ Module rc. [ M.read (| ptr |) ] |) |) in - let elems := + let~ elems := M.alloc (| M.rust_cast (M.read (| @@ -5314,7 +5313,7 @@ Module rc. |)) |)) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::rc::from_iter_exact::Guard" @@ -5333,7 +5332,7 @@ Module rc. ("n_elems", Value.Integer 0) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5367,7 +5366,7 @@ Module rc. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5386,7 +5385,9 @@ Module rc. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5401,7 +5402,7 @@ Module rc. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let item := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -5418,7 +5419,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -5427,11 +5428,10 @@ Module rc. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -5440,7 +5440,7 @@ Module rc. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5845,7 +5845,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let md_self := + let~ md_self := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5979,7 +5979,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let md_self := + let~ md_self := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6166,7 +6166,7 @@ Module rc. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6191,7 +6191,7 @@ Module rc. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), @@ -6204,7 +6204,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6266,7 +6266,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6287,14 +6287,14 @@ Module rc. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ M.SubPointer.get_struct_record_field (| self, "alloc::rc::Rc", "alloc" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6520,7 +6520,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6573,7 +6573,7 @@ Module rc. (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::drop_in_place", [ T ] |), @@ -6589,7 +6589,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6643,7 +6643,7 @@ Module rc. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6743,7 +6743,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7434,7 +7434,7 @@ Module rc. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ H ] |), @@ -7741,7 +7741,7 @@ Module rc. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let rc := + let~ rc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7930,7 +7930,7 @@ Module rc. let len := M.copy (| γ0_1 |) in let cap := M.copy (| γ0_2 |) in let alloc := M.copy (| γ0_3 |) in - let rc_ptr := + let~ rc_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7943,7 +7943,7 @@ Module rc. [ M.read (| len |); alloc ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -8435,7 +8435,7 @@ Module rc. 0 |) in let high := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8447,7 +8447,7 @@ Module rc. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ low; high ] |), [ @@ -8484,7 +8484,7 @@ Module rc. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -8845,7 +8845,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8919,7 +8919,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8930,7 +8930,7 @@ Module rc. [ self ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8967,7 +8967,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8978,14 +8978,14 @@ Module rc. [ self ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ M.SubPointer.get_struct_record_field (| self, "alloc::rc::Weak", "alloc" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -9032,7 +9032,7 @@ Module rc. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9052,7 +9052,7 @@ Module rc. M.alloc (| M.rust_cast (M.read (| ptr |)) |))); fun γ => ltac:(M.monadic - (let offset := + (let~ offset := M.alloc (| M.call_closure (| M.get_function (| "alloc::rc::data_offset", [ T ] |), @@ -9125,7 +9125,7 @@ Module rc. M.catch_return (| ltac:(M.monadic (M.read (| - let inner := + let~ inner := M.copy (| M.match_operator (| M.alloc (| @@ -9224,7 +9224,7 @@ Module rc. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9411,9 +9411,9 @@ Module rc. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Ty.path "alloc::rc::WeakInner", @@ -9422,9 +9422,8 @@ Module rc. [] |), [ inner ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) ] @@ -9506,7 +9505,7 @@ Module rc. "core::option::Option::Some" [ M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9700,7 +9699,7 @@ Module rc. M.catch_return (| ltac:(M.monadic (M.read (| - let inner := + let~ inner := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9734,7 +9733,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9770,7 +9769,7 @@ Module rc. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9872,7 +9871,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10054,15 +10053,15 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let strong := + let~ strong := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "strong", [] |), [ M.read (| self |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -10070,14 +10069,14 @@ Module rc. |) |) in M.alloc (| Value.Tuple [] |) in - let strong := + let~ strong := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), [ M.read (| strong |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10128,7 +10127,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10141,14 +10140,13 @@ Module rc. M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "strong_ref", [] |), [ M.read (| self |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "strong", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in @@ -10187,15 +10185,15 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let weak := + let~ weak := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "weak", [] |), [ M.read (| self |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -10203,14 +10201,14 @@ Module rc. |) |) in M.alloc (| Value.Tuple [] |) in - let weak := + let~ weak := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_add", [] |), [ M.read (| weak |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10260,7 +10258,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10273,14 +10271,13 @@ Module rc. M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "weak_ref", [] |), [ M.read (| self |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_trait_method (| "alloc::rc::RcInnerPtr", Self, [], "weak", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in @@ -10523,7 +10520,7 @@ Module rc. ltac:(M.monadic (let align := M.alloc (| align |) in M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10535,21 +10532,20 @@ Module rc. |) |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ layout ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "padding_needed_for", [] |), [ layout; M.read (| align |) ] - |) - |) + |)) |) |))) | _, _ => M.impossible @@ -10744,8 +10740,8 @@ Module rc. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10817,7 +10813,7 @@ Module rc. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let this := + let~ this := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10830,7 +10826,7 @@ Module rc. [ M.read (| this |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11039,7 +11035,7 @@ Module rc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::drop_in_place", [ T ] |), @@ -11057,7 +11053,7 @@ Module rc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11126,7 +11122,7 @@ Module rc. (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/alloc/slice.v b/CoqOfRust/alloc/slice.v index f0cdb4c6c..3e54cd150 100644 --- a/CoqOfRust/alloc/slice.v +++ b/CoqOfRust/alloc/slice.v @@ -18,7 +18,7 @@ Module slice. ltac:(M.monadic (let b := M.alloc (| b |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), @@ -134,7 +134,7 @@ Module slice. (let s := M.alloc (| s |) in let alloc := M.alloc (| alloc |) in M.read (| - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -151,13 +151,13 @@ Module slice. ] |) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::slice::hack::to_vec::DropGuard" [ ("vec", vec); ("num_init", Value.Integer 0) ] |) in - let slots := + let~ slots := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -176,7 +176,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -250,7 +250,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -273,7 +273,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -288,7 +290,7 @@ Module slice. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let b := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| guard, @@ -297,7 +299,7 @@ Module slice. |), M.read (| i |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -332,7 +334,7 @@ Module slice. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -342,8 +344,8 @@ Module slice. [ M.read (| guard |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -403,7 +405,7 @@ Module slice. (let s := M.alloc (| s |) in let alloc := M.alloc (| alloc |) in M.read (| - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -420,8 +422,8 @@ Module slice. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -457,7 +459,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -512,7 +514,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -555,7 +557,7 @@ Module slice. (let self := M.alloc (| self |) in let compare := M.alloc (| compare |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -656,7 +658,7 @@ Module slice. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -797,28 +799,28 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let sz_u8 := + let~ sz_u8 := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.tuple [ K; Ty.path "u8" ] ] |), [] |) |) in - let sz_u16 := + let~ sz_u16 := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.tuple [ K; Ty.path "u16" ] ] |), [] |) |) in - let sz_u32 := + let~ sz_u32 := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.tuple [ K; Ty.path "u32" ] ] |), [] |) |) in - let sz_usize := + let~ sz_usize := M.alloc (| M.call_closure (| M.get_function (| @@ -828,14 +830,14 @@ Module slice. [] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -852,7 +854,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -877,7 +879,7 @@ Module slice. M.read (| M.return_ (| M.read (| - let indices := + let~ indices := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1016,7 +1018,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1082,7 +1084,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1101,7 +1103,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1115,7 +1122,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let index := + let~ index := M.copy (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -1138,7 +1145,7 @@ Module slice. 1 |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1161,7 +1168,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| index, M.read (| @@ -1209,7 +1216,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| @@ -1226,7 +1233,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -1250,7 +1257,7 @@ Module slice. |), M.read (| index |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1282,7 +1289,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1307,7 +1314,7 @@ Module slice. M.read (| M.return_ (| M.read (| - let indices := + let~ indices := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1446,7 +1453,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1512,7 +1519,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1531,7 +1538,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1545,7 +1557,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let index := + let~ index := M.copy (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -1568,7 +1580,7 @@ Module slice. 1 |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1591,7 +1603,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| index, M.read (| @@ -1639,7 +1651,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| @@ -1656,7 +1668,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -1680,7 +1692,7 @@ Module slice. |), M.read (| index |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1712,7 +1724,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1737,7 +1749,7 @@ Module slice. M.read (| M.return_ (| M.read (| - let indices := + let~ indices := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1876,7 +1888,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1942,7 +1954,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1961,7 +1973,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1975,7 +1992,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let index := + let~ index := M.copy (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -1998,7 +2015,7 @@ Module slice. 1 |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2021,7 +2038,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| index, M.read (| @@ -2069,7 +2086,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| @@ -2086,7 +2103,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -2110,7 +2127,7 @@ Module slice. |), M.read (| index |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2142,7 +2159,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let indices := + let~ indices := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2247,7 +2264,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2306,7 +2323,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2325,7 +2342,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2337,7 +2356,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let index := + let~ index := M.copy (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -2358,7 +2377,7 @@ Module slice. 1 |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2378,7 +2397,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| index, M.read (| @@ -2410,7 +2429,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -2423,7 +2442,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_tuple_field (| M.call_closure (| @@ -2445,7 +2464,7 @@ Module slice. |), M.read (| index |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2624,7 +2643,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2656,7 +2675,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let capacity := + let~ capacity := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2683,7 +2702,7 @@ Module slice. ] |) |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2694,7 +2713,7 @@ Module slice. [ M.read (| capacity |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2707,8 +2726,8 @@ Module slice. [ buf; M.read (| self |) ] |) |) in - let _ := - let m := M.alloc (| BinOp.Panic.shr (| M.read (| n |), Value.Integer 1 |) |) in + let~ _ := + let~ m := M.alloc (| BinOp.Wrap.shr (M.read (| n |)) (Value.Integer 1) |) in M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2726,8 +2745,8 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2788,7 +2807,7 @@ Module slice. ] |) |) in - let buf_len := + let~ buf_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2801,7 +2820,7 @@ Module slice. [ buf ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2813,20 +2832,19 @@ Module slice. |), [ buf; - BinOp.Panic.mul (| - Integer.Usize, - M.read (| buf_len |), - Value.Integer 2 - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| buf_len |)) + (Value.Integer 2) ] |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := m in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2834,7 +2852,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2845,12 +2863,12 @@ Module slice. ] |))) |) in - let rem_len := + let~ rem_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| capacity |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| capacity |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2859,10 +2877,9 @@ Module slice. [] |), [ buf ] - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2875,7 +2892,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -2924,7 +2941,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3063,7 +3080,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3074,7 +3091,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3119,7 +3136,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3130,7 +3147,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3193,7 +3210,7 @@ Module slice. ltac:(M.monadic (let slice := M.alloc (| slice |) in M.read (| - let size := + let~ size := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3270,7 +3287,7 @@ Module slice. ] |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3281,7 +3298,7 @@ Module slice. [ M.read (| size |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3302,7 +3319,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3319,7 +3336,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3412,14 +3431,14 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ V ], "iter", [] |), [ M.read (| slice |) ] |) |) in - let first := + let~ first := M.copy (| M.match_operator (| M.alloc (| @@ -3447,7 +3466,8 @@ Module slice. first)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -3468,13 +3488,13 @@ Module slice. ] |) |) in - let size := + let~ size := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -3549,20 +3569,18 @@ Module slice. ] |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ V ], "len", [] |), [ M.read (| slice |) ] - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3573,7 +3591,7 @@ Module slice. [ M.read (| size |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3596,7 +3614,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3617,7 +3635,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3634,7 +3652,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3646,7 +3669,7 @@ Module slice. 0 |) in let v := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3753,14 +3776,14 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ V ], "iter", [] |), [ M.read (| slice |) ] |) |) in - let first := + let~ first := M.copy (| M.match_operator (| M.alloc (| @@ -3788,7 +3811,8 @@ Module slice. first)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -3809,11 +3833,11 @@ Module slice. ] |) |) in - let size := + let~ size := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.apply @@ -3888,33 +3912,30 @@ Module slice. ] |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - M.call_closure (| + |)) + (BinOp.Wrap.mul + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| sep |) ] - |), - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + |)) + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ V ], "len", [] |), [ M.read (| slice |) ] - |), - Value.Integer 1 - |) - |) - |) + |)) + (Value.Integer 1))) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3925,7 +3946,7 @@ Module slice. [ M.read (| size |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3948,7 +3969,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3969,7 +3990,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3986,7 +4007,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3998,7 +4024,7 @@ Module slice. 0 |) in let v := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4158,7 +4184,7 @@ Module slice. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4199,7 +4225,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let init := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4222,7 +4248,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4266,7 +4292,7 @@ Module slice. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4277,7 +4303,7 @@ Module slice. [ M.read (| target |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4340,7 +4366,7 @@ Module slice. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4430,7 +4456,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4446,7 +4472,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let elem_alloc_fn := + let~ elem_alloc_fn := M.alloc (| M.closure (fun γ => @@ -4492,7 +4518,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let elem_dealloc_fn := + let~ elem_dealloc_fn := M.alloc (| M.closure (fun γ => @@ -4512,7 +4538,7 @@ Module slice. ltac:(M.monadic (let len := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::alloc::dealloc", [] |), @@ -4553,7 +4579,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let run_alloc_fn := + let~ run_alloc_fn := M.alloc (| M.closure (fun γ => @@ -4599,7 +4625,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let run_dealloc_fn := + let~ run_dealloc_fn := M.alloc (| M.closure (fun γ => @@ -4619,7 +4645,7 @@ Module slice. ltac:(M.monadic (let len := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "alloc::alloc::dealloc", [] |), @@ -4663,7 +4689,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/alloc/str.v b/CoqOfRust/alloc/str.v index 1f7c58b3c..0699770f0 100644 --- a/CoqOfRust/alloc/str.v +++ b/CoqOfRust/alloc/str.v @@ -163,21 +163,21 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let sep_len := + let~ sep_len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| sep |) ] |) |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ S ], "iter", [] |), [ M.read (| slice |) ] |) |) in - let first := + let~ first := M.copy (| M.match_operator (| M.alloc (| @@ -205,7 +205,8 @@ Module str. first)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -226,7 +227,7 @@ Module str. ] |) |) in - let reserved_len := + let~ reserved_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -402,7 +403,7 @@ Module str. ] |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -413,7 +414,7 @@ Module str. [ M.read (| reserved_len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -422,7 +423,7 @@ Module str. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -470,7 +471,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -498,8 +499,8 @@ Module str. ] |) |) in - let _ := - let pos := + let~ _ := + let~ pos := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -510,7 +511,7 @@ Module str. [ result ] |) |) in - let target := + let~ target := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -535,16 +536,15 @@ Module str. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| reserved_len |), - M.read (| pos |) - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| reserved_len |)) + (M.read (| pos |))) ] ] |) |) in - let sep_uninit := + let~ sep_uninit := M.alloc (| M.call_closure (| M.get_function (| @@ -580,7 +580,7 @@ Module str. ] |) |) in - let iter_uninit := + let~ iter_uninit := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -622,7 +622,7 @@ Module str. ltac:(M.monadic (let it := M.copy (| γ |) in M.read (| - let it := + let~ it := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -698,13 +698,13 @@ Module str. ] |) |) in - let remain := + let~ remain := M.alloc (| M.read (| - let target := M.copy (| target |) in - let iter := M.copy (| iter_uninit |) in - let sep_bytes := M.copy (| sep_uninit |) in - let _ := + let~ target := M.copy (| target |) in + let~ iter := M.copy (| iter_uninit |) in + let~ sep_bytes := M.copy (| sep_uninit |) in + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -765,7 +765,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -805,7 +805,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -819,7 +824,7 @@ Module str. 0 |) in let s := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -873,7 +878,7 @@ Module str. |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -894,12 +899,12 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) |) in - let content_bytes := + let~ content_bytes := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -955,7 +960,7 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1011,7 +1016,7 @@ Module str. M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1034,7 +1039,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) @@ -1097,7 +1102,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1137,7 +1142,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1151,7 +1161,7 @@ Module str. 0 |) in let s := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1205,7 +1215,7 @@ Module str. |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1226,12 +1236,12 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) |) in - let content_bytes := + let~ content_bytes := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1287,7 +1297,7 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1343,7 +1353,7 @@ Module str. M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1366,7 +1376,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) @@ -1429,7 +1439,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1469,7 +1479,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1483,7 +1498,7 @@ Module str. 0 |) in let s := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1537,7 +1552,7 @@ Module str. |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1558,12 +1573,12 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) |) in - let content_bytes := + let~ content_bytes := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1619,7 +1634,7 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1675,7 +1690,7 @@ Module str. M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1698,7 +1713,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) @@ -1761,7 +1776,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1801,7 +1816,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1815,7 +1835,7 @@ Module str. 0 |) in let s := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1869,7 +1889,7 @@ Module str. |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1890,12 +1910,12 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) |) in - let content_bytes := + let~ content_bytes := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1951,7 +1971,7 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2007,7 +2027,7 @@ Module str. M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2030,7 +2050,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) @@ -2093,7 +2113,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2133,7 +2153,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -2147,7 +2172,7 @@ Module str. 0 |) in let s := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2201,7 +2226,7 @@ Module str. |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2222,12 +2247,12 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) |) in - let content_bytes := + let~ content_bytes := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2283,7 +2308,7 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2339,7 +2364,7 @@ Module str. M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2362,7 +2387,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) @@ -2420,7 +2445,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2460,7 +2485,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -2474,7 +2504,7 @@ Module str. 0 |) in let s := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2528,7 +2558,7 @@ Module str. |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2549,12 +2579,12 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) |) in - let content_bytes := + let~ content_bytes := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2610,7 +2640,7 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2666,7 +2696,7 @@ Module str. M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2689,7 +2719,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| target, M.read (| tail |) @@ -2712,12 +2742,12 @@ Module str. target |) |) in - let result_len := + let~ result_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| reserved_len |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| reserved_len |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2726,10 +2756,9 @@ Module str. [] |), [ M.read (| remain |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2874,7 +2903,7 @@ Module str. (let self := M.alloc (| self |) in let target := M.alloc (| target |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "into_bytes", [] |), @@ -2886,7 +2915,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2989,15 +3018,15 @@ Module str. let from := M.alloc (| from |) in let to := M.alloc (| to |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let last_end := M.alloc (| Value.Integer 0 |) in - let _ := + let~ last_end := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3023,7 +3052,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3040,7 +3069,9 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3055,7 +3086,7 @@ Module str. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let start := M.copy (| γ1_0 |) in let part := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3088,7 +3119,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3099,21 +3130,20 @@ Module str. [ result; M.read (| to |) ] |) |) in - let _ := + let~ _ := M.write (| last_end, - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| part |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))) ] @@ -3122,7 +3152,7 @@ Module str. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -3181,7 +3211,7 @@ Module str. let to := M.alloc (| to |) in let count := M.alloc (| count |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3192,8 +3222,8 @@ Module str. [ Value.Integer 32 ] |) |) in - let last_end := M.alloc (| Value.Integer 0 |) in - let _ := + let~ last_end := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3233,7 +3263,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3253,7 +3283,9 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3268,7 +3300,7 @@ Module str. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let start := M.copy (| γ1_0 |) in let part := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3301,7 +3333,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3312,21 +3344,20 @@ Module str. [ result; M.read (| to |) ] |) |) in - let _ := + let~ _ := M.write (| last_end, - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| part |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))) ] @@ -3335,7 +3366,7 @@ Module str. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -3434,7 +3465,7 @@ Module str. ltac:(M.monadic (M.never_to_any (| M.read (| - let out := + let~ out := M.alloc (| M.call_closure (| M.get_function (| "alloc::str::convert_while_ascii", [] |), @@ -3449,7 +3480,7 @@ Module str. ] |) |) in - let rest := + let~ rest := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3477,7 +3508,7 @@ Module str. ] |) |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3488,7 +3519,7 @@ Module str. [ M.read (| out |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3528,7 +3559,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3545,7 +3576,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3659,7 +3695,7 @@ Module str. M.read (| γ0_2 |), Value.UnicodeChar 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3670,7 +3706,7 @@ Module str. [ s; M.read (| a |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3702,7 +3738,7 @@ Module str. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in let c := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3713,7 +3749,7 @@ Module str. [ s; M.read (| a |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3724,7 +3760,7 @@ Module str. [ s; M.read (| b |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3789,7 +3825,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let out := + let~ out := M.alloc (| M.call_closure (| M.get_function (| "alloc::str::convert_while_ascii", [] |), @@ -3804,7 +3840,7 @@ Module str. ] |) |) in - let rest := + let~ rest := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3832,7 +3868,7 @@ Module str. ] |) |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3843,7 +3879,7 @@ Module str. [ M.read (| out |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3869,7 +3905,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3886,7 +3922,9 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3944,7 +3982,7 @@ Module str. M.read (| γ0_2 |), Value.UnicodeChar 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3955,7 +3993,7 @@ Module str. [ s; M.read (| a |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3976,7 +4014,7 @@ Module str. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in let c := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3987,7 +4025,7 @@ Module str. [ s; M.read (| a |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3998,7 +4036,7 @@ Module str. [ s; M.read (| b |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4037,7 +4075,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4134,7 +4172,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let s := + let~ s := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4147,7 +4185,7 @@ Module str. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "make_ascii_uppercase", [] |), @@ -4186,7 +4224,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let s := + let~ s := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4199,7 +4237,7 @@ Module str. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "make_ascii_lowercase", [] |), @@ -4314,7 +4352,7 @@ Module str. (let b := M.alloc (| b |) in let convert := M.alloc (| convert |) in M.read (| - let out := + let~ out := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4336,9 +4374,9 @@ Module str. ] |) |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4350,13 +4388,12 @@ Module str. M.use (M.alloc (| BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| M.get_constant (| "alloc::str::convert_while_ascii::N" |) - |) - |)) + |))) (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -4368,7 +4405,7 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let in_chunk := + let~ in_chunk := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4384,20 +4421,19 @@ Module str. [ ("start", M.read (| i |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| M.get_constant (| "alloc::str::convert_while_ascii::N" |) - |) - |)) + |))) ] ] |) |) in - let out_chunk := + let~ out_chunk := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4428,21 +4464,20 @@ Module str. [ ("start", M.read (| i |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| M.get_constant (| "alloc::str::convert_while_ascii::N" |) - |) - |)) + |))) ] ] |) |) in - let bits := M.alloc (| Value.Integer 0 |) in - let _ := + let~ bits := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4477,7 +4512,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4496,7 +4531,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4508,7 +4548,7 @@ Module str. 0 |) in let j := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := bits in M.write (| β, @@ -4566,7 +4606,7 @@ Module str. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4594,7 +4634,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4629,7 +4669,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4648,7 +4688,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4660,7 +4705,7 @@ Module str. 0 |) in let j := M.copy (| γ0_0 |) in - let out := + let~ out := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4678,7 +4723,7 @@ Module str. [ M.read (| out_chunk |); M.read (| j |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4719,17 +4764,16 @@ Module str. |))) ] |)) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| M.get_constant (| "alloc::str::convert_while_ascii::N" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4737,7 +4781,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4746,7 +4790,7 @@ Module str. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4783,11 +4827,10 @@ Module str. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| M.get_constant (| "alloc::str::convert_while_ascii::USIZE_SIZE" |) |), - M.read (| M.get_constant (| "alloc::str::convert_while_ascii::MAGIC_UNROLL" |) |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| M.get_constant (| "alloc::str::convert_while_ascii::USIZE_SIZE" |) |)) + (M.read (| M.get_constant (| "alloc::str::convert_while_ascii::MAGIC_UNROLL" |) |)) |))). Definition value_NONASCII_MASK : Value.t := diff --git a/CoqOfRust/alloc/string.v b/CoqOfRust/alloc/string.v index 313744460..cc9778359 100644 --- a/CoqOfRust/alloc/string.v +++ b/CoqOfRust/alloc/string.v @@ -594,7 +594,8 @@ Module string. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::result::Result::Ok" |) in + M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.StructRecord "alloc::string::String" [ ("vec", M.read (| vec |)) ] ] @@ -660,7 +661,7 @@ Module string. M.catch_return (| ltac:(M.monadic (M.read (| - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -671,7 +672,7 @@ Module string. [ M.read (| v |) ] |) |) in - let first_valid := + let~ first_valid := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -698,7 +699,7 @@ Module string. 0 |) in let chunk := M.copy (| γ0_0 |) in - let valid := + let~ valid := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -709,7 +710,7 @@ Module string. [ chunk ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -744,7 +745,7 @@ Module string. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -757,7 +758,7 @@ Module string. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -831,7 +832,7 @@ Module string. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -909,7 +910,7 @@ Module string. ] |) |) in - let res := + let~ res := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -929,7 +930,7 @@ Module string. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -940,7 +941,7 @@ Module string. [ res; M.read (| first_valid |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -956,7 +957,7 @@ Module string. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -977,7 +978,7 @@ Module string. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -994,7 +995,12 @@ Module string. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1006,7 +1012,7 @@ Module string. 0 |) in let chunk := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1062,7 +1068,7 @@ Module string. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1123,7 +1129,7 @@ Module string. M.catch_return (| ltac:(M.monadic (M.read (| - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1143,7 +1149,7 @@ Module string. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1204,7 +1210,7 @@ Module string. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1231,7 +1237,12 @@ Module string. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1256,7 +1267,7 @@ Module string. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1467,7 +1478,7 @@ Module string. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1477,18 +1488,17 @@ Module string. M.use (M.alloc (| BinOp.Pure.ne - (BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 2 - |)) + |)) + (Value.Integer 2)) (Value.Integer 0) |)) in let _ := @@ -1802,7 +1812,7 @@ Module string. |))); fun γ => ltac:(M.monadic - (let iter := + (let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1813,7 +1823,7 @@ Module string. [ M.read (| v |) ] |) |) in - let string := + let~ string := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2116,7 +2126,7 @@ Module string. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2126,18 +2136,17 @@ Module string. M.use (M.alloc (| BinOp.Pure.ne - (BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 2 - |)) + |)) + (Value.Integer 2)) (Value.Integer 0) |)) in let _ := @@ -2451,7 +2460,7 @@ Module string. |))); fun γ => ltac:(M.monadic - (let iter := + (let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2462,7 +2471,7 @@ Module string. [ M.read (| v |) ] |) |) in - let string := + let~ string := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2984,7 +2993,7 @@ Module string. |) in let start := M.copy (| γ1_0 |) in let end_ := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3036,7 +3045,7 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3087,7 +3096,7 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3485,7 +3494,7 @@ Module string. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3583,7 +3592,7 @@ Module string. M.catch_return (| ltac:(M.monadic (M.read (| - let ch := + let~ ch := M.copy (| M.match_operator (| M.alloc (| @@ -3687,22 +3696,21 @@ Module string. ] |) |) in - let newlen := + let~ newlen := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "len", [] |), [ M.read (| self |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), [ M.read (| ch |) ] - |) - |) + |)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3754,7 +3762,7 @@ Module string. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let ch := + let~ ch := M.copy (| M.match_operator (| M.alloc (| @@ -3809,7 +3817,8 @@ Module string. ch)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -3841,26 +3850,25 @@ Module string. ] |) |) in - let next := + let~ next := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), [ M.read (| ch |) ] - |) - |) + |)) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "len", [] |), [ M.read (| self |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ Ty.path "u8" ] |), @@ -3917,11 +3925,11 @@ Module string. M.read (| idx |) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| next |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| next |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3937,11 +3945,10 @@ Module string. "alloc::string::String", "vec" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - BinOp.Panic.sub (| Integer.Usize, M.read (| next |), M.read (| idx |) |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (BinOp.Wrap.sub Integer.Usize (M.read (| next |)) (M.read (| idx |))) ] |) |) in @@ -4013,9 +4020,9 @@ Module string. (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in M.read (| - let rejections := + let~ rejections := M.copy (| - let searcher := + let~ searcher := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4040,8 +4047,8 @@ Module string. ] |) |) in - let front := M.alloc (| Value.Integer 0 |) in - let rejections := + let~ front := M.alloc (| Value.Integer 0 |) in + let~ rejections := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4187,8 +4194,8 @@ Module string. M.SubPointer.get_tuple_field (| γ, 1 |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - let prev_front := M.copy (| front |) in - let _ := + let~ prev_front := M.copy (| front |) in + let~ _ := M.write (| front, M.read (| end_ |) |) in M.alloc (| Value.StructTuple @@ -4271,8 +4278,8 @@ Module string. |) |) |) in - let len := M.alloc (| Value.Integer 0 |) in - let ptr := + let~ len := M.alloc (| Value.Integer 0 |) in + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4291,7 +4298,7 @@ Module string. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4324,7 +4331,7 @@ Module string. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4353,7 +4360,9 @@ Module string. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4368,15 +4377,14 @@ Module string. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let start := M.copy (| γ1_0 |) in let end_ := M.copy (| γ1_1 |) in - let count := + let~ count := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - M.read (| start |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (M.read (| start |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4394,7 +4402,7 @@ Module string. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -4432,15 +4440,14 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| count |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| count |)) |) in M.alloc (| Value.Tuple [] |))) ] @@ -4449,7 +4456,7 @@ Module string. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4538,14 +4545,14 @@ Module string. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "len", [] |), [ M.read (| self |) ] |) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::string::retain::SetLenOnDrop" @@ -4555,7 +4562,7 @@ Module string. ("del_bytes", Value.Integer 0) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4578,7 +4585,7 @@ Module string. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let ch := + let~ ch := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4656,14 +4663,14 @@ Module string. ] |) |) in - let ch_len := + let~ ch_len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), [ M.read (| ch |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4689,7 +4696,7 @@ Module string. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -4698,11 +4705,10 @@ Module string. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| ch_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| ch_len |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4730,7 +4736,7 @@ Module string. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4782,23 +4788,22 @@ Module string. |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| guard, "alloc::string::retain::SetLenOnDrop", "idx" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| guard, "alloc::string::retain::SetLenOnDrop", "del_bytes" |) - |) - |) + |)) ] |); M.call_closure (| @@ -4820,7 +4825,7 @@ Module string. |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -4829,11 +4834,7 @@ Module string. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| ch_len |) - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| ch_len |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4841,7 +4842,7 @@ Module string. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4850,7 +4851,7 @@ Module string. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -4886,7 +4887,7 @@ Module string. let idx := M.alloc (| idx |) in let ch := M.alloc (| ch |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4933,8 +4934,8 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let bits := M.alloc (| repeat (Value.Integer 0) 4 |) in - let bits := + let~ bits := M.alloc (| repeat (Value.Integer 0) 4 |) in + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes", [] |), @@ -4946,7 +4947,7 @@ Module string. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4985,14 +4986,14 @@ Module string. let idx := M.alloc (| idx |) in let bytes := M.alloc (| bytes |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "len", [] |), [ M.read (| self |) ] |) |) in - let amt := + let~ amt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5003,7 +5004,7 @@ Module string. [ M.read (| bytes |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5023,7 +5024,7 @@ Module string. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ Ty.path "u8" ] |), @@ -5077,14 +5078,14 @@ Module string. |) ] |); - BinOp.Panic.add (| Integer.Usize, M.read (| idx |), M.read (| amt |) |) + BinOp.Wrap.add Integer.Usize (M.read (| idx |)) (M.read (| amt |)) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| idx |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| idx |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), @@ -5127,7 +5128,7 @@ Module string. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5143,7 +5144,7 @@ Module string. "alloc::string::String", "vec" |); - BinOp.Panic.add (| Integer.Usize, M.read (| len |), M.read (| amt |) |) + BinOp.Wrap.add Integer.Usize (M.read (| len |)) (M.read (| amt |)) ] |) |) in @@ -5171,7 +5172,7 @@ Module string. let idx := M.alloc (| idx |) in let string := M.alloc (| string |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5218,7 +5219,7 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5327,7 +5328,7 @@ Module string. (let self := M.alloc (| self |) in let at_ := M.alloc (| at_ |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5374,7 +5375,7 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let other := + let~ other := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5509,7 +5510,7 @@ Module string. |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5561,7 +5562,7 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5612,8 +5613,8 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let self_ptr := M.copy (| M.use (M.alloc (| M.read (| self |) |)) |) in - let chars_iter := + let~ self_ptr := M.copy (| M.use (M.alloc (| M.read (| self |) |)) |) in + let~ chars_iter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "chars", [] |), @@ -5700,7 +5701,7 @@ Module string. let range := M.alloc (| range |) in let replace_with := M.alloc (| replace_with |) in M.read (| - let start := + let~ start := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5713,7 +5714,7 @@ Module string. [ range ] |) |) in - let _ := + let~ _ := M.match_operator (| start, [ @@ -5813,11 +5814,10 @@ Module string. |), [ M.read (| self |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) ] |)) |)) in @@ -5842,10 +5842,13 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.Tuple [] |))) ] |) in - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5858,7 +5861,7 @@ Module string. [ range ] |) |) in - let _ := + let~ _ := M.match_operator (| end_, [ @@ -5898,11 +5901,10 @@ Module string. |), [ M.read (| self |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) ] |)) |)) in @@ -5987,10 +5989,13 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6048,7 +6053,7 @@ Module string. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6094,7 +6099,7 @@ Module string. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6376,7 +6381,7 @@ Module string. (let self := M.alloc (| self |) in let source := M.alloc (| source |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6432,14 +6437,14 @@ Module string. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6481,14 +6486,14 @@ Module string. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6530,14 +6535,14 @@ Module string. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6588,7 +6593,7 @@ Module string. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let iterator := + let~ iterator := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6617,7 +6622,8 @@ Module string. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] @@ -6632,7 +6638,7 @@ Module string. 0 |) in let buf := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6676,14 +6682,14 @@ Module string. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6743,7 +6749,7 @@ Module string. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let iterator := + let~ iterator := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6772,7 +6778,8 @@ Module string. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] @@ -6787,7 +6794,7 @@ Module string. 0 |) in let cow := M.copy (| γ0_0 |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6798,7 +6805,7 @@ Module string. [ M.read (| cow |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6845,7 +6852,7 @@ Module string. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let iterator := + let~ iterator := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6877,7 +6884,7 @@ Module string. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower_bound := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6888,7 +6895,7 @@ Module string. [ M.read (| self |); M.read (| lower_bound |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6945,7 +6952,7 @@ Module string. (let self := M.alloc (| self |) in let c := M.alloc (| c |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push", [] |), @@ -6969,7 +6976,7 @@ Module string. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "reserve", [] |), @@ -7009,7 +7016,7 @@ Module string. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7069,7 +7076,7 @@ Module string. (let γ := M.read (| γ |) in let c := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7099,7 +7106,7 @@ Module string. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "reserve", [] |), @@ -7139,7 +7146,7 @@ Module string. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7207,7 +7214,7 @@ Module string. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -7244,7 +7251,7 @@ Module string. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7334,7 +7341,7 @@ Module string. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7410,7 +7417,7 @@ Module string. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -7459,7 +7466,7 @@ Module string. (let self := M.alloc (| self |) in let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7541,7 +7548,7 @@ Module string. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -9157,7 +9164,7 @@ Module string. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -9192,7 +9199,7 @@ Module string. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -9977,21 +9984,21 @@ Module string. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let formatter := + let~ formatter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "new", [] |), [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10179,7 +10186,7 @@ Module string. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10190,8 +10197,8 @@ Module string. [ Value.Integer 3 ] |) |) in - let n := M.copy (| M.read (| self |) |) in - let _ := + let~ n := M.copy (| M.read (| self |) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10200,7 +10207,7 @@ Module string. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (Value.Integer 10) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10216,7 +10223,7 @@ Module string. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10227,33 +10234,27 @@ Module string. [ buf; M.rust_cast - (BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - BinOp.Panic.div (| - Integer.U8, - M.read (| n |), - Value.Integer 100 - |) - |)) + (BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (BinOp.Wrap.div + Integer.U8 + (M.read (| n |)) + (Value.Integer 100))) ] |) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.rem (| - Integer.U8, - M.read (| β |), - Value.Integer 100 - |) + BinOp.Wrap.rem Integer.U8 (M.read (| β |)) (Value.Integer 100) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10264,36 +10265,31 @@ Module string. [ buf; M.rust_cast - (BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - BinOp.Panic.div (| Integer.U8, M.read (| n |), Value.Integer 10 |) - |)) + (BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (BinOp.Wrap.div Integer.U8 (M.read (| n |)) (Value.Integer 10))) ] |) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.rem (| Integer.U8, M.read (| β |), Value.Integer 10 |) + BinOp.Wrap.rem Integer.U8 (M.read (| β |)) (Value.Integer 10) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push", [] |), [ buf; M.rust_cast - (BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| n |) - |)) + (BinOp.Wrap.add Integer.U8 (M.read (| UnsupportedLiteral |)) (M.read (| n |))) ] |) |) in @@ -10338,7 +10334,7 @@ Module string. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10349,7 +10345,7 @@ Module string. [ Value.Integer 4 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10364,7 +10360,7 @@ Module string. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10379,14 +10375,14 @@ Module string. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "unsigned_abs", [] |), [ M.read (| M.read (| self |) |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10395,7 +10391,7 @@ Module string. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (Value.Integer 10) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10411,7 +10407,7 @@ Module string. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10422,21 +10418,17 @@ Module string. [ buf; Value.UnicodeChar 49 ] |) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.sub (| - Integer.U8, - M.read (| β |), - Value.Integer 100 - |) + BinOp.Wrap.sub Integer.U8 (M.read (| β |)) (Value.Integer 100) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10447,36 +10439,31 @@ Module string. [ buf; M.rust_cast - (BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - BinOp.Panic.div (| Integer.U8, M.read (| n |), Value.Integer 10 |) - |)) + (BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (BinOp.Wrap.div Integer.U8 (M.read (| n |)) (Value.Integer 10))) ] |) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.rem (| Integer.U8, M.read (| β |), Value.Integer 10 |) + BinOp.Wrap.rem Integer.U8 (M.read (| β |)) (Value.Integer 10) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push", [] |), [ buf; M.rust_cast - (BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| n |) - |)) + (BinOp.Wrap.add Integer.U8 (M.read (| UnsupportedLiteral |)) (M.read (| n |))) ] |) |) in @@ -11163,7 +11150,7 @@ Module string. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push_str", [] |), @@ -11188,7 +11175,7 @@ Module string. (let self := M.alloc (| self |) in let c := M.alloc (| c |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "push", [] |), @@ -11329,7 +11316,7 @@ Module string. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let self_vec := + let~ self_vec := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "as_mut_vec", [] |), @@ -11390,7 +11377,7 @@ Module string. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/sync.v b/CoqOfRust/alloc/sync.v index 7eb300e3b..f64443479 100644 --- a/CoqOfRust/alloc/sync.v +++ b/CoqOfRust/alloc/sync.v @@ -164,7 +164,7 @@ Module sync. ltac:(M.monadic (let data := M.alloc (| data |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -313,7 +313,7 @@ Module sync. ltac:(M.monadic (let data_fn := M.alloc (| data_fn |) in M.read (| - let uninit_ptr := + let~ uninit_ptr := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -407,7 +407,7 @@ Module sync. ] |) |) in - let init_ptr := + let~ init_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -424,7 +424,7 @@ Module sync. [ M.read (| uninit_ptr |) ] |) |) in - let weak := + let~ weak := M.alloc (| Value.StructRecord "alloc::sync::Weak" @@ -433,7 +433,7 @@ Module sync. ("alloc", Value.StructTuple "alloc::alloc::Global" []) ] |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -457,9 +457,9 @@ Module sync. [ M.read (| data_fn |); Value.Tuple [ weak ] ] |) |) in - let strong := + let~ strong := M.copy (| - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -472,7 +472,7 @@ Module sync. [ M.read (| init_ptr |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -486,7 +486,7 @@ Module sync. ] |) |) in - let prev_value := + let~ prev_value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -505,7 +505,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -514,7 +514,7 @@ Module sync. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ prev_value; M.alloc (| Value.Integer 0 |) ] @@ -547,7 +547,7 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -613,7 +613,7 @@ Module sync. |) |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1051,7 +1051,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -1783,14 +1783,14 @@ Module sync. let allocate := M.alloc (| allocate |) in let mem_to_arcinner := M.alloc (| mem_to_arcinner |) in M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_function (| "alloc::sync::arcinner_layout_for_value_layout", [] |), [ M.read (| value_layout |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1893,14 +1893,14 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_function (| "alloc::sync::arcinner_layout_for_value_layout", [] |), [ M.read (| value_layout |) ] |) |) in - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -1988,7 +1988,7 @@ Module sync. ] |) |) in - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2035,7 +2035,7 @@ Module sync. let layout := M.alloc (| layout |) in let mem_to_arcinner := M.alloc (| mem_to_arcinner |) in M.read (| - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2072,7 +2072,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2080,7 +2080,7 @@ Module sync. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -2133,7 +2133,7 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -2170,8 +2170,8 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2195,7 +2195,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2344,7 +2344,7 @@ Module sync. (let data := M.alloc (| data |) in let alloc := M.alloc (| alloc |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2855,7 +2855,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -3504,7 +3504,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3572,14 +3572,14 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), [ Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] ] |) |) in - let elem := + let~ elem := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), @@ -3607,7 +3607,7 @@ Module sync. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ A ] |), @@ -3615,7 +3615,7 @@ Module sync. ] |) |) in - let _weak := + let~ _weak := M.alloc (| Value.StructRecord "alloc::sync::Weak" @@ -3631,7 +3631,7 @@ Module sync. ("alloc", M.read (| alloc |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3688,7 +3688,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let this := + let~ this := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3701,7 +3701,7 @@ Module sync. [ M.read (| this |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3762,14 +3762,14 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), [ Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] ] |) |) in - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), @@ -3798,7 +3798,7 @@ Module sync. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ A ] |), @@ -3822,7 +3822,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3880,7 +3880,7 @@ Module sync. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3891,7 +3891,7 @@ Module sync. [ this ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3927,7 +3927,7 @@ Module sync. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3985,14 +3985,14 @@ Module sync. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_function (| "alloc::sync::data_offset", [ T ] |), [ M.read (| ptr |) ] |) |) in - let arc_ptr := + let~ arc_ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -4069,7 +4069,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let cur := + let~ cur := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4099,7 +4099,7 @@ Module sync. M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4120,14 +4120,14 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::hint::spin_loop", [] |), [] |) |) in - let _ := + let~ _ := M.write (| cur, M.call_closure (| @@ -4164,7 +4164,7 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4226,11 +4226,7 @@ Module sync. "weak" |); M.read (| cur |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| cur |), - Value.Integer 1 - |); + BinOp.Wrap.add Integer.Usize (M.read (| cur |)) (Value.Integer 1); Value.StructTuple "core::sync::atomic::Ordering::Acquire" []; Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] ] @@ -4248,7 +4244,7 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4260,7 +4256,7 @@ Module sync. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4414,7 +4410,7 @@ Module sync. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let cnt := + let~ cnt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4456,7 +4452,7 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| cnt |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| cnt |)) (Value.Integer 1) |))) ] |) @@ -4523,7 +4519,7 @@ Module sync. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let arc := + let~ arc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4545,7 +4541,7 @@ Module sync. ] |) |) in - let _arc_clone := + let~ _arc_clone := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4582,7 +4578,7 @@ Module sync. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -4669,7 +4665,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::drop_in_place", [ T ] |), @@ -4685,7 +4681,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -4926,14 +4922,14 @@ Module sync. ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| - let value_size := + let~ value_size := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of_val", [ T ] |), [ M.read (| src |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4954,7 +4950,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), @@ -4993,7 +4989,7 @@ Module sync. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let bptr := M.copy (| γ0_0 |) in let alloc := M.copy (| γ0_1 |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5009,7 +5005,7 @@ Module sync. [ M.rust_cast (M.read (| bptr |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5106,7 +5102,7 @@ Module sync. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5155,7 +5151,7 @@ Module sync. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let arc := + let~ arc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5177,7 +5173,7 @@ Module sync. ] |) |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5191,7 +5187,7 @@ Module sync. [ arc ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5223,7 +5219,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| this |), M.call_closure (| @@ -5281,7 +5277,7 @@ Module sync. M.read (| γ |), Value.Bool true |) in - let _weak := + let~ _weak := M.alloc (| Value.StructRecord "alloc::sync::Weak" @@ -5313,7 +5309,7 @@ Module sync. |)) ] |) in - let arc := + let~ arc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5341,7 +5337,7 @@ Module sync. ] |) |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5359,7 +5355,7 @@ Module sync. [ arc ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5392,7 +5388,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5422,7 +5418,7 @@ Module sync. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5724,7 +5720,7 @@ Module sync. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let unique := + let~ unique := M.alloc (| BinOp.Pure.eq (M.call_closure (| @@ -5751,7 +5747,7 @@ Module sync. |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6361,7 +6357,7 @@ Module sync. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6379,7 +6375,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -6484,7 +6480,7 @@ Module sync. (let iter := M.alloc (| iter |) in let len := M.alloc (| len |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6497,8 +6493,8 @@ Module sync. [ M.read (| len |) ] |) |) in - let mem := M.alloc (| M.rust_cast (M.rust_cast (M.read (| ptr |))) |) in - let layout := + let~ mem := M.alloc (| M.rust_cast (M.rust_cast (M.read (| ptr |))) |) in + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6513,7 +6509,7 @@ Module sync. [ M.read (| ptr |) ] |) |) in - let elems := + let~ elems := M.alloc (| M.rust_cast (M.read (| @@ -6527,7 +6523,7 @@ Module sync. |)) |)) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "alloc::sync::from_iter_exact::Guard" @@ -6546,7 +6542,7 @@ Module sync. ("n_elems", Value.Integer 0) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -6580,7 +6576,7 @@ Module sync. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6599,7 +6595,9 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6614,7 +6612,7 @@ Module sync. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let item := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -6631,7 +6629,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -6640,11 +6638,10 @@ Module sync. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -6653,7 +6650,7 @@ Module sync. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7062,7 +7059,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let md_self := + let~ md_self := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7196,7 +7193,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let md_self := + let~ md_self := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7482,7 +7479,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let old_size := + let~ old_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7508,7 +7505,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7687,7 +7684,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7730,14 +7727,14 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), [ Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7822,7 +7819,7 @@ Module sync. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7847,7 +7844,7 @@ Module sync. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), @@ -7860,7 +7857,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7925,7 +7922,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7946,14 +7943,14 @@ Module sync. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), [ M.SubPointer.get_struct_record_field (| self, "alloc::sync::Arc", "alloc" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8128,7 +8125,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8202,7 +8199,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8213,7 +8210,7 @@ Module sync. [ self ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8260,7 +8257,7 @@ Module sync. (let ptr := M.alloc (| ptr |) in let alloc := M.alloc (| alloc |) in M.read (| - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8280,7 +8277,7 @@ Module sync. M.alloc (| M.rust_cast (M.read (| ptr |)) |))); fun γ => ltac:(M.monadic - (let offset := + (let~ offset := M.alloc (| M.call_closure (| M.get_function (| "alloc::sync::data_offset", [ T ] |), @@ -8669,7 +8666,7 @@ Module sync. 0 |) in let inner := M.copy (| γ0_0 |) in - let weak := + let~ weak := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8689,7 +8686,7 @@ Module sync. ] |) |) in - let strong := + let~ strong := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8725,11 +8722,7 @@ Module sync. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| weak |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| weak |)) (Value.Integer 1) |))) ] |))); @@ -8764,7 +8757,7 @@ Module sync. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8955,7 +8948,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let inner := + let~ inner := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9023,7 +9016,7 @@ Module sync. ] |) |) in - let old_size := + let~ old_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9044,7 +9037,7 @@ Module sync. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9175,7 +9168,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let inner := + let~ inner := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9240,7 +9233,7 @@ Module sync. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::fence", [] |), @@ -10243,7 +10236,7 @@ Module sync. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let arc := + let~ arc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10434,7 +10427,7 @@ Module sync. let len := M.copy (| γ0_1 |) in let cap := M.copy (| γ0_2 |) in let alloc := M.copy (| γ0_3 |) in - let rc_ptr := + let~ rc_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10447,7 +10440,7 @@ Module sync. [ M.read (| len |); alloc ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -10704,7 +10697,7 @@ Module sync. (M.read (| M.get_constant (| "alloc::sync::N" |) |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), @@ -10945,7 +10938,7 @@ Module sync. 0 |) in let high := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10957,7 +10950,7 @@ Module sync. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ low; high ] |), [ @@ -10994,7 +10987,7 @@ Module sync. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -11275,7 +11268,7 @@ Module sync. ltac:(M.monadic (let align := M.alloc (| align |) in M.read (| - let layout := + let~ layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11287,21 +11280,20 @@ Module sync. |) |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ layout ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "padding_needed_for", [] |), [ layout; M.read (| align |) ] - |) - |) + |)) |) |))) | _, _ => M.impossible @@ -11414,7 +11406,7 @@ Module sync. (let self := M.alloc (| self |) in let req := M.alloc (| req |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::error::Error", T, [], "provide", [] |), diff --git a/CoqOfRust/alloc/task.v b/CoqOfRust/alloc/task.v index 170f7b372..bd02126ba 100644 --- a/CoqOfRust/alloc/task.v +++ b/CoqOfRust/alloc/task.v @@ -10,7 +10,7 @@ Module task. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::task::Wake", Self, [], "wake", [] |), @@ -203,7 +203,7 @@ Module task. ltac:(M.monadic (let waker := M.alloc (| waker |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -262,7 +262,7 @@ Module task. ltac:(M.monadic (let waker := M.alloc (| waker |) in M.read (| - let waker := + let~ waker := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -273,7 +273,7 @@ Module task. [ M.rust_cast (M.read (| waker |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::task::Wake", W, [], "wake", [] |), @@ -299,7 +299,7 @@ Module task. ltac:(M.monadic (let waker := M.alloc (| waker |) in M.read (| - let waker := + let~ waker := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -322,7 +322,7 @@ Module task. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::task::Wake", W, [], "wake_by_ref", [] |), @@ -364,7 +364,7 @@ Module task. ltac:(M.monadic (let waker := M.alloc (| waker |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/vec/drain.v b/CoqOfRust/alloc/vec/drain.v index 8ea35cab2..832608601 100644 --- a/CoqOfRust/alloc/vec/drain.v +++ b/CoqOfRust/alloc/vec/drain.v @@ -227,7 +227,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let this := + let~ this := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -240,7 +240,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let source_vec := + let~ source_vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -270,7 +270,7 @@ Module vec. ] |) |) in - let start := + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -281,7 +281,7 @@ Module vec. [ M.read (| source_vec |) ] |) |) in - let tail := + let~ tail := M.copy (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -300,7 +300,7 @@ Module vec. "tail_start" |) |) in - let unyielded_len := + let~ unyielded_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -330,7 +330,7 @@ Module vec. ] |) |) in - let unyielded_ptr := + let~ unyielded_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "as_ptr", [] |), @@ -363,7 +363,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -379,7 +379,7 @@ Module vec. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let start_ptr := + let~ start_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -400,7 +400,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -419,9 +419,9 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let src := M.copy (| unyielded_ptr |) in - let dst := M.copy (| start_ptr |) in - let _ := + let~ src := M.copy (| unyielded_ptr |) in + let~ dst := M.copy (| start_ptr |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -446,18 +446,17 @@ Module vec. (M.alloc (| BinOp.Pure.ne (M.read (| tail |)) - (BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| unyielded_len |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| unyielded_len |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -478,7 +477,7 @@ Module vec. ] |) |) in - let dst := + let~ dst := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -489,7 +488,7 @@ Module vec. [ M.read (| start_ptr |); M.read (| unyielded_len |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -528,7 +527,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -538,14 +537,13 @@ Module vec. |), [ M.read (| source_vec |); - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| unyielded_len |) - |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| unyielded_len |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.call_closure (| M.get_trait_method (| @@ -562,8 +560,7 @@ Module vec. "alloc::vec::drain::Drain", "tail_len" |) - |) - |) + |)) ] |) |) in @@ -892,7 +889,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_function (| @@ -908,7 +905,7 @@ Module vec. ] |) |) in - let drop_len := + let~ drop_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -921,7 +918,7 @@ Module vec. [ iter ] |) |) in - let vec := + let~ vec := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -929,7 +926,7 @@ Module vec. "vec" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -943,8 +940,8 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let _ := - let vec := + let~ _ := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -957,7 +954,7 @@ Module vec. [ vec ] |) |) in - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -968,7 +965,7 @@ Module vec. [ M.read (| vec |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -978,25 +975,23 @@ Module vec. |), [ M.read (| vec |); - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_len |), - M.read (| drop_len |) - |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| old_len |)) + (M.read (| drop_len |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::drain::Drain", "tail_len" |) - |) - |) + |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1006,17 +1001,16 @@ Module vec. |), [ M.read (| vec |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| old_len |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| old_len |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::drain::Drain", "tail_len" |) - |) - |) + |)) ] |) |) in @@ -1028,11 +1022,11 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _guard := + let~ _guard := M.alloc (| Value.StructTuple "alloc::vec::drain::drop::DropGuard" [ M.read (| self |) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1051,7 +1045,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let drop_ptr := + let~ drop_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1071,7 +1065,7 @@ Module vec. ] |) |) in - let vec_ptr := + let~ vec_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1093,7 +1087,7 @@ Module vec. ] |) |) in - let drop_offset := + let~ drop_offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1107,7 +1101,7 @@ Module vec. ] |) |) in - let to_drop := + let~ to_drop := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), @@ -1124,7 +1118,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/alloc/vec/extract_if.v b/CoqOfRust/alloc/vec/extract_if.v index 0dcafcbd9..b6b51beca 100644 --- a/CoqOfRust/alloc/vec/extract_if.v +++ b/CoqOfRust/alloc/vec/extract_if.v @@ -174,7 +174,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -206,7 +206,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let i := + let~ i := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -214,7 +214,7 @@ Module vec. "idx" |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_function (| @@ -248,7 +248,7 @@ Module vec. ] |) |) in - let drained := + let~ drained := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -269,7 +269,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -278,11 +278,7 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -298,7 +294,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -307,11 +303,10 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.return_ (| Value.StructTuple @@ -356,7 +351,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let del := + let~ del := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -364,27 +359,26 @@ Module vec. "del" |) |) in - let src := + let~ src := M.alloc (| M.SubPointer.get_array_field (| M.read (| v |), i |) |) in - let dst := + let~ dst := M.alloc (| M.SubPointer.get_array_field (| M.read (| v |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - M.read (| del |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (M.read (| del |)) |) |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -409,7 +403,7 @@ Module vec. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -443,23 +437,22 @@ Module vec. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "old_len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "idx" |) - |) - |) + |)) ] ])) | _, _ => M.impossible @@ -510,7 +503,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -549,7 +542,7 @@ Module vec. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -568,7 +561,7 @@ Module vec. ] |) |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -588,7 +581,7 @@ Module vec. ] |) |) in - let dst := + let~ dst := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -608,27 +601,26 @@ Module vec. ] |) |) in - let tail_len := + let~ tail_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "old_len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "idx" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -643,7 +635,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -659,23 +651,22 @@ Module vec. "vec" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "old_len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::extract_if::ExtractIf", "del" |) - |) - |) + |)) ] |) |) in diff --git a/CoqOfRust/alloc/vec/in_place_collect.v b/CoqOfRust/alloc/vec/in_place_collect.v index f88ed13fc..fc362fbb3 100644 --- a/CoqOfRust/alloc/vec/in_place_collect.v +++ b/CoqOfRust/alloc/vec/in_place_collect.v @@ -35,7 +35,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -77,36 +77,34 @@ Module vec. let step_expand := M.copy (| γ1_0 |) in M.alloc (| BinOp.Pure.ge - (BinOp.Panic.mul (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.mul + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ SRC ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", [] |), [ M.read (| step_merge |) ] - |) - |)) - (BinOp.Panic.mul (| - Integer.Usize, - M.call_closure (| + |))) + (BinOp.Wrap.mul + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ DEST ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", [] |), [ M.read (| step_expand |) ] - |) - |)) + |))) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -151,7 +149,7 @@ Module vec. ltac:(M.monadic (M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -176,7 +174,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -200,22 +198,20 @@ Module vec. BinOp.Pure.gt (M.read (| src_cap |)) (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.ne - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| src_cap |), - M.call_closure (| + (BinOp.Wrap.mul + Integer.Usize + (M.read (| src_cap |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ SRC ] |), [] - |) - |)) - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| dst_cap |), - M.call_closure (| + |))) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| dst_cap |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ DEST ] |), [] - |) - |)))) + |))))) |) |) |) @@ -349,7 +345,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -386,7 +382,7 @@ Module vec. ] |) in M.match_operator (| - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -468,27 +464,25 @@ Module vec. "end" |) |)); - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - M.read (| + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| inner |), "alloc::vec::into_iter::IntoIter", "cap" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.associated ] |), [] - |) - |), - M.call_closure (| + |))) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |) - |) + |)) ] |), [ @@ -506,7 +500,7 @@ Module vec. let dst_buf := M.copy (| γ0_3 |) in let dst_end := M.copy (| γ0_4 |) in let dst_cap := M.copy (| γ0_5 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -519,7 +513,7 @@ Module vec. [ iterator; M.read (| dst_buf |); M.read (| dst_end |) ] |) |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -543,7 +537,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -555,7 +549,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -614,7 +608,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -656,7 +650,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -680,7 +674,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -692,7 +686,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -775,7 +769,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let dst_guard := + let~ dst_guard := M.alloc (| Value.StructRecord "alloc::vec::in_place_drop::InPlaceDstBufDrop" @@ -785,7 +779,7 @@ Module vec. ("cap", M.read (| dst_cap |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -798,7 +792,7 @@ Module vec. [ M.read (| src |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -820,9 +814,9 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let alloc := + let~ alloc := M.alloc (| Value.StructTuple "alloc::alloc::Global" [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -834,7 +828,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -873,7 +867,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Ne" @@ -912,7 +906,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -924,7 +918,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -963,7 +957,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Ne" @@ -1002,7 +996,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let src_align := + let~ src_align := M.alloc (| M.call_closure (| M.get_function (| @@ -1012,7 +1006,7 @@ Module vec. [] |) |) in - let src_size := + let~ src_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1032,7 +1026,7 @@ Module vec. ] |) |) in - let old_layout := + let~ old_layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1043,14 +1037,14 @@ Module vec. [ M.read (| src_size |); M.read (| src_align |) ] |) |) in - let dst_align := + let~ dst_align := M.alloc (| M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] |) |) in - let dst_size := + let~ dst_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1067,7 +1061,7 @@ Module vec. ] |) |) in - let new_layout := + let~ new_layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1078,7 +1072,7 @@ Module vec. [ M.read (| dst_size |); M.read (| dst_align |) ] |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1117,7 +1111,7 @@ Module vec. 0 |) in let reallocated := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| dst_buf, M.rust_cast @@ -1141,7 +1135,7 @@ Module vec. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1153,36 +1147,34 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| src_cap |), - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| src_cap |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.associated ] |), [] - |) - |) + |)) |); M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| dst_cap |), - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| dst_cap |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |) - |) + |)) |) ] |), @@ -1220,7 +1212,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -1262,7 +1254,7 @@ Module vec. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1276,7 +1268,7 @@ Module vec. [ M.read (| dst_guard |) ] |) |) in - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1348,8 +1340,8 @@ Module vec. ltac:(M.monadic (let item := M.copy (| γ |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1361,7 +1353,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1431,7 +1423,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -1447,7 +1439,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| sink, @@ -1525,13 +1517,13 @@ Module vec. let dst_buf := M.alloc (| dst_buf |) in let end_ := M.alloc (| end_ |) in M.read (| - let sink := + let~ sink := M.alloc (| Value.StructRecord "alloc::vec::in_place_drop::InPlaceDrop" [ ("inner", M.read (| dst_buf |)); ("dst", M.read (| dst_buf |)) ] |) in - let sink := + let~ sink := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1666,7 +1658,7 @@ Module vec. let dst_buf := M.alloc (| dst_buf |) in let end_ := M.alloc (| end_ |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1679,13 +1671,13 @@ Module vec. [ M.read (| self |) ] |) |) in - let drop_guard := + let~ drop_guard := M.alloc (| Value.StructRecord "alloc::vec::in_place_drop::InPlaceDrop" [ ("inner", M.read (| dst_buf |)); ("dst", M.read (| dst_buf |)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1710,7 +1702,7 @@ Module vec. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1729,7 +1721,9 @@ Module vec. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1741,7 +1735,7 @@ Module vec. 0 |) in let i := M.copy (| γ0_0 |) in - let dst := + let~ dst := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1752,7 +1746,7 @@ Module vec. [ M.read (| dst_buf |); M.read (| i |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1764,7 +1758,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1829,7 +1823,7 @@ Module vec. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -1848,7 +1842,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| drop_guard, @@ -1871,7 +1865,7 @@ Module vec. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/alloc/vec/in_place_drop.v b/CoqOfRust/alloc/vec/in_place_drop.v index 12b4e0906..3b819e321 100644 --- a/CoqOfRust/alloc/vec/in_place_drop.v +++ b/CoqOfRust/alloc/vec/in_place_drop.v @@ -73,7 +73,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -146,7 +146,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/vec/into_iter.v b/CoqOfRust/alloc/vec/into_iter.v index f1ed27474..8ca4a1f3a 100644 --- a/CoqOfRust/alloc/vec/into_iter.v +++ b/CoqOfRust/alloc/vec/into_iter.v @@ -263,7 +263,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let remaining := + let~ remaining := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -274,7 +274,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -283,7 +283,7 @@ Module vec. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -310,7 +310,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -336,7 +336,7 @@ Module vec. ] |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -362,7 +362,7 @@ Module vec. ] |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -398,7 +398,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -458,7 +458,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let this := + let~ this := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -471,7 +471,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -501,7 +501,7 @@ Module vec. ] |) |) in - let initialized := + let~ initialized := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -624,7 +624,7 @@ Module vec. ] |) |) in - let cap := + let~ cap := M.copy (| M.SubPointer.get_struct_record_field (| M.call_closure (| @@ -643,7 +643,7 @@ Module vec. "cap" |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -826,7 +826,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -863,7 +863,7 @@ Module vec. |))); fun γ => ltac:(M.monadic - (let old := + (let~ old := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -871,7 +871,7 @@ Module vec. "ptr" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -931,7 +931,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let exact := + let~ exact := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1048,7 +1048,7 @@ Module vec. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let step_size := + let~ step_size := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), @@ -1069,7 +1069,7 @@ Module vec. ] |) |) in - let to_drop := + let~ to_drop := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), @@ -1086,7 +1086,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1096,7 +1096,7 @@ Module vec. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1124,7 +1124,7 @@ Module vec. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1152,8 +1152,8 @@ Module vec. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1189,8 +1189,7 @@ Module vec. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| step_size |) |) - ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| step_size |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -1272,7 +1271,7 @@ Module vec. ltac:(M.monadic (M.never_to_any (| M.read (| - let raw_ary := + let~ raw_ary := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1283,7 +1282,7 @@ Module vec. [] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1298,7 +1297,7 @@ Module vec. [ self ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1315,7 +1314,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1340,7 +1339,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1385,7 +1384,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1452,7 +1451,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1475,7 +1474,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1510,7 +1509,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1555,7 +1554,7 @@ Module vec. |) in M.return_ (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -1588,7 +1587,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1808,7 +1807,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1845,7 +1844,7 @@ Module vec. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1922,7 +1921,7 @@ Module vec. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let step_size := + let~ step_size := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), @@ -1943,7 +1942,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1953,7 +1952,7 @@ Module vec. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1981,7 +1980,7 @@ Module vec. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2009,7 +2008,7 @@ Module vec. M.alloc (| Value.Tuple [] |))) ] |) in - let to_drop := + let~ to_drop := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), @@ -2026,8 +2025,8 @@ Module vec. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2063,8 +2062,7 @@ Module vec. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| step_size |) |) - ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| step_size |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -2365,11 +2363,11 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let guard := + let~ guard := M.alloc (| Value.StructTuple "alloc::vec::into_iter::drop::DropGuard" [ M.read (| self |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/alloc/vec/is_zero.v b/CoqOfRust/alloc/vec/is_zero.v index d81acf439..90852779c 100644 --- a/CoqOfRust/alloc/vec/is_zero.v +++ b/CoqOfRust/alloc/vec/is_zero.v @@ -2381,7 +2381,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2422,7 +2422,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2463,7 +2463,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2504,7 +2504,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2545,7 +2545,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2586,7 +2586,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2627,7 +2627,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2668,7 +2668,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2709,7 +2709,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2750,7 +2750,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2791,7 +2791,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2832,7 +2832,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in + let~ _ := M.get_constant (| "alloc::vec::is_zero::is_zero_discriminant" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2947,7 +2947,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let raw := + let~ raw := M.alloc (| M.call_closure (| M.get_function (| @@ -2992,7 +2992,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let raw := + let~ raw := M.alloc (| M.call_closure (| M.get_function (| @@ -3046,7 +3046,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let raw := + let~ raw := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/alloc/vec/mod.v b/CoqOfRust/alloc/vec/mod.v index 7012ebe2b..0f192f833 100644 --- a/CoqOfRust/alloc/vec/mod.v +++ b/CoqOfRust/alloc/vec/mod.v @@ -211,7 +211,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -317,7 +317,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -330,7 +330,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -354,7 +354,7 @@ Module vec. ] |) |) in - let capacity := + let~ capacity := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -378,7 +378,7 @@ Module vec. ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -402,7 +402,7 @@ Module vec. ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ A ] |), @@ -483,7 +483,7 @@ Module vec. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -530,7 +530,7 @@ Module vec. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -689,7 +689,7 @@ Module vec. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -760,7 +760,7 @@ Module vec. (M.read (| min_capacity |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -820,7 +820,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -831,7 +831,7 @@ Module vec. [ self ] |) |) in - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -844,7 +844,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_function (| @@ -871,7 +871,7 @@ Module vec. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -962,7 +962,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -989,21 +989,20 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let remaining_len := + let~ remaining_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |), - M.read (| len |) - |) + |)) + (M.read (| len |)) |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), @@ -1030,7 +1029,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1039,7 +1038,7 @@ Module vec. |), M.read (| len |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1222,7 +1221,7 @@ Module vec. (let self := M.alloc (| self |) in let new_len := M.alloc (| new_len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1230,7 +1229,7 @@ Module vec. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1276,7 +1275,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1327,7 +1326,7 @@ Module vec. (let self := M.alloc (| self |) in let index := M.alloc (| index |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1338,7 +1337,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1359,7 +1358,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), @@ -1381,7 +1380,7 @@ Module vec. ] |) |) in - let base_ptr := + let~ base_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1392,7 +1391,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -1403,7 +1402,7 @@ Module vec. M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.read (| base_ptr |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |)); M.call_closure (| @@ -1414,7 +1413,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1424,7 +1423,7 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) |) in @@ -1484,7 +1483,7 @@ Module vec. let index := M.alloc (| index |) in let element := M.alloc (| element |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1495,7 +1494,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1522,7 +1521,7 @@ Module vec. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1537,8 +1536,8 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let p := + let~ _ := + let~ p := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -1555,7 +1554,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1566,7 +1565,7 @@ Module vec. (M.alloc (| BinOp.Pure.lt (M.read (| index |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -1580,11 +1579,7 @@ Module vec. |), [ M.read (| p |); Value.Integer 1 ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| index |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| index |)) ] |) |) in @@ -1625,7 +1620,7 @@ Module vec. |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -1633,7 +1628,7 @@ Module vec. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1643,7 +1638,7 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.add (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) |) in @@ -1695,7 +1690,7 @@ Module vec. (let self := M.alloc (| self |) in let index := M.alloc (| index |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1706,7 +1701,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1727,9 +1722,9 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let ptr := + let~ ret := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -1746,7 +1741,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| ret, M.call_closure (| @@ -1754,7 +1749,7 @@ Module vec. [ (* MutToConstPointer *) M.pointer_coercion (M.read (| ptr |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -1770,16 +1765,15 @@ Module vec. [ M.read (| ptr |); Value.Integer 1 ] |)); M.read (| ptr |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| index |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| index |))) + (Value.Integer 1) ] |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1789,7 +1783,7 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) |) in @@ -1818,7 +1812,7 @@ Module vec. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1968,7 +1962,7 @@ Module vec. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let original_len := + let~ original_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1979,7 +1973,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1990,7 +1984,7 @@ Module vec. [ M.read (| self |); Value.Integer 0 ] |) |) in - let g := + let~ g := M.alloc (| Value.StructRecord "alloc::vec::retain_mut::BackshiftOnDrop" @@ -2001,21 +1995,21 @@ Module vec. ("original_len", M.read (| original_len |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Self, "process_loop.retain_mut", [] |), [ M.read (| original_len |); f; g ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Self, "process_loop.retain_mut", [] |), [ M.read (| original_len |); f; g ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2268,7 +2262,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2279,7 +2273,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2296,8 +2290,8 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let first_duplicate_idx := M.alloc (| Value.Integer 1 |) in - let start := + let~ first_duplicate_idx := M.alloc (| Value.Integer 1 |) in + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2308,7 +2302,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2328,9 +2322,9 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let found_duplicate := + let~ found_duplicate := M.copy (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2351,7 +2345,7 @@ Module vec. ] |) |) in - let current := + let~ current := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2384,7 +2378,7 @@ Module vec. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2402,15 +2396,11 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := first_duplicate_idx in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2418,7 +2408,7 @@ Module vec. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2429,7 +2419,7 @@ Module vec. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2448,23 +2438,22 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let gap := + let~ gap := M.alloc (| Value.StructRecord "alloc::vec::dedup_by::FillGapOnDrop" [ ("read", - BinOp.Panic.add (| - Integer.Usize, - M.read (| first_duplicate_idx |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| first_duplicate_idx |)) + (Value.Integer 1)); ("write", M.read (| first_duplicate_idx |)); ("vec", M.read (| self |)) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::drop_in_place", [ T ] |), @@ -2481,7 +2470,7 @@ Module vec. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2507,7 +2496,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let read_ptr := + let~ read_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2527,7 +2516,7 @@ Module vec. ] |) |) in - let prev_ptr := + let~ prev_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2557,7 +2546,7 @@ Module vec. ] |) |) in - let found_duplicate := + let~ found_duplicate := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2590,7 +2579,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| gap, @@ -2599,13 +2588,12 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::drop_in_place", [ T ] |), @@ -2615,7 +2603,7 @@ Module vec. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let write_ptr := + (let~ write_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2635,7 +2623,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2650,7 +2638,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| gap, @@ -2659,13 +2647,12 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| gap, @@ -2674,11 +2661,10 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -2688,7 +2674,7 @@ Module vec. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2699,7 +2685,7 @@ Module vec. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2725,7 +2711,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2767,7 +2753,7 @@ Module vec. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2800,7 +2786,7 @@ Module vec. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2828,7 +2814,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -2851,24 +2837,21 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), [ M.read (| end_ |); M.read (| value |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -2901,7 +2884,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2949,8 +2932,8 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let end_ := + let~ _ := + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -2973,14 +2956,14 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), [ M.read (| end_ |); M.read (| value |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2989,7 +2972,7 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |) @@ -3044,7 +3027,7 @@ Module vec. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3053,9 +3036,9 @@ Module vec. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -3141,7 +3124,7 @@ Module vec. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3167,7 +3150,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3204,14 +3187,14 @@ Module vec. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let count := + let~ count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| other |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3222,7 +3205,7 @@ Module vec. [ M.read (| self |); M.read (| count |) ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3233,7 +3216,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -3257,17 +3240,14 @@ Module vec. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| count |) |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| count |)) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -3316,7 +3296,7 @@ Module vec. (let self := M.alloc (| self |) in let range := M.alloc (| range |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3354,7 +3334,7 @@ Module vec. |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3365,7 +3345,7 @@ Module vec. [ M.read (| self |); M.read (| start |) ] |) |) in - let range_slice := + let~ range_slice := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts", [ T ] |), @@ -3388,11 +3368,7 @@ Module vec. M.read (| start |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - M.read (| start |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| end_ |)) (M.read (| start |)) ] |) |) in @@ -3402,11 +3378,7 @@ Module vec. [ ("tail_start", M.read (| end_ |)); ("tail_len", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| end_ |) - |)); + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| end_ |))); ("iter", M.call_closure (| M.get_associated_function (| @@ -3468,7 +3440,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let elems := + let~ elems := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3479,7 +3451,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3488,7 +3460,7 @@ Module vec. |), Value.Integer 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3603,7 +3575,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3646,7 +3618,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3713,21 +3685,20 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let other_len := + let~ other_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |), - M.read (| at_ |) - |) + |)) + (M.read (| at_ |)) |) in - let other := + let~ other := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3753,8 +3724,8 @@ Module vec. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3765,7 +3736,7 @@ Module vec. [ M.read (| self |); M.read (| at_ |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3776,7 +3747,7 @@ Module vec. [ other; M.read (| other_len |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -3851,7 +3822,7 @@ Module vec. let new_len := M.alloc (| new_len |) in let f := M.alloc (| f |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3871,7 +3842,7 @@ Module vec. M.use (M.alloc (| BinOp.Pure.gt (M.read (| new_len |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3907,11 +3878,10 @@ Module vec. |), [ M.read (| f |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| new_len |), - M.read (| len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| new_len |)) + (M.read (| len |)) ] |) ] @@ -3920,7 +3890,7 @@ Module vec. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3958,7 +3928,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4071,9 +4041,9 @@ Module vec. |) ] |)); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "capacity", @@ -4086,15 +4056,14 @@ Module vec. "buf" |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |) - |) + |)) ] |))) | _, _ => M.impossible @@ -4180,7 +4149,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4191,7 +4160,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let spare_ptr := + let~ spare_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -4207,7 +4176,7 @@ Module vec. ] |) |) in - let spare_ptr := + let~ spare_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4218,11 +4187,11 @@ Module vec. [ M.read (| spare_ptr |) ] |) |) in - let spare_len := + let~ spare_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::raw_vec::RawVec") [ T; A ], "capacity", @@ -4235,17 +4204,16 @@ Module vec. "buf" |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) - |) - |) + |)) |) in - let initialized := + let~ initialized := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), @@ -4261,7 +4229,7 @@ Module vec. ] |) |) in - let spare := + let~ spare := M.alloc (| M.call_closure (| M.get_function (| @@ -4313,7 +4281,7 @@ Module vec. let new_len := M.alloc (| new_len |) in let value := M.alloc (| value |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4342,18 +4310,14 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| new_len |), - M.read (| len |) - |); + BinOp.Wrap.sub Integer.Usize (M.read (| new_len |)) (M.read (| len |)); M.read (| value |) ] |) |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4433,7 +4397,7 @@ Module vec. (let self := M.alloc (| self |) in let src := M.alloc (| src |) in M.read (| - let range := + let~ range := M.alloc (| M.call_closure (| M.get_function (| "core::slice::index::range", [ R ] |), @@ -4455,7 +4419,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4478,7 +4442,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4537,7 +4501,7 @@ Module vec. let n := M.alloc (| n |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4548,7 +4512,7 @@ Module vec. [ M.read (| self |); M.read (| n |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -4572,7 +4536,7 @@ Module vec. ] |) |) in - let local_len := + let~ local_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4589,7 +4553,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4614,7 +4578,7 @@ Module vec. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4633,7 +4597,9 @@ Module vec. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4644,7 +4610,7 @@ Module vec. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -4663,7 +4629,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| ptr, M.call_closure (| @@ -4675,7 +4641,7 @@ Module vec. [ M.read (| ptr |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4701,14 +4667,14 @@ Module vec. (let γ := M.use (M.alloc (| BinOp.Pure.gt (M.read (| n |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), [ M.read (| ptr |); M.read (| value |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4854,7 +4820,7 @@ Module vec. 0 |) in let element := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4865,7 +4831,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4909,7 +4875,7 @@ Module vec. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4936,7 +4902,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -4963,7 +4929,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4973,11 +4939,7 @@ Module vec. |), [ M.read (| self |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) |) in @@ -4987,7 +4949,7 @@ Module vec. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -5077,7 +5039,7 @@ Module vec. 0 |) in let additional := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5089,7 +5051,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ low; additional ] |), [ @@ -5126,7 +5088,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -5228,7 +5190,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5239,7 +5201,7 @@ Module vec. [ M.read (| self |); M.read (| additional |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5250,7 +5212,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let local_len := + let~ local_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5267,7 +5229,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5291,7 +5253,7 @@ Module vec. ltac:(M.monadic (let element := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5322,7 +5284,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5453,7 +5415,7 @@ Module vec. (let self := M.alloc (| self |) in let filter := M.alloc (| filter |) in M.read (| - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5464,8 +5426,8 @@ Module vec. [ M.read (| self |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5778,7 +5740,7 @@ Module vec. let this := M.copy (| γ0_0 |) in let spare := M.copy (| γ0_1 |) in let len := M.copy (| γ0_2 |) in - let to_clone := + let~ to_clone := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5789,7 +5751,7 @@ Module vec. [ M.read (| this |); M.read (| src |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5956,11 +5918,10 @@ Module vec. let β := M.read (| len |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) |))) ] @@ -6025,7 +5986,7 @@ Module vec. (let self := M.alloc (| self |) in let src := M.alloc (| src |) in M.read (| - let count := + let~ count := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6038,7 +5999,7 @@ Module vec. [ src ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6057,7 +6018,7 @@ Module vec. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let init := M.copy (| γ0_0 |) in let spare := M.copy (| γ0_1 |) in - let source := + let~ source := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6068,7 +6029,7 @@ Module vec. [ M.read (| init |); M.read (| src |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -6103,17 +6064,14 @@ Module vec. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::Vec", "len" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| count |) |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| count |)) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -6241,7 +6199,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", A, [], "clone", [] |), @@ -6296,7 +6254,7 @@ Module vec. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6579,7 +6537,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6592,7 +6550,7 @@ Module vec. [ M.read (| self |) ] |) |) in - let alloc := + let~ alloc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6630,7 +6588,7 @@ Module vec. ] |) |) in - let begin := + let~ begin := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6654,7 +6612,7 @@ Module vec. ] |) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6741,7 +6699,7 @@ Module vec. ] |) |) in - let cap := + let~ cap := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6967,7 +6925,7 @@ Module vec. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6996,7 +6954,7 @@ Module vec. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7087,7 +7045,7 @@ Module vec. (let γ := M.read (| γ |) in let item := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7118,7 +7076,7 @@ Module vec. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7919,7 +7877,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7953,7 +7911,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7964,7 +7922,7 @@ Module vec. [ vec; Value.Integer 0 ] |) |) in - let array := + let~ array := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ Ty.apply (Ty.path "array") [ T ] ] |), diff --git a/CoqOfRust/alloc/vec/set_len_on_drop.v b/CoqOfRust/alloc/vec/set_len_on_drop.v index c53daf1ec..44b89e98d 100644 --- a/CoqOfRust/alloc/vec/set_len_on_drop.v +++ b/CoqOfRust/alloc/vec/set_len_on_drop.v @@ -45,7 +45,7 @@ Module vec. (let self := M.alloc (| self |) in let increment := M.alloc (| increment |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -54,7 +54,7 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| increment |) |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| increment |)) |) in M.alloc (| Value.Tuple [] |) |))) @@ -101,7 +101,7 @@ Module vec. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| M.SubPointer.get_struct_record_field (| diff --git a/CoqOfRust/alloc/vec/spec_extend.v b/CoqOfRust/alloc/vec/spec_extend.v index b8d98221d..ed321ff83 100644 --- a/CoqOfRust/alloc/vec/spec_extend.v +++ b/CoqOfRust/alloc/vec/spec_extend.v @@ -95,8 +95,8 @@ Module vec. (let self := M.alloc (| self |) in let iterator := M.alloc (| iterator |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -125,7 +125,7 @@ Module vec. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -225,7 +225,7 @@ Module vec. (let self := M.alloc (| self |) in let iterator := M.alloc (| iterator |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -236,7 +236,7 @@ Module vec. [ iterator ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/vec/spec_from_elem.v b/CoqOfRust/alloc/vec/spec_from_elem.v index 9957b7d3b..4751a21a4 100644 --- a/CoqOfRust/alloc/vec/spec_from_elem.v +++ b/CoqOfRust/alloc/vec/spec_from_elem.v @@ -25,7 +25,7 @@ Module vec. let n := M.alloc (| n |) in let alloc := M.alloc (| alloc |) in M.read (| - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -36,7 +36,7 @@ Module vec. [ M.read (| n |); M.read (| alloc |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -85,7 +85,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -132,7 +132,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -143,7 +143,7 @@ Module vec. [ M.read (| n |); M.read (| alloc |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -195,7 +195,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -235,7 +235,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -246,8 +246,8 @@ Module vec. [ M.read (| n |); M.read (| alloc |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::write_bytes", [ Ty.path "i8" ] |), @@ -265,7 +265,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -317,7 +317,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -357,7 +357,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -368,8 +368,8 @@ Module vec. [ M.read (| n |); M.read (| alloc |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::write_bytes", [ Ty.path "u8" ] |), @@ -387,7 +387,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -435,7 +435,7 @@ Module vec. let n := M.alloc (| n |) in let alloc := M.alloc (| alloc |) in M.read (| - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -446,8 +446,8 @@ Module vec. [ M.read (| n |); M.read (| alloc |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/alloc/vec/spec_from_iter.v b/CoqOfRust/alloc/vec/spec_from_iter.v index e6a53c67e..b780fa340 100644 --- a/CoqOfRust/alloc/vec/spec_from_iter.v +++ b/CoqOfRust/alloc/vec/spec_from_iter.v @@ -84,7 +84,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let has_advanced := + let~ has_advanced := M.alloc (| BinOp.Pure.ne (M.rust_cast @@ -114,7 +114,7 @@ Module vec. |) |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -139,17 +139,16 @@ Module vec. |), [ iterator ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.read (| + (BinOp.Wrap.div + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| iterator, "alloc::vec::into_iter::IntoIter", "cap" |) - |), - Value.Integer 2 - |)))) + |)) + (Value.Integer 2)))) |) |)) in let _ := @@ -157,7 +156,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let it := + let~ it := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -174,7 +173,7 @@ Module vec. [ M.read (| iterator |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -186,7 +185,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -405,7 +404,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -418,7 +417,7 @@ Module vec. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/alloc/vec/spec_from_iter_nested.v b/CoqOfRust/alloc/vec/spec_from_iter_nested.v index 1b5bc4f6e..6f8bf52eb 100644 --- a/CoqOfRust/alloc/vec/spec_from_iter_nested.v +++ b/CoqOfRust/alloc/vec/spec_from_iter_nested.v @@ -47,7 +47,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let vector := + let~ vector := M.copy (| M.match_operator (| M.alloc (| @@ -65,7 +65,8 @@ Module vec. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -111,7 +112,7 @@ Module vec. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower := M.copy (| γ0_0 |) in - let initial_capacity := + let~ initial_capacity := M.alloc (| M.call_closure (| M.get_function (| @@ -135,7 +136,7 @@ Module vec. ] |) |) in - let vector := + let~ vector := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -148,8 +149,8 @@ Module vec. [ M.read (| initial_capacity |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -168,7 +169,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -188,7 +189,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -244,7 +245,7 @@ Module vec. ltac:(M.monadic (let iterator := M.alloc (| iterator |) in M.read (| - let vector := + let~ vector := M.copy (| M.match_operator (| M.alloc (| @@ -312,7 +313,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/alloc/vec/splice.v b/CoqOfRust/alloc/vec/splice.v index 8719f0df4..23a7df7e9 100644 --- a/CoqOfRust/alloc/vec/splice.v +++ b/CoqOfRust/alloc/vec/splice.v @@ -262,7 +262,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -295,7 +295,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -315,7 +315,7 @@ Module vec. [ (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [] |)) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -343,7 +343,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -404,7 +404,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -470,7 +470,7 @@ Module vec. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower_bound := M.copy (| γ0_0 |) in let _upper_bound := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -486,7 +486,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -553,7 +553,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let collected := + let~ collected := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -628,7 +628,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -659,7 +659,7 @@ Module vec. ] |) |) in - let filled := + let~ filled := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -683,7 +683,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -695,7 +695,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -735,7 +735,7 @@ Module vec. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -747,7 +747,7 @@ Module vec. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -807,7 +807,7 @@ Module vec. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -899,7 +899,7 @@ Module vec. M.catch_return (| ltac:(M.monadic (M.read (| - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -918,7 +918,7 @@ Module vec. ] |) |) in - let range_start := + let~ range_start := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| vec |), @@ -926,7 +926,7 @@ Module vec. "len" |) |) in - let range_end := + let~ range_end := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -934,7 +934,7 @@ Module vec. "tail_start" |) |) in - let range_slice := + let~ range_slice := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts_mut", [ T ] |), @@ -957,15 +957,14 @@ Module vec. M.read (| range_start |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| range_end |), - M.read (| range_start |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| range_end |)) + (M.read (| range_start |)) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -986,7 +985,7 @@ Module vec. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1003,7 +1002,12 @@ Module vec. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1040,7 +1044,7 @@ Module vec. 0 |) in let new_item := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1053,7 +1057,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| vec |), @@ -1062,11 +1066,10 @@ Module vec. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1119,7 +1122,7 @@ Module vec. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1138,27 +1141,26 @@ Module vec. ] |) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::drain::Drain", "tail_start" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::drain::Drain", "tail_len" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1177,22 +1179,21 @@ Module vec. ] |) |) in - let new_tail_start := + let~ new_tail_start := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "alloc::vec::drain::Drain", "tail_start" |) - |), - M.read (| additional |) - |) + |)) + (M.read (| additional |)) |) in - let _ := - let src := + let~ _ := + let~ src := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "add", [] |), @@ -1215,7 +1216,7 @@ Module vec. ] |) |) in - let dst := + let~ dst := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -1232,7 +1233,7 @@ Module vec. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -1250,7 +1251,7 @@ Module vec. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/blacklist.txt b/CoqOfRust/blacklist.txt index c09060fd6..24da70bb3 100644 --- a/CoqOfRust/blacklist.txt +++ b/CoqOfRust/blacklist.txt @@ -1,4 +1,7 @@ +core/proofs/option.v examples/default/examples/ink_contracts/proofs/erc20.v +examples/default/examples/ink_contracts/simulations/erc20.v +examples/default/examples/ink_contracts/simulations/erc721.v # This file works but is taking a very long time (ten minutes) revm/opcode.v examples/default/examples/ink_contracts/proofs/erc721.v diff --git a/CoqOfRust/core/alloc/global.v b/CoqOfRust/core/alloc/global.v index 966f67e7e..8261aa592 100644 --- a/CoqOfRust/core/alloc/global.v +++ b/CoqOfRust/core/alloc/global.v @@ -12,7 +12,7 @@ Module alloc. (let self := M.alloc (| self |) in let layout := M.alloc (| layout |) in M.read (| - let size := + let~ size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -23,7 +23,7 @@ Module alloc. [ layout ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36,7 +36,7 @@ Module alloc. [ M.read (| self |); M.read (| layout |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -57,7 +57,7 @@ Module alloc. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -87,7 +87,7 @@ Module alloc. let layout := M.alloc (| layout |) in let new_size := M.alloc (| new_size |) in M.read (| - let new_layout := + let~ new_layout := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -108,7 +108,7 @@ Module alloc. ] |) |) in - let new_ptr := + let~ new_ptr := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -121,7 +121,7 @@ Module alloc. [ M.read (| self |); M.read (| new_layout |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -142,7 +142,7 @@ Module alloc. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -169,7 +169,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/alloc/layout.v b/CoqOfRust/core/alloc/layout.v index 57b887f2b..974a1ae56 100644 --- a/CoqOfRust/core/alloc/layout.v +++ b/CoqOfRust/core/alloc/layout.v @@ -251,7 +251,7 @@ Module alloc. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -324,7 +324,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -411,22 +411,20 @@ Module alloc. | [], [ align ] => ltac:(M.monadic (let align := M.alloc (| align |) in - BinOp.Panic.sub (| - Integer.Usize, - M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)), - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |))) + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::ptr::alignment::Alignment", "as_usize", [] |), [ M.read (| align |) ] - |), - Value.Integer 1 - |) - |))) + |)) + (Value.Integer 1)))) | _, _ => M.impossible end. @@ -452,7 +450,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -857,7 +855,7 @@ Module alloc. (let self := M.alloc (| self |) in let align := M.alloc (| align |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -868,7 +866,7 @@ Module alloc. [ M.read (| self |) ] |) |) in - let len_rounded_up := + let~ len_rounded_up := M.alloc (| BinOp.Pure.bit_and (M.call_closure (| @@ -919,7 +917,7 @@ Module alloc. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pad := + let~ pad := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -940,20 +938,19 @@ Module alloc. ] |) |) in - let new_size := + let~ new_size := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ M.read (| self |) ] - |), - M.read (| pad |) - |) + |)) + (M.read (| pad |)) |) in M.alloc (| M.call_closure (| @@ -1005,19 +1002,19 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let padded_size := + let~ padded_size := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "size", [] |), [ M.read (| self |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::alloc::layout::Layout", "padding_needed_for", @@ -1034,10 +1031,9 @@ Module alloc. [ M.read (| self |) ] |) ] - |) - |) + |)) |) in - let alloc_size := + let~ alloc_size := M.copy (| M.match_operator (| M.alloc (| @@ -1130,7 +1126,7 @@ Module alloc. ] |) |) in - let layout := + let~ layout := M.copy (| M.match_operator (| M.alloc (| @@ -1259,7 +1255,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let new_align := + let~ new_align := M.alloc (| M.call_closure (| M.get_function (| @@ -1284,7 +1280,7 @@ Module alloc. ] |) |) in - let pad := + let~ pad := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1305,7 +1301,7 @@ Module alloc. ] |) |) in - let offset := + let~ offset := M.copy (| M.match_operator (| M.alloc (| @@ -1408,7 +1404,7 @@ Module alloc. ] |) |) in - let new_size := + let~ new_size := M.copy (| M.match_operator (| M.alloc (| @@ -1511,7 +1507,7 @@ Module alloc. ] |) |) in - let layout := + let~ layout := M.copy (| M.match_operator (| M.alloc (| @@ -1625,7 +1621,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let size := + let~ size := M.copy (| M.match_operator (| M.alloc (| @@ -1767,7 +1763,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let new_size := + let~ new_size := M.copy (| M.match_operator (| M.alloc (| diff --git a/CoqOfRust/core/alloc/mod.v b/CoqOfRust/core/alloc/mod.v index 57a530e14..29acc59d5 100644 --- a/CoqOfRust/core/alloc/mod.v +++ b/CoqOfRust/core/alloc/mod.v @@ -183,7 +183,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.copy (| M.match_operator (| M.alloc (| @@ -271,7 +271,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -332,7 +332,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -341,7 +341,7 @@ Module alloc. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -410,7 +410,7 @@ Module alloc. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_ptr := + let~ new_ptr := M.copy (| M.match_operator (| M.alloc (| @@ -498,8 +498,8 @@ Module alloc. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -538,7 +538,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -570,7 +570,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -579,7 +579,7 @@ Module alloc. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -648,7 +648,7 @@ Module alloc. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_ptr := + let~ new_ptr := M.copy (| M.match_operator (| M.alloc (| @@ -736,8 +736,8 @@ Module alloc. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -776,7 +776,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -809,7 +809,7 @@ Module alloc. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -818,7 +818,7 @@ Module alloc. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -887,7 +887,7 @@ Module alloc. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_ptr := + let~ new_ptr := M.copy (| M.match_operator (| M.alloc (| @@ -975,8 +975,8 @@ Module alloc. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1015,7 +1015,7 @@ Module alloc. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/any.v b/CoqOfRust/core/any.v index b3d701433..1bc41287d 100644 --- a/CoqOfRust/core/any.v +++ b/CoqOfRust/core/any.v @@ -180,14 +180,14 @@ Module any. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let t := + let~ t := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::any::TypeId", "of", [ T ] |), [] |) |) in - let concrete := + let~ concrete := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -351,7 +351,7 @@ Module any. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -359,7 +359,7 @@ Module any. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -425,7 +425,7 @@ Module any. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -433,7 +433,7 @@ Module any. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -969,7 +969,7 @@ Module any. | [ T ], [] => ltac:(M.monadic (M.read (| - let t := + let~ t := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::type_id", [ T ] |), [] |) |) in @@ -1008,7 +1008,7 @@ Module any. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ H ] |), diff --git a/CoqOfRust/core/array/ascii.v b/CoqOfRust/core/array/ascii.v index 37f18c7dd..e961adbc9 100644 --- a/CoqOfRust/core/array/ascii.v +++ b/CoqOfRust/core/array/ascii.v @@ -79,8 +79,8 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let byte_ptr := M.alloc (| M.read (| self |) |) in - let ascii_ptr := M.alloc (| M.rust_cast (M.read (| byte_ptr |)) |) in + let~ byte_ptr := M.alloc (| M.read (| self |) |) in + let~ ascii_ptr := M.alloc (| M.rust_cast (M.read (| byte_ptr |)) |) in M.alloc (| M.read (| ascii_ptr |) |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/array/drain.v b/CoqOfRust/core/array/drain.v index e4a98f7af..6d696922b 100644 --- a/CoqOfRust/core/array/drain.v +++ b/CoqOfRust/core/array/drain.v @@ -21,7 +21,7 @@ Module array. (let array := M.alloc (| array |) in let func := M.alloc (| func |) in M.read (| - let array := + let~ array := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -34,7 +34,7 @@ Module array. [ M.read (| array |) ] |) |) in - let drain := + let~ drain := M.alloc (| Value.StructTuple "core::array::drain::Drain" @@ -158,7 +158,7 @@ Module array. M.catch_return (| ltac:(M.monadic (M.read (| - let p := + let~ p := M.copy (| M.match_operator (| M.alloc (| @@ -269,7 +269,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -380,7 +380,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let p := + let~ p := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/array/equality.v b/CoqOfRust/core/array/equality.v index 5457cc9ec..7728ab112 100644 --- a/CoqOfRust/core/array/equality.v +++ b/CoqOfRust/core/array/equality.v @@ -86,7 +86,7 @@ Module array. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -155,7 +155,7 @@ Module array. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -237,7 +237,7 @@ Module array. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -306,7 +306,7 @@ Module array. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/array/iter.v b/CoqOfRust/core/array/iter.v index 6620456d8..e4a1ed49a 100644 --- a/CoqOfRust/core/array/iter.v +++ b/CoqOfRust/core/array/iter.v @@ -53,7 +53,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let data := + let~ data := M.alloc (| M.call_closure (| M.get_function (| @@ -151,7 +151,7 @@ Module array. (let buffer := M.alloc (| buffer |) in let initialized := M.alloc (| initialized |) in M.read (| - let alive := + let~ alive := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -206,7 +206,7 @@ Module array. | [], [] => ltac:(M.monadic (M.read (| - let buffer := + let~ buffer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -217,7 +217,7 @@ Module array. [] |) |) in - let initialized := + let~ initialized := M.alloc (| Value.StructRecord "core::ops::range::Range" @@ -257,7 +257,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -328,7 +328,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -502,7 +502,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -549,7 +549,7 @@ Module array. let init := M.alloc (| init |) in let fold := M.alloc (| fold |) in M.read (| - let data := + let~ data := M.alloc (| M.SubPointer.get_struct_record_field (| self, @@ -728,7 +728,7 @@ Module array. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let range_to_drop := + let~ range_to_drop := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -746,23 +746,22 @@ Module array. ] |) |) in - let remaining := + let~ remaining := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "len", [] |), [ range_to_drop ] - |) - |) + |)) |) in - let _ := - let slice := + let~ _ := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -784,7 +783,7 @@ Module array. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1072,7 +1071,7 @@ Module array. let init := M.alloc (| init |) in let rfold := M.alloc (| rfold |) in M.read (| - let data := + let~ data := M.alloc (| M.SubPointer.get_struct_record_field (| self, @@ -1203,7 +1202,7 @@ Module array. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let range_to_drop := + let~ range_to_drop := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1221,23 +1220,22 @@ Module array. ] |) |) in - let remaining := + let~ remaining := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "len", [] |), [ range_to_drop ] - |) - |) + |)) |) in - let _ := - let slice := + let~ _ := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1259,7 +1257,7 @@ Module array. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1529,7 +1527,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let new := + let~ new := M.alloc (| Value.StructRecord "core::array::iter::IntoIter" @@ -1554,7 +1552,7 @@ Module array. |)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1617,7 +1615,7 @@ Module array. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1645,7 +1643,9 @@ Module array. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1660,7 +1660,7 @@ Module array. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let src := M.copy (| γ1_0 |) in let dst := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1685,7 +1685,7 @@ Module array. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| new, @@ -1699,9 +1699,9 @@ Module array. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "end", @@ -1714,9 +1714,8 @@ Module array. "alive" |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in diff --git a/CoqOfRust/core/array/mod.v b/CoqOfRust/core/array/mod.v index 02b91d87d..02e49ea89 100644 --- a/CoqOfRust/core/array/mod.v +++ b/CoqOfRust/core/array/mod.v @@ -70,7 +70,7 @@ Module array. ltac:(M.monadic (let cb := M.alloc (| cb |) in M.read (| - let array := + let~ array := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -641,7 +641,7 @@ Module array. (M.read (| M.get_constant (| "core::array::N" |) |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -725,7 +725,7 @@ Module array. (M.read (| M.get_constant (| "core::array::N" |) |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1413,7 +1413,7 @@ Module array. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4889,7 +4889,7 @@ Module array. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5030,13 +5030,13 @@ Module array. M.catch_return (| ltac:(M.monadic (M.read (| - let guard := + let~ guard := M.alloc (| Value.StructRecord "core::array::Guard" [ ("array_mut", M.read (| buffer |)); ("initialized", Value.Integer 0) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5080,7 +5080,7 @@ Module array. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let item := + let~ item := M.copy (| M.match_operator (| M.alloc (| @@ -5183,7 +5183,7 @@ Module array. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5200,7 +5200,7 @@ Module array. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -5209,7 +5209,7 @@ Module array. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5272,7 +5272,7 @@ Module array. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5310,7 +5310,7 @@ Module array. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5363,7 +5363,7 @@ Module array. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5371,7 +5371,7 @@ Module array. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5437,7 +5437,7 @@ Module array. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5525,7 +5525,7 @@ Module array. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let array := + let~ array := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5536,7 +5536,7 @@ Module array. [] |) |) in - let r := + let~ r := M.alloc (| M.call_closure (| M.get_function (| @@ -5629,13 +5629,13 @@ Module array. (let buffer := M.alloc (| buffer |) in let iter := M.alloc (| iter |) in M.read (| - let guard := + let~ guard := M.alloc (| Value.StructRecord "core::array::Guard" [ ("array_mut", M.read (| buffer |)); ("initialized", Value.Integer 0) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5702,7 +5702,7 @@ Module array. 0 |) in let item := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5721,7 +5721,7 @@ Module array. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -5730,7 +5730,7 @@ Module array. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/ascii.v b/CoqOfRust/core/ascii.v index 99b322854..9fb5fa803 100644 --- a/CoqOfRust/core/ascii.v +++ b/CoqOfRust/core/ascii.v @@ -62,11 +62,11 @@ Module ascii. ltac:(M.monadic (let c := M.alloc (| c |) in M.read (| - let data := + let~ data := M.alloc (| repeat (Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" []) 4 |) in - let range := + let~ range := M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_ascii_into", [] |), @@ -134,7 +134,7 @@ Module ascii. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/core/ascii/ascii_char.v b/CoqOfRust/core/ascii/ascii_char.v index 88d13fdd7..8585b1b12 100644 --- a/CoqOfRust/core/ascii/ascii_char.v +++ b/CoqOfRust/core/ascii/ascii_char.v @@ -740,7 +740,7 @@ Module ascii. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -750,7 +750,7 @@ Module ascii. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -784,7 +784,7 @@ Module ascii. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -794,7 +794,7 @@ Module ascii. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -833,7 +833,7 @@ Module ascii. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -843,7 +843,7 @@ Module ascii. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -888,7 +888,7 @@ Module ascii. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1060,7 +1060,7 @@ Module ascii. ltac:(M.monadic (let d := M.alloc (| d |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1069,7 +1069,7 @@ Module ascii. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1101,7 +1101,7 @@ Module ascii. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let byte := + let~ byte := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u8", "unchecked_add", [] |), @@ -1208,8 +1208,8 @@ Module ascii. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ascii_ptr := M.alloc (| M.read (| self |) |) in - let str_ptr := M.alloc (| M.rust_cast (M.read (| ascii_ptr |)) |) in + let~ ascii_ptr := M.alloc (| M.read (| self |) |) in + let~ str_ptr := M.alloc (| M.rust_cast (M.read (| ascii_ptr |)) |) in M.alloc (| M.read (| str_ptr |) |) |))) | _, _ => M.impossible @@ -1339,6 +1339,11 @@ Module ascii. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ascii::ascii_char::AsciiChar::Null" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), @@ -1349,6 +1354,11 @@ Module ascii. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ascii::ascii_char::AsciiChar::CharacterTabulation" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), @@ -1359,6 +1369,11 @@ Module ascii. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ascii::ascii_char::AsciiChar::CarriageReturn" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), @@ -1369,6 +1384,11 @@ Module ascii. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ascii::ascii_char::AsciiChar::LineFeed" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), @@ -1379,6 +1399,11 @@ Module ascii. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ascii::ascii_char::AsciiChar::ReverseSolidus" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), @@ -1392,6 +1417,11 @@ Module ascii. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ascii::ascii_char::AsciiChar::Apostrophe" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| Self, "backslash.fmt", [] |), @@ -1404,7 +1434,7 @@ Module ascii. |))); fun γ => ltac:(M.monadic - (let byte := + (let~ byte := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1459,7 +1489,7 @@ Module ascii. |))); fun γ => ltac:(M.monadic - (let hi := + (let~ hi := M.copy (| M.SubPointer.get_array_field (| M.get_constant (| @@ -1474,17 +1504,13 @@ Module ascii. "from", [] |), - [ - BinOp.Panic.shr (| - M.read (| byte |), - Value.Integer 4 - |) + [ BinOp.Wrap.shr (M.read (| byte |)) (Value.Integer 4) ] |) |) |) |) in - let lo := + let~ lo := M.copy (| M.SubPointer.get_array_field (| M.get_constant (| @@ -1536,7 +1562,7 @@ Module ascii. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let buf := M.copy (| γ0_0 |) in let len := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1612,7 +1638,7 @@ Module ascii. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1661,7 +1687,7 @@ Module ascii. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1681,7 +1707,12 @@ Module ascii. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1693,7 +1724,7 @@ Module ascii. 0 |) in let byte := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| diff --git a/CoqOfRust/core/asserting.v b/CoqOfRust/core/asserting.v index 7d14cbfd5..d12f25f4a 100644 --- a/CoqOfRust/core/asserting.v +++ b/CoqOfRust/core/asserting.v @@ -101,7 +101,7 @@ Module asserting. (let self := M.alloc (| self |) in let to := M.alloc (| to |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| to |), @@ -168,7 +168,8 @@ Module asserting. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", diff --git a/CoqOfRust/core/cell.v b/CoqOfRust/core/cell.v index 740053c39..77f47127f 100644 --- a/CoqOfRust/core/cell.v +++ b/CoqOfRust/core/cell.v @@ -512,7 +512,7 @@ Module cell. (let self := M.alloc (| self |) in let val := M.alloc (| val |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -560,7 +560,7 @@ Module cell. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -585,7 +585,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -637,7 +637,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", [ T ] |), @@ -806,7 +806,7 @@ Module cell. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let old := + let~ old := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -817,7 +817,7 @@ Module cell. [ M.read (| self |) ] |) |) in - let new := + let~ new := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -830,7 +830,7 @@ Module cell. [ M.read (| f |); Value.Tuple [ M.read (| old |) ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1080,7 +1080,7 @@ Module cell. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1169,7 +1169,7 @@ Module cell. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1496,7 +1496,7 @@ Module cell. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let mut_borrow := + let~ mut_borrow := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1520,7 +1520,7 @@ Module cell. ] |) |) in - let replacement := + let~ replacement := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1724,7 +1724,7 @@ Module cell. 0 |) in let b := M.copy (| γ0_0 |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1761,7 +1761,8 @@ Module cell. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ Value.StructTuple "core::cell::BorrowError" [] ] @@ -1884,7 +1885,7 @@ Module cell. 0 |) in let b := M.copy (| γ0_0 |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1925,7 +1926,8 @@ Module cell. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ Value.StructTuple "core::cell::BorrowMutError" [] ] @@ -2017,7 +2019,7 @@ Module cell. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -2930,7 +2932,7 @@ Module cell. ltac:(M.monadic (let borrow := M.alloc (| borrow |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_add", [] |), @@ -2965,7 +2967,7 @@ Module cell. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3010,7 +3012,7 @@ Module cell. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let borrow := + let~ borrow := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3029,7 +3031,7 @@ Module cell. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3037,7 +3039,7 @@ Module cell. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3076,7 +3078,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3092,7 +3094,7 @@ Module cell. "borrow" |) |); - BinOp.Panic.sub (| Integer.Isize, M.read (| borrow |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Isize (M.read (| borrow |)) (Value.Integer 1) ] |) |) in @@ -3131,7 +3133,7 @@ Module cell. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let borrow := + let~ borrow := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3150,7 +3152,7 @@ Module cell. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3158,7 +3160,7 @@ Module cell. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3197,7 +3199,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3227,7 +3229,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3243,7 +3245,7 @@ Module cell. "borrow" |) |); - BinOp.Panic.add (| Integer.Isize, M.read (| borrow |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Isize (M.read (| borrow |)) (Value.Integer 1) ] |) |) in @@ -3532,7 +3534,8 @@ Module cell. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| orig |) ] |))) ] @@ -3601,7 +3604,7 @@ Module cell. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - let borrow := + let~ borrow := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3692,7 +3695,7 @@ Module cell. ltac:(M.monadic (let orig := M.alloc (| orig |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::forget", [ Ty.path "core::cell::BorrowRef" ] |), @@ -3797,7 +3800,7 @@ Module cell. (let orig := M.alloc (| orig |) in let f := M.alloc (| f |) in M.read (| - let value := + let~ value := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3953,7 +3956,8 @@ Module cell. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| orig |) ] |))) ] @@ -3990,7 +3994,7 @@ Module cell. (let orig := M.alloc (| orig |) in let f := M.alloc (| f |) in M.read (| - let borrow := + let~ borrow := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::cell::BorrowRefMut", "clone", [] |), @@ -4108,7 +4112,7 @@ Module cell. ltac:(M.monadic (let orig := M.alloc (| orig |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::forget", [ Ty.path "core::cell::BorrowRefMut" ] |), @@ -4169,7 +4173,7 @@ Module cell. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let borrow := + let~ borrow := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4188,7 +4192,7 @@ Module cell. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4196,7 +4200,7 @@ Module cell. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4235,7 +4239,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4251,7 +4255,7 @@ Module cell. "borrow" |) |); - BinOp.Panic.add (| Integer.Isize, M.read (| borrow |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Isize (M.read (| borrow |)) (Value.Integer 1) ] |) |) in @@ -4307,7 +4311,7 @@ Module cell. fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4317,11 +4321,10 @@ Module cell. |), [ M.read (| borrow |); - BinOp.Panic.sub (| - Integer.Isize, - M.read (| M.get_constant (| "core::cell::UNUSED" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Isize + (M.read (| M.get_constant (| "core::cell::UNUSED" |) |)) + (Value.Integer 1) ] |) |) in @@ -4360,7 +4363,7 @@ Module cell. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let borrow := + let~ borrow := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4379,7 +4382,7 @@ Module cell. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4387,7 +4390,7 @@ Module cell. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4426,7 +4429,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4456,7 +4459,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4472,7 +4475,7 @@ Module cell. "borrow" |) |); - BinOp.Panic.sub (| Integer.Isize, M.read (| borrow |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Isize (M.read (| borrow |)) (Value.Integer 1) ] |) |) in diff --git a/CoqOfRust/core/cell/lazy.v b/CoqOfRust/core/cell/lazy.v index 801e97661..83901e606 100644 --- a/CoqOfRust/core/cell/lazy.v +++ b/CoqOfRust/core/cell/lazy.v @@ -142,7 +142,8 @@ Module cell. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cell::lazy::State::Poisoned" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -204,7 +205,7 @@ Module cell. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let state := + let~ state := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -259,6 +260,7 @@ Module cell. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::cell::lazy::State::Poisoned" |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -334,7 +336,7 @@ Module cell. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let state := + let~ state := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -373,7 +375,7 @@ Module cell. 0 |) in let f := M.copy (| γ0_0 |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -386,7 +388,7 @@ Module cell. [ M.read (| f |); Value.Tuple [] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -419,7 +421,7 @@ Module cell. ] |) |) in - let state := + let~ state := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -483,7 +485,7 @@ Module cell. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let state := + let~ state := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -633,7 +635,7 @@ Module cell. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let d := + let~ d := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -644,7 +646,7 @@ Module cell. [ M.read (| f |); M.read (| Value.String "LazyCell" |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -678,7 +680,8 @@ Module cell. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::builders::DebugTuple", diff --git a/CoqOfRust/core/cell/once.v b/CoqOfRust/core/cell/once.v index f46b6168a..502e8a1ae 100644 --- a/CoqOfRust/core/cell/once.v +++ b/CoqOfRust/core/cell/once.v @@ -225,7 +225,7 @@ Module cell. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -263,7 +263,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let slot := + let~ slot := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -425,7 +425,7 @@ Module cell. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -463,7 +463,7 @@ Module cell. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let val := + let~ val := M.copy (| M.match_operator (| M.alloc (| @@ -723,7 +723,7 @@ Module cell. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let d := + let~ d := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -734,7 +734,7 @@ Module cell. [ M.read (| f |); M.read (| Value.String "OnceCell" |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -768,7 +768,8 @@ Module cell. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::builders::DebugTuple", @@ -845,7 +846,7 @@ Module cell. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let res := + let~ res := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -856,7 +857,7 @@ Module cell. [] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/char/convert.v b/CoqOfRust/core/char/convert.v index de06244d1..d94c21d3f 100644 --- a/CoqOfRust/core/char/convert.v +++ b/CoqOfRust/core/char/convert.v @@ -623,10 +623,20 @@ Module char. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::char::convert::CharErrorKind::EmptyString" + |) in M.alloc (| M.read (| Value.String "EmptyString" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::char::convert::CharErrorKind::TooManyChars" + |) in M.alloc (| M.read (| Value.String "TooManyChars" |) |))) ] |) @@ -666,7 +676,7 @@ Module char. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -676,7 +686,7 @@ Module char. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -758,12 +768,22 @@ Module char. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::char::convert::CharErrorKind::EmptyString" + |) in + M.alloc (| M.read (| Value.String "cannot parse char from empty string" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "too many characters in string" |) |))) + (let _ := + M.is_struct_tuple (| + γ, + "core::char::convert::CharErrorKind::TooManyChars" + |) in + M.alloc (| M.read (| Value.String "too many characters in string" |) |))) ] |) |))) @@ -842,7 +862,7 @@ Module char. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let chars := + let~ chars := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "chars", [] |), @@ -880,6 +900,7 @@ Module char. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::result::Result::Err" @@ -905,6 +926,7 @@ Module char. 0 |) in let c := M.copy (| γ1_0 |) in + let _ := M.is_struct_tuple (| γ0_1, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| c |) ] |))); @@ -984,11 +1006,10 @@ Module char. Value.Integer 2048 ] |)) - (BinOp.Panic.sub (| - Integer.U32, - Value.Integer 1114112, - Value.Integer 2048 - |)) + (BinOp.Wrap.sub + Integer.U32 + (Value.Integer 1114112) + (Value.Integer 2048)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -1284,7 +1305,7 @@ Module char. (let num := M.alloc (| num |) in let radix := M.alloc (| radix |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1334,7 +1355,7 @@ Module char. (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| num |)) (M.read (| radix |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let num := M.alloc (| M.rust_cast (M.read (| num |)) |) in + let~ num := M.alloc (| M.rust_cast (M.read (| num |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1352,11 +1373,10 @@ Module char. "core::option::Option::Some" [ M.rust_cast - (BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| num |) - |)) + (BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.read (| num |))) ] |))); fun γ => @@ -1366,15 +1386,13 @@ Module char. "core::option::Option::Some" [ M.rust_cast - (BinOp.Panic.sub (| - Integer.U8, - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| num |) - |), - Value.Integer 10 - |)) + (BinOp.Wrap.sub + Integer.U8 + (BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.read (| num |))) + (Value.Integer 10)) ] |))) ] diff --git a/CoqOfRust/core/char/decode.v b/CoqOfRust/core/char/decode.v index 7b8167189..a625f6c2c 100644 --- a/CoqOfRust/core/char/decode.v +++ b/CoqOfRust/core/char/decode.v @@ -371,7 +371,7 @@ Module char. M.catch_return (| ltac:(M.monadic (M.read (| - let u := + let~ u := M.copy (| M.match_operator (| M.alloc (| @@ -403,7 +403,8 @@ Module char. buf)); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -560,7 +561,7 @@ Module char. |))); fun γ => ltac:(M.monadic - (let u2 := + (let~ u2 := M.copy (| M.match_operator (| M.alloc (| @@ -594,7 +595,12 @@ Module char. u2)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -616,7 +622,7 @@ Module char. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -643,7 +649,7 @@ Module char. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -673,24 +679,22 @@ Module char. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let c := + let~ c := M.alloc (| - BinOp.Panic.add (| - Integer.U32, - BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast + BinOp.Wrap.add + Integer.U32 + (BinOp.Pure.bit_or + (BinOp.Wrap.shl + (M.rust_cast (BinOp.Pure.bit_and (M.read (| u |)) - (Value.Integer 1023)), - Value.Integer 10 - |)) + (Value.Integer 1023))) + (Value.Integer 10)) (M.rust_cast (BinOp.Pure.bit_and (M.read (| u2 |)) - (Value.Integer 1023))), - Value.Integer 65536 - |) + (Value.Integer 1023)))) + (Value.Integer 65536) |) in M.alloc (| Value.StructTuple @@ -795,7 +799,8 @@ Module char. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer 0 ] |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer 0 ] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -883,22 +888,21 @@ Module char. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let low_buf := M.copy (| γ0_0 |) in let high_buf := M.copy (| γ0_1 |) in - let low := + let~ low := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "div_ceil", [] |), [ M.read (| low |); Value.Integer 2 ] - |), - M.read (| low_buf |) - |) + |)) + (M.read (| low_buf |)) |) in - let high := + let~ high := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/core/char/methods.v b/CoqOfRust/core/char/methods.v index 73c058c78..72b312dbb 100644 --- a/CoqOfRust/core/char/methods.v +++ b/CoqOfRust/core/char/methods.v @@ -171,14 +171,14 @@ Module char. M.catch_return (| ltac:(M.monadic (M.read (| - let digit := + let~ digit := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_sub", [] |), [ M.rust_cast (M.read (| self |)); M.rust_cast (Value.UnicodeChar 48) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -191,7 +191,7 @@ Module char. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -242,7 +242,7 @@ Module char. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -272,7 +272,7 @@ Module char. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| digit, M.call_closure (| @@ -818,7 +818,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let ch := M.alloc (| M.rust_cast (M.read (| self |)) |) in + let~ ch := M.alloc (| M.rust_cast (M.read (| self |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1477,7 +1477,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1504,7 +1504,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2123,14 +2123,14 @@ Module char. (let code := M.alloc (| code |) in let dst := M.alloc (| dst |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_function (| "core::char::methods::len_utf8", [] |), [ M.read (| code |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -2159,7 +2159,7 @@ Module char. let γ2_0 := M.SubPointer.get_slice_index (| γ0_1, 0 |) in let γ2_rest := M.SubPointer.get_slice_rest (| γ0_1, 1, 0 |) in let a := M.alloc (| γ2_0 |) in - let _ := M.write (| M.read (| a |), M.rust_cast (M.read (| code |)) |) in + let~ _ := M.write (| M.read (| a |), M.rust_cast (M.read (| code |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -2173,17 +2173,17 @@ Module char. let γ2_rest := M.SubPointer.get_slice_rest (| γ0_1, 2, 0 |) in let a := M.alloc (| γ2_0 |) in let b := M.alloc (| γ2_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), BinOp.Pure.bit_or (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| code |), Value.Integer 6 |)) + (BinOp.Wrap.shr (M.read (| code |)) (Value.Integer 6)) (Value.Integer 31))) (M.read (| M.get_constant (| "core::char::TAG_TWO_B" |) |)) |) in - let _ := + let~ _ := M.write (| M.read (| b |), BinOp.Pure.bit_or @@ -2206,27 +2206,27 @@ Module char. let a := M.alloc (| γ2_0 |) in let b := M.alloc (| γ2_1 |) in let c := M.alloc (| γ2_2 |) in - let _ := + let~ _ := M.write (| M.read (| a |), BinOp.Pure.bit_or (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| code |), Value.Integer 12 |)) + (BinOp.Wrap.shr (M.read (| code |)) (Value.Integer 12)) (Value.Integer 15))) (M.read (| M.get_constant (| "core::char::TAG_THREE_B" |) |)) |) in - let _ := + let~ _ := M.write (| M.read (| b |), BinOp.Pure.bit_or (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| code |), Value.Integer 6 |)) + (BinOp.Wrap.shr (M.read (| code |)) (Value.Integer 6)) (Value.Integer 63))) (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) |) in - let _ := + let~ _ := M.write (| M.read (| c |), BinOp.Pure.bit_or @@ -2251,37 +2251,37 @@ Module char. let b := M.alloc (| γ2_1 |) in let c := M.alloc (| γ2_2 |) in let d := M.alloc (| γ2_3 |) in - let _ := + let~ _ := M.write (| M.read (| a |), BinOp.Pure.bit_or (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| code |), Value.Integer 18 |)) + (BinOp.Wrap.shr (M.read (| code |)) (Value.Integer 18)) (Value.Integer 7))) (M.read (| M.get_constant (| "core::char::TAG_FOUR_B" |) |)) |) in - let _ := + let~ _ := M.write (| M.read (| b |), BinOp.Pure.bit_or (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| code |), Value.Integer 12 |)) + (BinOp.Wrap.shr (M.read (| code |)) (Value.Integer 12)) (Value.Integer 63))) (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) |) in - let _ := + let~ _ := M.write (| M.read (| c |), BinOp.Pure.bit_or (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| code |), Value.Integer 6 |)) + (BinOp.Wrap.shr (M.read (| code |)) (Value.Integer 6)) (Value.Integer 63))) (M.read (| M.get_constant (| "core::char::TAG_CONT" |) |)) |) in - let _ := + let~ _ := M.write (| M.read (| d |), BinOp.Pure.bit_or @@ -2445,7 +2445,7 @@ Module char. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.read (| - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -2503,17 +2503,16 @@ Module char. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.read (| - let _ := + let~ _ := let β := code in M.write (| β, - BinOp.Panic.sub (| - Integer.U32, - M.read (| β |), - Value.Integer 65536 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| β |)) + (Value.Integer 65536) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -2526,9 +2525,9 @@ Module char. BinOp.Pure.bit_or (Value.Integer 55296) (M.rust_cast - (BinOp.Panic.shr (| M.read (| code |), Value.Integer 10 |))) + (BinOp.Wrap.shr (M.read (| code |)) (Value.Integer 10))) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/core/char/mod.v b/CoqOfRust/core/char/mod.v index c8839301e..5d8c76296 100644 --- a/CoqOfRust/core/char/mod.v +++ b/CoqOfRust/core/char/mod.v @@ -210,11 +210,11 @@ Module char. ltac:(M.monadic (let chr := M.alloc (| chr |) in M.read (| - let data := + let~ data := M.alloc (| repeat (Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" []) 10 |) in - let range := + let~ range := M.alloc (| M.call_closure (| M.get_function (| "core::escape::escape_unicode_into", [] |), @@ -299,7 +299,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -617,7 +617,7 @@ Module char. ltac:(M.monadic (let chr := M.alloc (| chr |) in M.read (| - let data := M.alloc (| Value.Array [ M.read (| chr |) ] |) in + let~ data := M.alloc (| Value.Array [ M.read (| chr |) ] |) in M.alloc (| Value.StructTuple "core::char::EscapeDefault" @@ -650,7 +650,7 @@ Module char. ltac:(M.monadic (let chr := M.alloc (| chr |) in M.read (| - let data := + let~ data := M.alloc (| Value.Array [ @@ -758,7 +758,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1270,7 +1270,7 @@ Module char. ltac:(M.monadic (let chr := M.alloc (| chr |) in M.read (| - let data := + let~ data := M.alloc (| Value.Array [ @@ -1278,7 +1278,7 @@ Module char. M.read (| chr |) ] |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1338,7 +1338,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let bytes := + let~ bytes := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1349,7 +1349,7 @@ Module char. [ Value.Array [] ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), @@ -1440,7 +1440,7 @@ Module char. 0 |) in let chr := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1472,7 +1472,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2302,6 +2302,7 @@ Module char. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Zero" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2471,6 +2472,7 @@ Module char. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Zero" |) in M.alloc (| Value.StructTuple "core::char::CaseMappingIter::Zero" [] |))) ] |) @@ -2662,7 +2664,7 @@ Module char. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in let c := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple @@ -2688,7 +2690,7 @@ Module char. |) in let b := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple "core::char::CaseMappingIter::One" [ M.read (| c |) ] @@ -2705,7 +2707,7 @@ Module char. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple "core::char::CaseMappingIter::Zero" [] @@ -2714,7 +2716,9 @@ Module char. Value.StructTuple "core::option::Option::Some" [ M.read (| c |) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Zero" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -2738,7 +2742,7 @@ Module char. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let size := + let~ size := M.copy (| M.match_operator (| self, @@ -2746,10 +2750,12 @@ Module char. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Three" |) in M.alloc (| Value.Integer 3 |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Two" |) in M.alloc (| Value.Integer 2 |))); fun γ => ltac:(M.monadic @@ -2764,6 +2770,7 @@ Module char. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Zero" |) in M.alloc (| Value.Integer 0 |))) ] |) @@ -2846,7 +2853,7 @@ Module char. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in let c := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple @@ -2872,7 +2879,7 @@ Module char. |) in let b := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple "core::char::CaseMappingIter::One" [ M.read (| b |) ] @@ -2889,7 +2896,7 @@ Module char. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple "core::char::CaseMappingIter::Zero" [] @@ -2898,7 +2905,9 @@ Module char. Value.StructTuple "core::option::Option::Some" [ M.read (| c |) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Zero" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -2968,7 +2977,7 @@ Module char. let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in let c := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3044,7 +3053,7 @@ Module char. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3148,7 +3157,7 @@ Module char. |) in let b := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3259,7 +3268,8 @@ Module char. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::char::CaseMappingIter::Zero" |) in + M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |))) ] diff --git a/CoqOfRust/core/cmp.v b/CoqOfRust/core/cmp.v index adb52c1b7..098fb4021 100644 --- a/CoqOfRust/core/cmp.v +++ b/CoqOfRust/core/cmp.v @@ -124,7 +124,7 @@ Module cmp. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -134,7 +134,7 @@ Module cmp. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -201,7 +201,7 @@ Module cmp. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -211,7 +211,7 @@ Module cmp. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -256,7 +256,7 @@ Module cmp. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -266,7 +266,7 @@ Module cmp. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -315,14 +315,17 @@ Module cmp. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in M.alloc (| M.read (| Value.String "Less" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in M.alloc (| M.read (| Value.String "Equal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in M.alloc (| M.read (| Value.String "Greater" |) |))) ] |) @@ -351,7 +354,7 @@ Module cmp. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -396,7 +399,10 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -421,7 +427,10 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -445,7 +454,10 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -469,7 +481,10 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -494,7 +509,10 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -519,7 +537,10 @@ Module cmp. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -549,12 +570,16 @@ Module cmp. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + M.alloc (| Value.StructTuple "core::cmp::Ordering::Greater" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + M.alloc (| Value.StructTuple "core::cmp::Ordering::Less" [] |))) ] |) |))) @@ -580,7 +605,13 @@ Module cmp. M.read (| M.match_operator (| self, - [ fun γ => ltac:(M.monadic other); fun γ => ltac:(M.monadic self) ] + [ + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + other)); + fun γ => ltac:(M.monadic self) + ] |) |))) | _, _ => M.impossible @@ -608,7 +639,8 @@ Module cmp. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::FnOnce", @@ -1125,7 +1157,7 @@ Module cmp. let min := M.alloc (| min |) in let max := M.alloc (| max |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1246,6 +1278,7 @@ Module cmp. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Less" |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -1289,8 +1322,14 @@ Module cmp. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -1339,6 +1378,7 @@ Module cmp. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Greater" |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -1382,8 +1422,14 @@ Module cmp. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -1460,14 +1506,23 @@ Module cmp. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + Value.Tuple [])) ], M.closure (fun γ => ltac:(M.monadic match γ with | [] => v1 | _ => M.impossible (||) end)) |))); - fun γ => ltac:(M.monadic v2) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + v2)) ] |) |))) @@ -1615,14 +1670,23 @@ Module cmp. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + Value.Tuple [])) ], M.closure (fun γ => ltac:(M.monadic match γ with | [] => v2 | _ => M.impossible (||) end)) |))); - fun γ => ltac:(M.monadic v1) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + v1)) ] |) |))) @@ -2989,11 +3053,10 @@ Module cmp. M.read (| M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.I8, - M.rust_cast (M.read (| M.read (| self |) |)), - M.rust_cast (M.read (| M.read (| other |) |)) - |) + BinOp.Wrap.sub + Integer.I8 + (M.rust_cast (M.read (| M.read (| self |) |))) + (M.rust_cast (M.read (| M.read (| other |) |))) |), [ fun γ => @@ -3071,7 +3134,7 @@ Module cmp. let min := M.alloc (| min |) in let max := M.alloc (| max |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/convert/num.v b/CoqOfRust/core/convert/num.v index 289b19224..070bb6c8c 100644 --- a/CoqOfRust/core/convert/num.v +++ b/CoqOfRust/core/convert/num.v @@ -2944,9 +2944,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3013,9 +3013,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3082,9 +3082,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3151,9 +3151,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3220,9 +3220,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3289,9 +3289,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3358,9 +3358,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3427,9 +3427,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3496,9 +3496,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3565,9 +3565,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5419,9 +5419,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5488,9 +5488,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5557,9 +5557,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5626,9 +5626,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5695,9 +5695,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5764,9 +5764,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5833,9 +5833,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5902,9 +5902,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5971,9 +5971,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6040,9 +6040,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6778,9 +6778,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6851,9 +6851,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6924,9 +6924,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7119,9 +7119,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7192,9 +7192,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7265,9 +7265,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7764,9 +7764,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8085,9 +8085,9 @@ Module convert. ltac:(M.monadic (let u := M.alloc (| u |) in M.read (| - let min := + let~ min := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MIN" |) |)) |) in - let max := + let~ max := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::MAX" |) |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), diff --git a/CoqOfRust/core/error.v b/CoqOfRust/core/error.v index 60125c18e..bdb2819eb 100644 --- a/CoqOfRust/core/error.v +++ b/CoqOfRust/core/error.v @@ -138,14 +138,14 @@ Module error. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let t := + let~ t := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::any::TypeId", "of", [ T ] |), [] |) |) in - let concrete := + let~ concrete := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -530,13 +530,13 @@ Module error. ltac:(M.monadic (let err := M.alloc (| err |) in M.read (| - let tagged := + let~ tagged := M.alloc (| Value.StructTuple "core::error::TaggedOption" [ Value.StructTuple "core::option::Option::None" [] ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -733,7 +733,7 @@ Module error. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -770,7 +770,8 @@ Module error. "core::error::TaggedOption", 0 |) in - let _ := + let _ := M.is_struct_tuple (| γ3_0, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_tuple_field (| M.read (| res |), @@ -808,7 +809,7 @@ Module error. (let self := M.alloc (| self |) in let fulfil := M.alloc (| fulfil |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -845,7 +846,8 @@ Module error. "core::error::TaggedOption", 0 |) in - let _ := + let _ := M.is_struct_tuple (| γ3_0, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_tuple_field (| M.read (| res |), @@ -983,6 +985,7 @@ Module error. "core::error::TaggedOption", 0 |) in + let _ := M.is_struct_tuple (| γ2_0, "core::option::Option::None" |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -1643,7 +1646,7 @@ Module error. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let current := + let~ current := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1651,7 +1654,7 @@ Module error. "current" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1775,7 +1778,7 @@ Module error. (let self := M.alloc (| self |) in let request := M.alloc (| request |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::error::Error", T, [], "provide", [] |), diff --git a/CoqOfRust/core/escape.v b/CoqOfRust/core/escape.v index 8d3d568f1..82b5d2972 100644 --- a/CoqOfRust/core/escape.v +++ b/CoqOfRust/core/escape.v @@ -183,7 +183,7 @@ Module escape. |))); fun γ => ltac:(M.monadic - (let hi := + (let~ hi := M.copy (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), @@ -196,12 +196,12 @@ Module escape. "from", [] |), - [ BinOp.Panic.shr (| M.read (| byte |), Value.Integer 4 |) ] + [ BinOp.Wrap.shr (M.read (| byte |)) (Value.Integer 4) ] |) |) |) |) in - let lo := + let~ lo := M.copy (| M.SubPointer.get_array_field (| M.get_constant (| "core::escape::HEX_DIGITS" |), @@ -247,7 +247,7 @@ Module escape. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let data := M.copy (| γ0_0 |) in let len := M.copy (| γ0_1 |) in - let _ := M.write (| M.read (| output |), M.read (| data |) |) in + let~ _ := M.write (| M.read (| output |), M.read (| data |) |) in M.alloc (| Value.StructRecord "core::ops::range::Range" @@ -318,13 +318,13 @@ Module escape. (let output := M.alloc (| output |) in let ch := M.alloc (| ch |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| output |), M.alloc (| Value.Integer 9 |) |), Value.StructTuple "core::ascii::ascii_char::AsciiChar::RightCurlyBracket" [] |) in - let ch := M.alloc (| M.rust_cast (M.read (| ch |)) |) in - let _ := + let~ ch := M.alloc (| M.rust_cast (M.read (| ch |)) |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| output |), M.alloc (| Value.Integer 3 |) |), M.read (| @@ -333,13 +333,13 @@ Module escape. M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer 20 |)) + (BinOp.Wrap.shr (M.read (| ch |)) (Value.Integer 20)) (Value.Integer 15)) |) |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| output |), M.alloc (| Value.Integer 4 |) |), M.read (| @@ -348,13 +348,13 @@ Module escape. M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer 16 |)) + (BinOp.Wrap.shr (M.read (| ch |)) (Value.Integer 16)) (Value.Integer 15)) |) |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| output |), M.alloc (| Value.Integer 5 |) |), M.read (| @@ -363,13 +363,13 @@ Module escape. M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer 12 |)) + (BinOp.Wrap.shr (M.read (| ch |)) (Value.Integer 12)) (Value.Integer 15)) |) |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| output |), M.alloc (| Value.Integer 6 |) |), M.read (| @@ -378,13 +378,13 @@ Module escape. M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer 8 |)) + (BinOp.Wrap.shr (M.read (| ch |)) (Value.Integer 8)) (Value.Integer 15)) |) |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| output |), M.alloc (| Value.Integer 7 |) |), M.read (| @@ -393,13 +393,13 @@ Module escape. M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer 4 |)) + (BinOp.Wrap.shr (M.read (| ch |)) (Value.Integer 4)) (Value.Integer 15)) |) |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| output |), M.alloc (| Value.Integer 8 |) |), M.read (| @@ -408,29 +408,27 @@ Module escape. M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| ch |), Value.Integer 0 |)) + (BinOp.Wrap.shr (M.read (| ch |)) (Value.Integer 0)) (Value.Integer 15)) |) |) |) |) in - let start := + let~ start := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - M.rust_cast + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u32", "leading_zeros", [] |), [ BinOp.Pure.bit_or (M.read (| ch |)) (Value.Integer 1) ] - |)), - Value.Integer 4 - |), - Value.Integer 2 - |) + |))) + (Value.Integer 4)) + (Value.Integer 2) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -658,8 +656,8 @@ Module escape. (let data := M.alloc (| data |) in let alive := M.alloc (| alive |) in M.read (| - let _ := M.get_constant (| "core::escape::new_discriminant" |) in - let _ := + let~ _ := M.get_constant (| "core::escape::new_discriminant" |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -667,7 +665,7 @@ Module escape. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -798,12 +796,12 @@ Module escape. ltac:(M.monadic (let array := M.alloc (| array |) in M.read (| - let _ := M.get_constant (| "core::escape::from_array_discriminant" |) in - let data := + let~ _ := M.get_constant (| "core::escape::from_array_discriminant" |) in + let~ data := M.alloc (| repeat (Value.StructTuple "core::ascii::ascii_char::AsciiChar::Null" []) N |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -988,9 +986,9 @@ Module escape. [] |), [ - BinOp.Panic.sub (| - Integer.U8, - M.read (| + BinOp.Wrap.sub + Integer.U8 + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1000,8 +998,8 @@ Module escape. "core::ops::range::Range", "end" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1011,8 +1009,7 @@ Module escape. "core::ops::range::Range", "start" |) - |) - |) + |)) ] |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/ffi/c_str.v b/CoqOfRust/core/ffi/c_str.v index 0d84371aa..140d2fab6 100644 --- a/CoqOfRust/core/ffi/c_str.v +++ b/CoqOfRust/core/ffi/c_str.v @@ -291,6 +291,11 @@ Module ffi. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + |) in M.alloc (| Value.StructTuple "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" @@ -332,7 +337,7 @@ Module ffi. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -342,7 +347,7 @@ Module ffi. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -482,6 +487,11 @@ Module ffi. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -585,12 +595,22 @@ Module ffi. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::ffi::c_str::FromBytesWithNulErrorKind::InteriorNul" + |) in + M.alloc (| M.read (| Value.String "data provided contains an interior nul byte" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::ffi::c_str::FromBytesWithNulErrorKind::NotNulTerminated" + |) in + M.alloc (| M.read (| Value.String "data provided is not nul terminated" |) |))) ] @@ -958,7 +978,7 @@ Module ffi. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1044,7 +1064,7 @@ Module ffi. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1063,7 +1083,7 @@ Module ffi. 0 |) in let pos := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1211,7 +1231,7 @@ Module ffi. ltac:(M.monadic (let ptr := M.alloc (| ptr |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_function (| "core::ffi::c_str::const_strlen", [] |), @@ -1237,7 +1257,7 @@ Module ffi. |), [ M.read (| ptr |) ] |); - BinOp.Panic.add (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) ] @@ -1271,7 +1291,7 @@ Module ffi. ltac:(M.monadic (let bytes := M.alloc (| bytes |) in M.read (| - let nul_pos := + let~ nul_pos := M.alloc (| M.call_closure (| M.get_function (| "core::slice::memchr::memchr", [] |), @@ -1290,7 +1310,7 @@ Module ffi. 0 |) in let nul_pos := M.copy (| γ0_0 |) in - let subslice := + let~ subslice := M.alloc (| M.call_closure (| M.get_function (| @@ -1306,11 +1326,7 @@ Module ffi. |), [ M.read (| bytes |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| nul_pos |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| nul_pos |)) (Value.Integer 1) ] |) |) in @@ -1330,7 +1346,8 @@ Module ffi. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ @@ -1368,7 +1385,7 @@ Module ffi. ltac:(M.monadic (let bytes := M.alloc (| bytes |) in M.read (| - let nul_pos := + let~ nul_pos := M.alloc (| M.call_closure (| M.get_function (| "core::slice::memchr::memchr", [] |), @@ -1390,11 +1407,7 @@ Module ffi. let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.Usize, - M.read (| nul_pos |), - Value.Integer 1 - |)) + (BinOp.Wrap.add Integer.Usize (M.read (| nul_pos |)) (Value.Integer 1)) (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1444,7 +1457,8 @@ Module ffi. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ @@ -1580,9 +1594,9 @@ Module ffi. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i8" ], "len", @@ -1595,9 +1609,8 @@ Module ffi. "inner" |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -1653,7 +1666,7 @@ Module ffi. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let bytes := + let~ bytes := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1676,18 +1689,17 @@ Module ffi. |), [ M.read (| bytes |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| bytes |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) @@ -1925,7 +1937,7 @@ Module ffi. (let self := M.alloc (| self |) in let index := M.alloc (| index |) in M.read (| - let bytes := + let~ bytes := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2186,8 +2198,8 @@ Module ffi. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let len := M.alloc (| Value.Integer 0 |) in - let _ := + let~ len := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2213,11 +2225,11 @@ Module ffi. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := len in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2225,7 +2237,7 @@ Module ffi. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) diff --git a/CoqOfRust/core/ffi/mod.v b/CoqOfRust/core/ffi/mod.v index 40e854528..e33cec28f 100644 --- a/CoqOfRust/core/ffi/mod.v +++ b/CoqOfRust/core/ffi/mod.v @@ -387,7 +387,7 @@ Module ffi. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let ap := + let~ ap := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -400,7 +400,7 @@ Module ffi. [ M.read (| self |) ] |) |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -426,8 +426,8 @@ Module ffi. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ffi::va_end", [] |), [ ap ] |) |) in @@ -676,7 +676,7 @@ Module ffi. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let dest := + let~ dest := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -689,7 +689,7 @@ Module ffi. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ffi::va_copy", [] |), diff --git a/CoqOfRust/core/fmt/builders.v b/CoqOfRust/core/fmt/builders.v index dcb9fb7a8..47d656ad5 100644 --- a/CoqOfRust/core/fmt/builders.v +++ b/CoqOfRust/core/fmt/builders.v @@ -151,7 +151,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -183,7 +183,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -202,7 +202,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -214,7 +219,7 @@ Module fmt. 0 |) in let s := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -238,7 +243,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -343,7 +348,7 @@ Module fmt. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -365,7 +370,7 @@ Module fmt. [ M.read (| s |); Value.UnicodeChar 10 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -487,7 +492,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -508,7 +513,7 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -597,7 +602,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -681,7 +686,7 @@ Module fmt. (let fmt := M.alloc (| fmt |) in let name := M.alloc (| name |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), @@ -804,7 +809,7 @@ Module fmt. let name := M.alloc (| name |) in let value_fmt := M.alloc (| value_fmt |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -868,7 +873,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -891,7 +896,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1001,13 +1006,13 @@ Module fmt. (M.alloc (| Value.Tuple [] |))) ] |) in - let slot := + let~ slot := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let state := + let~ state := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1021,7 +1026,7 @@ Module fmt. [] |) |) in - let writer := + let~ writer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1042,7 +1047,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1126,7 +1131,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1211,7 +1216,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1323,7 +1328,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let prefix := + (let~ prefix := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1351,7 +1356,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1444,7 +1449,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1537,7 +1542,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1671,7 +1676,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1713,7 +1718,7 @@ Module fmt. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1794,13 +1799,13 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let slot := + let~ slot := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let state := + let~ state := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1814,7 +1819,7 @@ Module fmt. [] |) |) in - let writer := + let~ writer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1836,7 +1841,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2031,7 +2036,7 @@ Module fmt. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2046,7 +2051,7 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2235,7 +2240,7 @@ Module fmt. (let fmt := M.alloc (| fmt |) in let name := M.alloc (| name |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), @@ -2356,7 +2361,7 @@ Module fmt. (let self := M.alloc (| self |) in let value_fmt := M.alloc (| value_fmt |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2419,7 +2424,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2443,7 +2448,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2553,13 +2558,13 @@ Module fmt. (M.alloc (| Value.Tuple [] |))) ] |) in - let slot := + let~ slot := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let state := + let~ state := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2573,7 +2578,7 @@ Module fmt. [] |) |) in - let writer := + let~ writer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2594,7 +2599,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2706,7 +2711,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let prefix := + (let~ prefix := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2740,7 +2745,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2874,17 +2879,14 @@ Module fmt. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "core::fmt::builders::DebugTuple", "fields" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.read (| self |) |) |))) | _, _ => M.impossible @@ -2911,7 +2913,7 @@ Module fmt. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2932,7 +2934,7 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2973,7 +2975,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3020,7 +3022,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3251,7 +3253,7 @@ Module fmt. (let self := M.alloc (| self |) in let entry_fmt := M.alloc (| entry_fmt |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3314,7 +3316,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3337,7 +3339,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3447,13 +3449,13 @@ Module fmt. (M.alloc (| Value.Tuple [] |))) ] |) in - let slot := + let~ slot := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let state := + let~ state := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3467,7 +3469,7 @@ Module fmt. [] |) |) in - let writer := + let~ writer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3488,7 +3490,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3600,7 +3602,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3760,7 +3762,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3823,7 +3825,7 @@ Module fmt. ltac:(M.monadic (let fmt := M.alloc (| fmt |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), @@ -3866,7 +3868,7 @@ Module fmt. (let self := M.alloc (| self |) in let entry := M.alloc (| entry |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3940,7 +3942,7 @@ Module fmt. (let self := M.alloc (| self |) in let entry_fmt := M.alloc (| entry_fmt |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3984,7 +3986,7 @@ Module fmt. (let self := M.alloc (| self |) in let entries := M.alloc (| entries |) in M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4005,7 +4007,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4022,7 +4024,9 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4034,7 +4038,7 @@ Module fmt. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4161,7 +4165,7 @@ Module fmt. ltac:(M.monadic (let fmt := M.alloc (| fmt |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), @@ -4205,7 +4209,7 @@ Module fmt. (let self := M.alloc (| self |) in let entry := M.alloc (| entry |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4279,7 +4283,7 @@ Module fmt. (let self := M.alloc (| self |) in let entry_fmt := M.alloc (| entry_fmt |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4323,7 +4327,7 @@ Module fmt. (let self := M.alloc (| self |) in let entries := M.alloc (| entries |) in M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4344,7 +4348,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4361,7 +4365,9 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4373,7 +4379,7 @@ Module fmt. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4510,7 +4516,7 @@ Module fmt. ltac:(M.monadic (let fmt := M.alloc (| fmt |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "write_str", [] |), @@ -4678,7 +4684,7 @@ Module fmt. (let self := M.alloc (| self |) in let key_fmt := M.alloc (| key_fmt |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4719,7 +4725,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4779,7 +4785,7 @@ Module fmt. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4802,7 +4808,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4825,7 +4831,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4936,13 +4942,13 @@ Module fmt. (M.alloc (| Value.Tuple [] |))) ] |) in - let slot := + let~ slot := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4961,7 +4967,7 @@ Module fmt. [] |) |) in - let writer := + let~ writer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4986,7 +4992,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5086,7 +5092,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5177,7 +5183,7 @@ Module fmt. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5302,7 +5308,7 @@ Module fmt. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5411,7 +5417,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5508,7 +5514,7 @@ Module fmt. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5626,7 +5632,7 @@ Module fmt. (let self := M.alloc (| self |) in let value_fmt := M.alloc (| value_fmt |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5667,7 +5673,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5726,7 +5732,7 @@ Module fmt. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5749,13 +5755,13 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let slot := + let~ slot := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let writer := + let~ writer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5780,7 +5786,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5880,7 +5886,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5972,7 +5978,7 @@ Module fmt. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6084,7 +6090,7 @@ Module fmt. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6106,7 +6112,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6142,7 +6148,7 @@ Module fmt. (let self := M.alloc (| self |) in let entries := M.alloc (| entries |) in M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -6163,7 +6169,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6180,7 +6186,9 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6195,7 +6203,7 @@ Module fmt. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let k := M.copy (| γ1_0 |) in let v := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6272,7 +6280,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/fmt/float.v b/CoqOfRust/core/fmt/float.v index b0d4befb8..d6f829d21 100644 --- a/CoqOfRust/core/fmt/float.v +++ b/CoqOfRust/core/fmt/float.v @@ -24,7 +24,7 @@ Module fmt. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let abs := + let~ abs := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f32", "abs_private", [] |), @@ -76,7 +76,7 @@ Module fmt. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let abs := + let~ abs := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs_private", [] |), @@ -143,7 +143,7 @@ Module fmt. let sign := M.alloc (| sign |) in let precision := M.alloc (| precision |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -154,7 +154,7 @@ Module fmt. [] |) |) in - let parts := + let~ parts := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -167,7 +167,7 @@ Module fmt. [] |) |) in - let formatted := + let~ formatted := M.alloc (| M.call_closure (| M.get_function (| @@ -258,7 +258,7 @@ Module fmt. let sign := M.alloc (| sign |) in let precision := M.alloc (| precision |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -269,7 +269,7 @@ Module fmt. [] |) |) in - let parts := + let~ parts := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -282,7 +282,7 @@ Module fmt. [] |) |) in - let formatted := + let~ formatted := M.alloc (| M.call_closure (| M.get_function (| @@ -366,14 +366,14 @@ Module fmt. (let fmt := M.alloc (| fmt |) in let num := M.alloc (| num |) in M.read (| - let force_sign := + let~ force_sign := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "sign_plus", [] |), [ M.read (| fmt |) ] |) |) in - let sign := + let~ sign := M.copy (| M.match_operator (| force_sign, @@ -425,7 +425,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let min_precision := M.alloc (| Value.Integer 0 |) in + (let~ min_precision := M.alloc (| Value.Integer 0 |) in M.alloc (| M.call_closure (| M.get_function (| @@ -485,7 +485,7 @@ Module fmt. let precision := M.alloc (| precision |) in let upper := M.alloc (| upper |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -496,7 +496,7 @@ Module fmt. [] |) |) in - let parts := + let~ parts := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -509,7 +509,7 @@ Module fmt. [] |) |) in - let formatted := + let~ formatted := M.alloc (| M.call_closure (| M.get_function (| @@ -604,7 +604,7 @@ Module fmt. let sign := M.alloc (| sign |) in let upper := M.alloc (| upper |) in M.read (| - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -615,7 +615,7 @@ Module fmt. [] |) |) in - let parts := + let~ parts := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -628,7 +628,7 @@ Module fmt. [] |) |) in - let formatted := + let~ formatted := M.alloc (| M.call_closure (| M.get_function (| @@ -714,14 +714,14 @@ Module fmt. let num := M.alloc (| num |) in let upper := M.alloc (| upper |) in M.read (| - let force_sign := + let~ force_sign := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "sign_plus", [] |), [ M.read (| fmt |) ] |) |) in - let sign := + let~ sign := M.copy (| M.match_operator (| force_sign, @@ -767,11 +767,7 @@ Module fmt. M.read (| fmt |); M.read (| num |); M.read (| sign |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| precision |), - Value.Integer 1 - |); + BinOp.Wrap.add Integer.Usize (M.read (| precision |)) (Value.Integer 1); M.read (| upper |) ] |) @@ -830,14 +826,14 @@ Module fmt. (let fmt := M.alloc (| fmt |) in let num := M.alloc (| num |) in M.read (| - let force_sign := + let~ force_sign := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "sign_plus", [] |), [ M.read (| fmt |) ] |) |) in - let sign := + let~ sign := M.copy (| M.match_operator (| force_sign, @@ -910,7 +906,7 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let upper := M.alloc (| Value.Bool false |) in + let~ upper := M.alloc (| Value.Bool false |) in M.alloc (| M.call_closure (| M.get_function (| @@ -927,7 +923,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let min_precision := M.alloc (| Value.Integer 1 |) in + (let~ min_precision := M.alloc (| Value.Integer 1 |) in M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/fmt/mod.v b/CoqOfRust/core/fmt/mod.v index 6f127a497..dedb0379e 100644 --- a/CoqOfRust/core/fmt/mod.v +++ b/CoqOfRust/core/fmt/mod.v @@ -80,14 +80,17 @@ Module fmt. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Left" |) in M.alloc (| M.read (| Value.String "Left" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Right" |) in M.alloc (| M.read (| Value.String "Right" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Center" |) in M.alloc (| M.read (| Value.String "Center" |) |))) ] |) @@ -127,7 +130,7 @@ Module fmt. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -137,7 +140,7 @@ Module fmt. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -765,15 +768,15 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let width := + let~ width := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| buf |) ] |) |) in - let sign := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ sign := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -783,18 +786,18 @@ Module fmt. M.use (M.alloc (| UnOp.Pure.not (M.read (| is_nonnegative |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| sign, Value.StructTuple "core::option::Option::Some" [ Value.UnicodeChar 45 ] |) in - let _ := + let~ _ := let β := width in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -821,22 +824,21 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| sign, Value.StructTuple "core::option::Option::Some" [ Value.UnicodeChar 43 ] |) in - let _ := + let~ _ := let β := width in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -844,7 +846,7 @@ Module fmt. |))) ] |) in - let prefix := + let~ prefix := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -865,14 +867,14 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := width in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", Ty.path "core::str::iter::Chars", @@ -886,8 +888,7 @@ Module fmt. [ M.read (| prefix |) ] |) ] - |) - |) + |)) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| prefix |) ] @@ -907,7 +908,8 @@ Module fmt. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1015,7 +1017,7 @@ Module fmt. M.alloc (| BinOp.Pure.ge (M.read (| width |)) (M.read (| min |)) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1132,7 +1134,7 @@ Module fmt. |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let old_fill := + let~ old_fill := M.alloc (| M.call_closure (| M.get_function (| "core::mem::replace", [ Ty.path "char" ] |), @@ -1146,7 +1148,7 @@ Module fmt. ] |) |) in - let old_align := + let~ old_align := M.alloc (| M.call_closure (| M.get_function (| @@ -1163,7 +1165,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1237,7 +1239,7 @@ Module fmt. val)) ] |) in - let post_padding := + let~ post_padding := M.copy (| M.match_operator (| M.alloc (| @@ -1261,11 +1263,10 @@ Module fmt. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| min |), - M.read (| width |) - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| min |)) + (M.read (| width |)); Value.StructTuple "core::fmt::Alignment::Right" [] ] |) @@ -1322,7 +1323,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1407,7 +1408,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1481,7 +1482,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1490,7 +1491,7 @@ Module fmt. |), M.read (| old_fill |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1511,7 +1512,7 @@ Module fmt. 0 |) in let min := M.copy (| γ0_0 |) in - let post_padding := + let~ post_padding := M.copy (| M.match_operator (| M.alloc (| @@ -1535,11 +1536,10 @@ Module fmt. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| min |), - M.read (| width |) - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| min |)) + (M.read (| width |)); Value.StructTuple "core::fmt::Alignment::Right" [] ] |) @@ -1596,7 +1596,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1670,7 +1670,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1831,7 +1831,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1906,7 +1906,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let s := + let~ s := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2012,7 +2012,8 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::fmt::Write", @@ -2042,7 +2043,7 @@ Module fmt. 0 |) in let width := M.copy (| γ0_0 |) in - let chars_count := + let~ chars_count := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2098,9 +2099,9 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let align := + (let~ align := M.alloc (| Value.StructTuple "core::fmt::Alignment::Left" [] |) in - let post_padding := + let~ post_padding := M.copy (| M.match_operator (| M.alloc (| @@ -2126,11 +2127,10 @@ Module fmt. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| width |), - M.read (| chars_count |) - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| width |)) + (M.read (| chars_count |)); M.read (| align |) ] |) @@ -2188,7 +2188,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2330,7 +2330,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let align := + let~ align := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -2339,16 +2339,25 @@ Module fmt. "align" |), [ - fun γ => ltac:(M.monadic default); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::fmt::Alignment::Left" [] |))); + (let _ := + M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Unknown" |) in + default)); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::fmt::Alignment::Right" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Left" |) in + M.alloc (| Value.StructTuple "core::fmt::Alignment::Left" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::fmt::Alignment::Center" [] |))) + (let _ := + M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Right" |) in + M.alloc (| Value.StructTuple "core::fmt::Alignment::Right" [] |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Center" |) in + M.alloc (| Value.StructTuple "core::fmt::Alignment::Center" [] |))) ] |) |) in @@ -2358,29 +2367,29 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [ Value.Integer 0; M.read (| padding |) ] |))); + (let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Left" |) in + M.alloc (| Value.Tuple [ Value.Integer 0; M.read (| padding |) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [ M.read (| padding |); Value.Integer 0 ] |))); + (let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Right" |) in + M.alloc (| Value.Tuple [ M.read (| padding |); Value.Integer 0 ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::fmt::Alignment::Center" |) in + M.alloc (| Value.Tuple [ - BinOp.Panic.div (| - Integer.Usize, - M.read (| padding |), - Value.Integer 2 - |); - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| padding |), - Value.Integer 1 - |), - Value.Integer 2 - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| padding |)) + (Value.Integer 2); + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| padding |)) + (Value.Integer 1)) + (Value.Integer 2) ] |))) ] @@ -2392,7 +2401,7 @@ Module fmt. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let pre_pad := M.copy (| γ0_0 |) in let post_pad := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2419,7 +2428,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2438,7 +2447,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2449,7 +2463,7 @@ Module fmt. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2664,7 +2678,7 @@ Module fmt. 0 |) in let width := M.copy (| γ0_0 |) in - let formatted := + let~ formatted := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2677,7 +2691,7 @@ Module fmt. [ M.read (| formatted |) ] |) |) in - let old_fill := + let~ old_fill := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2685,7 +2699,7 @@ Module fmt. "fill" |) |) in - let old_align := + let~ old_align := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2693,7 +2707,7 @@ Module fmt. "align" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2716,7 +2730,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let sign := + let~ sign := M.copy (| M.SubPointer.get_struct_record_field (| formatted, @@ -2724,7 +2738,7 @@ Module fmt. "sign" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2810,7 +2824,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| formatted, @@ -2819,7 +2833,7 @@ Module fmt. |), M.read (| Value.String "" |) |) in - let _ := + let~ _ := M.write (| width, M.call_closure (| @@ -2841,7 +2855,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2850,7 +2864,7 @@ Module fmt. |), Value.UnicodeChar 48 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2863,7 +2877,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2874,7 +2888,7 @@ Module fmt. [ formatted ] |) |) in - let ret := + let~ ret := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2903,7 +2917,7 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (let post_padding := + (let~ post_padding := M.copy (| M.match_operator (| M.alloc (| @@ -2929,11 +2943,10 @@ Module fmt. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| width |), - M.read (| len |) - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| width |)) + (M.read (| len |)); Value.StructTuple "core::fmt::Alignment::Right" [] @@ -2996,8 +3009,8 @@ Module fmt. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3089,7 +3102,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3098,7 +3111,7 @@ Module fmt. |), M.read (| old_fill |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3186,7 +3199,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3211,7 +3224,7 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3306,7 +3319,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3337,7 +3350,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3356,7 +3369,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3380,7 +3398,7 @@ Module fmt. 0 |) in let nzeroes := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3413,7 +3431,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3526,14 +3544,14 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := let β := nzeroes in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", @@ -3546,8 +3564,7 @@ Module fmt. |) |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3555,7 +3572,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| @@ -3587,7 +3604,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3736,9 +3753,9 @@ Module fmt. 0 |) in let v := M.copy (| γ0_0 |) in - let s := + let~ s := M.alloc (| repeat (Value.Integer 0) 5 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3749,7 +3766,7 @@ Module fmt. [ M.read (| part |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3829,7 +3846,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3854,7 +3871,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -3871,34 +3893,31 @@ Module fmt. |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| c |), - BinOp.Panic.add (| - Integer.U8, - M.read (| + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral - |), - M.rust_cast - (BinOp.Panic.rem (| - Integer.U16, - M.read (| + |)) + (M.rust_cast + (BinOp.Wrap.rem + Integer.U16 + (M.read (| v - |), - Value.Integer - 10 - |)) - |) + |)) + (Value.Integer + 10))) |) in - let _ := + let~ _ := let β := v in M.write (| β, - BinOp.Panic.div (| - Integer.U16, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U16 + (M.read (| β |)) + (Value.Integer 10) |) in M.alloc (| Value.Tuple [] @@ -3909,7 +3928,7 @@ Module fmt. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4036,7 +4055,7 @@ Module fmt. 0 |) in let buf := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4285,27 +4304,32 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Left" |) in + M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "core::fmt::Alignment::Left" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Right" |) in + M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "core::fmt::Alignment::Right" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Center" |) in + M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "core::fmt::Alignment::Center" [] ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Alignment::Unknown" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -4377,7 +4401,7 @@ Module fmt. "flags" |) |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 0) |))) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 0)))) (Value.Integer 0))) | _, _ => M.impossible end. @@ -4403,7 +4427,7 @@ Module fmt. "flags" |) |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 1) |))) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 1)))) (Value.Integer 0))) | _, _ => M.impossible end. @@ -4429,7 +4453,7 @@ Module fmt. "flags" |) |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 2) |))) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 2)))) (Value.Integer 0))) | _, _ => M.impossible end. @@ -4455,7 +4479,7 @@ Module fmt. "flags" |) |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 3) |))) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 3)))) (Value.Integer 0))) | _, _ => M.impossible end. @@ -4482,7 +4506,7 @@ Module fmt. "flags" |) |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 4) |))) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 4)))) (Value.Integer 0))) | _, _ => M.impossible end. @@ -4509,7 +4533,7 @@ Module fmt. "flags" |) |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 5) |))) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 5)))) (Value.Integer 0))) | _, _ => M.impossible end. @@ -4558,14 +4582,14 @@ Module fmt. let name1 := M.alloc (| name1 |) in let value1 := M.alloc (| value1 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_struct_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4623,14 +4647,14 @@ Module fmt. let name2 := M.alloc (| name2 |) in let value2 := M.alloc (| value2 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_struct_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4645,7 +4669,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4708,14 +4732,14 @@ Module fmt. let name3 := M.alloc (| name3 |) in let value3 := M.alloc (| value3 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_struct_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4730,7 +4754,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4745,7 +4769,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4813,14 +4837,14 @@ Module fmt. let name4 := M.alloc (| name4 |) in let value4 := M.alloc (| value4 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_struct_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4835,7 +4859,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4850,7 +4874,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4865,7 +4889,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4940,14 +4964,14 @@ Module fmt. let name5 := M.alloc (| name5 |) in let value5 := M.alloc (| value5 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_struct_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4962,7 +4986,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4977,7 +5001,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4992,7 +5016,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5007,7 +5031,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5063,7 +5087,7 @@ Module fmt. let names := M.alloc (| names |) in let values := M.alloc (| values |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -5124,7 +5148,7 @@ Module fmt. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -5150,14 +5174,14 @@ Module fmt. |))) ] |) in - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_struct_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5218,7 +5242,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5248,7 +5272,9 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5263,7 +5289,7 @@ Module fmt. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let name := M.copy (| γ1_0 |) in let value := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5337,14 +5363,14 @@ Module fmt. let name := M.alloc (| name |) in let value1 := M.alloc (| value1 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_tuple_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5394,14 +5420,14 @@ Module fmt. let value1 := M.alloc (| value1 |) in let value2 := M.alloc (| value2 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_tuple_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5412,7 +5438,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5465,14 +5491,14 @@ Module fmt. let value2 := M.alloc (| value2 |) in let value3 := M.alloc (| value3 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_tuple_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5483,7 +5509,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5494,7 +5520,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value2 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5550,14 +5576,14 @@ Module fmt. let value3 := M.alloc (| value3 |) in let value4 := M.alloc (| value4 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_tuple_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5568,7 +5594,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5579,7 +5605,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value2 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5590,7 +5616,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value3 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5649,14 +5675,14 @@ Module fmt. let value4 := M.alloc (| value4 |) in let value5 := M.alloc (| value5 |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_tuple_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5667,7 +5693,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value1 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5678,7 +5704,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value2 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5689,7 +5715,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value3 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5700,7 +5726,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion (M.read (| value4 |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5749,14 +5775,14 @@ Module fmt. let name := M.alloc (| name |) in let values := M.alloc (| values |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::builders::debug_tuple_new", [] |), [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5787,7 +5813,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5810,7 +5836,9 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5822,7 +5850,7 @@ Module fmt. 0 |) in let value := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6011,7 +6039,7 @@ Module fmt. ltac:(M.monadic (let pieces := M.alloc (| pieces |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6090,7 +6118,7 @@ Module fmt. (let pieces := M.alloc (| pieces |) in let args := M.alloc (| args |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6133,9 +6161,9 @@ Module fmt. |), [ M.read (| pieces |) ] |)) - (BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -6144,9 +6172,8 @@ Module fmt. [] |), [ M.read (| args |) ] - |), - Value.Integer 1 - |)))) + |)) + (Value.Integer 1)))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -6247,7 +6274,7 @@ Module fmt. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pieces_length := + let~ pieces_length := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6682,21 +6709,22 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let formatter := + let~ formatter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "new", [] |), [ (* Unsize *) M.pointer_coercion (M.read (| output |)) ] |) |) in - let idx := M.alloc (| Value.Integer 0 |) in - let _ := + let~ idx := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| args, "core::fmt::Arguments", "fmt" |), [ fun γ => ltac:(M.monadic - (M.use + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.use (M.match_operator (| M.alloc (| M.call_closure (| @@ -6754,7 +6782,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6778,7 +6806,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6795,7 +6828,7 @@ Module fmt. M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let arg := M.copy (| γ1_1 |) in - let piece := + let~ piece := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6818,7 +6851,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6846,7 +6879,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6960,7 +6993,7 @@ Module fmt. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7044,15 +7077,14 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := let β := idx in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -7120,7 +7152,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7144,7 +7176,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7161,7 +7198,7 @@ Module fmt. M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let arg := M.copy (| γ1_1 |) in - let piece := + let~ piece := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7184,7 +7221,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7212,7 +7249,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7326,7 +7363,7 @@ Module fmt. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7419,15 +7456,14 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := let β := idx in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -7438,7 +7474,7 @@ Module fmt. |)))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7473,7 +7509,7 @@ Module fmt. 0 |) in let piece := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7600,7 +7636,7 @@ Module fmt. let arg := M.alloc (| arg |) in let args := M.alloc (| args |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| fmt |), @@ -7615,7 +7651,7 @@ Module fmt. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| fmt |), @@ -7630,7 +7666,7 @@ Module fmt. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| fmt |), @@ -7645,8 +7681,8 @@ Module fmt. |) |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| fmt |), @@ -7665,7 +7701,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| fmt |), @@ -7685,7 +7721,7 @@ Module fmt. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7693,7 +7729,7 @@ Module fmt. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7746,7 +7782,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7809,13 +7845,15 @@ Module fmt. let n := M.copy (| γ0_0 |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| n |) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::fmt::rt::Count::Implied" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::fmt::rt::Count::Param", 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7824,7 +7862,7 @@ Module fmt. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7944,7 +7982,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7979,7 +8017,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7998,7 +8036,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -8009,7 +8052,7 @@ Module fmt. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8863,7 +8906,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8939,8 +8982,8 @@ Module fmt. val)) ] |) in - let from := M.alloc (| Value.Integer 0 |) in - let _ := + let~ from := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -8966,7 +9009,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8983,7 +9026,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -8998,7 +9046,7 @@ Module fmt. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let c := M.copy (| γ1_1 |) in - let esc := + let~ esc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9044,7 +9092,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -9155,7 +9203,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -9176,7 +9224,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -9194,7 +9242,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -9211,7 +9264,7 @@ Module fmt. |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -9330,21 +9383,20 @@ Module fmt. |))) ] |)) in - let _ := + let~ _ := M.write (| from, - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), [ M.read (| c |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -9357,7 +9409,7 @@ Module fmt. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -9531,7 +9583,7 @@ Module fmt. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -9607,7 +9659,7 @@ Module fmt. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -9646,7 +9698,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -9663,7 +9715,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -9964,7 +10021,7 @@ Module fmt. (let ptr_addr := M.alloc (| ptr_addr |) in let f := M.alloc (| f |) in M.read (| - let old_width := + let~ old_width := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| f |), @@ -9972,7 +10029,7 @@ Module fmt. "width" |) |) in - let old_flags := + let~ old_flags := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| f |), @@ -9980,7 +10037,7 @@ Module fmt. "flags" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9999,7 +10056,7 @@ Module fmt. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| f |), @@ -10010,7 +10067,7 @@ Module fmt. β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 3) |)) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 3))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10037,7 +10094,7 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| f |), @@ -10047,16 +10104,14 @@ Module fmt. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.Usize, - M.rust_cast - (BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 4 - |)), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.rust_cast + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 4))) + (Value.Integer 2) ] |) in M.alloc (| Value.Tuple [] |))); @@ -10066,7 +10121,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| f |), @@ -10077,16 +10132,16 @@ Module fmt. β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| Value.Integer 1, M.rust_cast (Value.Integer 2) |)) + (BinOp.Wrap.shl (Value.Integer 1) (M.rust_cast (Value.Integer 2))) |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_trait_method (| "core::fmt::LowerHex", Ty.path "usize", [], "fmt", [] |), [ ptr_addr; M.read (| f |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| f |), @@ -10095,7 +10150,7 @@ Module fmt. |), M.read (| old_width |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| f |), @@ -10325,7 +10380,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -10361,7 +10416,7 @@ Module fmt. let value_V := M.alloc (| γ0_9 |) in let value_U := M.alloc (| γ0_10 |) in let value_T := M.alloc (| γ0_11 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10372,7 +10427,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_E ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10383,7 +10438,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_D ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10394,7 +10449,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_C ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10405,7 +10460,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_B ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10416,7 +10471,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_A ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10427,7 +10482,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Z ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10438,7 +10493,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10449,7 +10504,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10460,7 +10515,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10471,7 +10526,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10482,7 +10537,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10541,7 +10596,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -10575,7 +10630,7 @@ Module fmt. let value_V := M.alloc (| γ0_8 |) in let value_U := M.alloc (| γ0_9 |) in let value_T := M.alloc (| γ0_10 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10586,7 +10641,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_D ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10597,7 +10652,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_C ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10608,7 +10663,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_B ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10619,7 +10674,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_A ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10630,7 +10685,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Z ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10641,7 +10696,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10652,7 +10707,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10663,7 +10718,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10674,7 +10729,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10685,7 +10740,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10744,7 +10799,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -10776,7 +10831,7 @@ Module fmt. let value_V := M.alloc (| γ0_7 |) in let value_U := M.alloc (| γ0_8 |) in let value_T := M.alloc (| γ0_9 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10787,7 +10842,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_C ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10798,7 +10853,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_B ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10809,7 +10864,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_A ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10820,7 +10875,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Z ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10831,7 +10886,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10842,7 +10897,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10853,7 +10908,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10864,7 +10919,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10875,7 +10930,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10933,7 +10988,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -10963,7 +11018,7 @@ Module fmt. let value_V := M.alloc (| γ0_6 |) in let value_U := M.alloc (| γ0_7 |) in let value_T := M.alloc (| γ0_8 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10974,7 +11029,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_B ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10985,7 +11040,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_A ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10996,7 +11051,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Z ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11007,7 +11062,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11018,7 +11073,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11029,7 +11084,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11040,7 +11095,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11051,7 +11106,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11109,7 +11164,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11137,7 +11192,7 @@ Module fmt. let value_V := M.alloc (| γ0_5 |) in let value_U := M.alloc (| γ0_6 |) in let value_T := M.alloc (| γ0_7 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11148,7 +11203,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_A ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11159,7 +11214,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Z ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11170,7 +11225,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11181,7 +11236,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11192,7 +11247,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11203,7 +11258,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11214,7 +11269,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11272,7 +11327,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11298,7 +11353,7 @@ Module fmt. let value_V := M.alloc (| γ0_4 |) in let value_U := M.alloc (| γ0_5 |) in let value_T := M.alloc (| γ0_6 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11309,7 +11364,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Z ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11320,7 +11375,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11331,7 +11386,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11342,7 +11397,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11353,7 +11408,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11364,7 +11419,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11422,7 +11477,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11446,7 +11501,7 @@ Module fmt. let value_V := M.alloc (| γ0_3 |) in let value_U := M.alloc (| γ0_4 |) in let value_T := M.alloc (| γ0_5 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11457,7 +11512,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_Y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11468,7 +11523,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11479,7 +11534,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11490,7 +11545,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11501,7 +11556,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11559,7 +11614,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11581,7 +11636,7 @@ Module fmt. let value_V := M.alloc (| γ0_2 |) in let value_U := M.alloc (| γ0_3 |) in let value_T := M.alloc (| γ0_4 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11592,7 +11647,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_X ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11603,7 +11658,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11614,7 +11669,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11625,7 +11680,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11683,7 +11738,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11703,7 +11758,7 @@ Module fmt. let value_V := M.alloc (| γ0_1 |) in let value_U := M.alloc (| γ0_2 |) in let value_T := M.alloc (| γ0_3 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11714,7 +11769,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_W ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11725,7 +11780,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11736,7 +11791,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11794,7 +11849,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11812,7 +11867,7 @@ Module fmt. let value_V := M.alloc (| γ0_0 |) in let value_U := M.alloc (| γ0_1 |) in let value_T := M.alloc (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11823,7 +11878,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_V ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11834,7 +11889,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11892,7 +11947,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11908,7 +11963,7 @@ Module fmt. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let value_U := M.alloc (| γ0_0 |) in let value_T := M.alloc (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11919,7 +11974,7 @@ Module fmt. [ builder; (* Unsize *) M.pointer_coercion value_U ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11977,7 +12032,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let builder := + let~ builder := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", "debug_tuple", [] |), @@ -11991,7 +12046,7 @@ Module fmt. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let value_T := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12267,7 +12322,7 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let d := + let~ d := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12278,7 +12333,7 @@ Module fmt. [ M.read (| f |); M.read (| Value.String "RefCell" |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| diff --git a/CoqOfRust/core/fmt/num.v b/CoqOfRust/core/fmt/num.v index c0ac13442..9ce7817a0 100644 --- a/CoqOfRust/core/fmt/num.v +++ b/CoqOfRust/core/fmt/num.v @@ -760,21 +760,21 @@ Module fmt. let x := M.alloc (| x |) in let f := M.alloc (| f |) in M.read (| - let zero := + let~ zero := M.alloc (| M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", T, [], "zero", [] |), [] |) |) in - let is_nonnegative := + let~ is_nonnegative := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", T, [ T ], "ge", [] |), [ x; zero ] |) |) in - let buf := + let~ buf := M.alloc (| repeat (M.call_closure (| @@ -787,7 +787,7 @@ Module fmt. |)) 128 |) in - let curr := + let~ curr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -801,14 +801,14 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let base := + let~ base := M.alloc (| M.call_closure (| M.get_trait_method (| "core::fmt::num::DisplayInt", T, [], "from_u8", [] |), [ M.read (| M.get_constant (| "core::fmt::num::GenericRadix::BASE" |) |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -879,7 +879,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -907,7 +907,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -919,7 +924,7 @@ Module fmt. 0 |) in let byte := M.copy (| γ0_0 |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -932,7 +937,7 @@ Module fmt. [ M.read (| x |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| x, M.call_closure (| @@ -946,7 +951,7 @@ Module fmt. [ M.read (| x |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -983,17 +988,16 @@ Module fmt. ] |) |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1099,7 +1103,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1127,7 +1131,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1139,7 +1148,7 @@ Module fmt. 0 |) in let byte := M.copy (| γ0_0 |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1164,7 +1173,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.write (| x, M.call_closure (| @@ -1178,7 +1187,7 @@ Module fmt. [ M.read (| x |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1215,17 +1224,16 @@ Module fmt. ] |) |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1269,7 +1277,7 @@ Module fmt. |)))) ] |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1290,7 +1298,7 @@ Module fmt. ] |) |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), @@ -1626,11 +1634,7 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| x |) - |) + BinOp.Wrap.add Integer.U8 (M.read (| UnsupportedLiteral |)) (M.read (| x |)) |))); fun γ => ltac:(M.monadic @@ -1669,15 +1673,14 @@ Module fmt. |), [ M.alloc (| - BinOp.Panic.sub (| - Integer.U8, - M.read (| + BinOp.Wrap.sub + Integer.U8 + (M.read (| M.get_constant (| "core::fmt::num::GenericRadix::BASE" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) ] |); @@ -1748,11 +1751,7 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| x |) - |) + BinOp.Wrap.add Integer.U8 (M.read (| UnsupportedLiteral |)) (M.read (| x |)) |))); fun γ => ltac:(M.monadic @@ -1791,15 +1790,14 @@ Module fmt. |), [ M.alloc (| - BinOp.Panic.sub (| - Integer.U8, - M.read (| + BinOp.Wrap.sub + Integer.U8 + (M.read (| M.get_constant (| "core::fmt::num::GenericRadix::BASE" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) ] |); @@ -1870,21 +1868,16 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| x |) - |) + BinOp.Wrap.add Integer.U8 (M.read (| UnsupportedLiteral |)) (M.read (| x |)) |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - BinOp.Panic.sub (| Integer.U8, M.read (| x |), Value.Integer 10 |) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (BinOp.Wrap.sub Integer.U8 (M.read (| x |)) (Value.Integer 10)) |))); fun γ => ltac:(M.monadic @@ -1923,15 +1916,14 @@ Module fmt. |), [ M.alloc (| - BinOp.Panic.sub (| - Integer.U8, - M.read (| + BinOp.Wrap.sub + Integer.U8 + (M.read (| M.get_constant (| "core::fmt::num::GenericRadix::BASE" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) ] |); @@ -2002,21 +1994,16 @@ Module fmt. ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| x |) - |) + BinOp.Wrap.add Integer.U8 (M.read (| UnsupportedLiteral |)) (M.read (| x |)) |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - BinOp.Panic.sub (| Integer.U8, M.read (| x |), Value.Integer 10 |) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (BinOp.Wrap.sub Integer.U8 (M.read (| x |)) (Value.Integer 10)) |))); fun γ => ltac:(M.monadic @@ -2055,15 +2042,14 @@ Module fmt. |), [ M.alloc (| - BinOp.Panic.sub (| - Integer.U8, - M.read (| + BinOp.Wrap.sub + Integer.U8 + (M.read (| M.get_constant (| "core::fmt::num::GenericRadix::BASE" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) ] |); @@ -5456,7 +5442,7 @@ Module fmt. let is_nonnegative := M.alloc (| is_nonnegative |) in let f := M.alloc (| f |) in M.read (| - let buf := + let~ buf := M.alloc (| repeat (M.call_closure (| @@ -5469,7 +5455,7 @@ Module fmt. |)) 39 |) in - let curr := + let~ curr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5483,7 +5469,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let buf_ptr := + let~ buf_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5494,7 +5480,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let lut_ptr := + let~ lut_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5511,8 +5497,8 @@ Module fmt. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5547,7 +5533,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5565,58 +5551,45 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let rem := + let~ rem := M.alloc (| M.rust_cast - (BinOp.Panic.rem (| - Integer.U64, - M.read (| n |), - Value.Integer 10000 - |)) + (BinOp.Wrap.rem + Integer.U64 + (M.read (| n |)) + (Value.Integer 10000)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 10000 - |) + BinOp.Wrap.div Integer.U64 (M.read (| β |)) (Value.Integer 10000) |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| rem |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.div + Integer.Usize + (M.read (| rem |)) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d2 := + let~ d2 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.Usize, - M.read (| rem |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.Usize + (M.read (| rem |)) + (Value.Integer 100)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 4 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 4) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5644,7 +5617,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5668,11 +5641,10 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| curr |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| curr |)) + (Value.Integer 2) ] |); Value.Integer 2 @@ -5685,7 +5657,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5696,8 +5668,8 @@ Module fmt. ] |))) |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in - let _ := + let~ n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5708,30 +5680,25 @@ Module fmt. (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (Value.Integer 100) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.Usize, - M.read (| n |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem Integer.Usize (M.read (| n |)) (Value.Integer 100)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| Integer.Usize, M.read (| β |), Value.Integer 100 |) + BinOp.Wrap.div Integer.Usize (M.read (| β |)) (Value.Integer 100) |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5772,13 +5739,13 @@ Module fmt. M.use (M.alloc (| BinOp.Pure.lt (M.read (| n |)) (Value.Integer 10) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -5788,24 +5755,23 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - BinOp.Panic.add (| - Integer.U8, - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (M.rust_cast (M.read (| n |))) + (M.read (| UnsupportedLiteral |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let d1 := - M.alloc (| BinOp.Panic.shl (| M.read (| n |), Value.Integer 1 |) |) in - let _ := + (let~ d1 := + M.alloc (| BinOp.Wrap.shl (M.read (| n |)) (Value.Integer 1) |) in + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5836,7 +5802,7 @@ Module fmt. M.alloc (| Value.Tuple [] |))) ] |) in - let buf_slice := + let~ buf_slice := M.alloc (| M.call_closure (| M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), @@ -5854,9 +5820,9 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |)); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -5869,9 +5835,8 @@ Module fmt. [] |), [ (* Unsize *) M.pointer_coercion buf ] - |), - M.read (| curr |) - |) + |)) + (M.read (| curr |)) ] |) ] @@ -5920,9 +5885,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6008,9 +5973,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6096,9 +6061,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6184,9 +6149,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6272,9 +6237,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6360,9 +6325,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6448,9 +6413,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6536,9 +6501,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6624,9 +6589,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6712,9 +6677,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -6923,8 +6888,8 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - let exponent := M.alloc (| Value.Integer 0 |) in - let _ := + let~ exponent := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6937,11 +6902,10 @@ Module fmt. (M.alloc (| LogicalOp.and (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.U64, - M.read (| n |), - Value.Integer 10 - |)) + (BinOp.Wrap.rem + Integer.U64 + (M.read (| n |)) + (Value.Integer 10)) (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.ge (M.read (| n |)) (Value.Integer 10))) @@ -6952,25 +6916,17 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div Integer.U64 (M.read (| β |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -6978,7 +6934,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7011,9 +6967,9 @@ Module fmt. 0 |) in let fmt_prec := M.copy (| γ0_0 |) in - let tmp := M.copy (| n |) in - let prec := M.alloc (| Value.Integer 0 |) in - let _ := + let~ tmp := M.copy (| n |) in + let~ prec := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7031,25 +6987,23 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := tmp in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := prec in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -7057,7 +7011,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7091,7 +7045,8 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer 0 ] |))) + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer 0 ] |))) ] |), [ @@ -7101,7 +7056,7 @@ Module fmt. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let added_precision := M.copy (| γ0_0 |) in let subtracted_precision := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7131,7 +7086,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7150,7 +7105,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7161,25 +7121,23 @@ Module fmt. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -7188,7 +7146,7 @@ Module fmt. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7206,33 +7164,24 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.U64, - M.read (| n |), - Value.Integer 10 - |) + BinOp.Wrap.rem Integer.U64 (M.read (| n |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div Integer.U64 (M.read (| β |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7254,11 +7203,10 @@ Module fmt. ltac:(M.monadic (LogicalOp.or (| BinOp.Pure.ne - (BinOp.Panic.rem (| - Integer.U64, - M.read (| n |), - Value.Integer 2 - |)) + (BinOp.Wrap.rem + Integer.U64 + (M.read (| n |)) + (Value.Integer 2)) (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.gt @@ -7273,15 +7221,14 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7307,11 +7254,10 @@ Module fmt. [] |), [ - BinOp.Panic.sub (| - Integer.U64, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| n |)) + (Value.Integer 1) ] |)) |)) in @@ -7320,25 +7266,23 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -7373,7 +7317,7 @@ Module fmt. let exponent := M.copy (| γ0_1 |) in let trailing_zeros := M.copy (| γ0_2 |) in let added_precision := M.copy (| γ0_3 |) in - let buf := + let~ buf := M.alloc (| repeat (M.call_closure (| @@ -7388,7 +7332,7 @@ Module fmt. |)) 40 |) in - let curr := + let~ curr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7405,7 +7349,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let buf_ptr := + let~ buf_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7418,7 +7362,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let lut_ptr := + let~ lut_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7435,7 +7379,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7453,30 +7397,27 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - M.rust_cast - (BinOp.Panic.rem (| - Integer.U64, - M.read (| n |), - Value.Integer 100 - |)), - Value.Integer 1 - |) + BinOp.Wrap.shl + (M.rust_cast + (BinOp.Wrap.rem + Integer.U64 + (M.read (| n |)) + (Value.Integer 100))) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 2 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 2) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7505,25 +7446,23 @@ Module fmt. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 100 - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (Value.Integer 100) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -7531,7 +7470,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7542,8 +7481,8 @@ Module fmt. ] |))) |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in - let _ := + let~ n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7559,18 +7498,14 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -7580,42 +7515,32 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - BinOp.Panic.add (| - Integer.U8, - BinOp.Panic.rem (| - Integer.U8, - M.rust_cast (M.read (| n |)), - Value.Integer 10 - |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (BinOp.Wrap.rem + Integer.U8 + (M.rust_cast (M.read (| n |))) + (Value.Integer 10)) + (M.read (| UnsupportedLiteral |)) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.Isize, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div Integer.Isize (M.read (| β |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7639,17 +7564,13 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -7665,15 +7586,15 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let buf_slice := + let~ buf_slice := M.copy (| - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -7683,17 +7604,16 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - BinOp.Panic.add (| - Integer.U8, - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (M.rust_cast (M.read (| n |))) + (M.read (| UnsupportedLiteral |)) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -7706,9 +7626,8 @@ Module fmt. [] |), [ (* Unsize *) M.pointer_coercion buf ] - |), - M.read (| M.use curr |) - |) + |)) + (M.read (| M.use curr |)) |) in M.alloc (| M.call_closure (| @@ -7732,7 +7651,7 @@ Module fmt. |) |) |) in - let exp_buf := + let~ exp_buf := M.alloc (| repeat (M.call_closure (| @@ -7747,7 +7666,7 @@ Module fmt. |)) 3 |) in - let exp_ptr := + let~ exp_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7760,9 +7679,9 @@ Module fmt. [ (* Unsize *) M.pointer_coercion exp_buf ] |) |) in - let exp_slice := + let~ exp_slice := M.copy (| - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -7790,7 +7709,7 @@ Module fmt. |) |) |) in - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7807,7 +7726,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -7817,23 +7736,19 @@ Module fmt. |), [ M.read (| exp_ptr |); Value.Integer 1 ] |), - BinOp.Panic.add (| - Integer.U8, - M.rust_cast (M.read (| exponent |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (M.rust_cast (M.read (| exponent |))) + (M.read (| UnsupportedLiteral |)) |) in M.alloc (| Value.Integer 2 |))); fun γ => ltac:(M.monadic - (let off := + (let~ off := M.alloc (| - BinOp.Panic.shl (| - M.read (| exponent |), - Value.Integer 1 - |) + BinOp.Wrap.shl (M.read (| exponent |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7878,7 +7793,7 @@ Module fmt. |) |) |) in - let parts := + let~ parts := M.alloc (| M.alloc (| Value.Array @@ -7895,7 +7810,7 @@ Module fmt. ] |) |) in - let sign := + let~ sign := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7948,7 +7863,7 @@ Module fmt. ] |) |) in - let formatted := + let~ formatted := M.alloc (| Value.StructRecord "core::num::fmt::Formatted" @@ -7997,9 +7912,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8086,9 +8001,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8175,9 +8090,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8264,9 +8179,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8353,9 +8268,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8442,9 +8357,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8531,9 +8446,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8620,9 +8535,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8709,9 +8624,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8798,9 +8713,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8887,9 +8802,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8975,9 +8890,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9063,9 +8978,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9151,9 +9066,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9239,9 +9154,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9327,9 +9242,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9415,9 +9330,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9503,9 +9418,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9591,9 +9506,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9679,9 +9594,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9891,8 +9806,8 @@ Module fmt. let f := M.alloc (| f |) in M.read (| M.match_operator (| - let exponent := M.alloc (| Value.Integer 0 |) in - let _ := + let~ exponent := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -9905,11 +9820,10 @@ Module fmt. (M.alloc (| LogicalOp.and (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.U128, - M.read (| n |), - Value.Integer 10 - |)) + (BinOp.Wrap.rem + Integer.U128 + (M.read (| n |)) + (Value.Integer 10)) (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.ge (M.read (| n |)) (Value.Integer 10))) @@ -9917,17 +9831,17 @@ Module fmt. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| Integer.U128, M.read (| β |), Value.Integer 10 |) + BinOp.Wrap.div Integer.U128 (M.read (| β |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -9935,7 +9849,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -9966,9 +9880,9 @@ Module fmt. 0 |) in let fmt_prec := M.copy (| γ0_0 |) in - let tmp := M.copy (| n |) in - let prec := M.alloc (| Value.Integer 0 |) in - let _ := + let~ tmp := M.copy (| n |) in + let~ prec := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -9986,25 +9900,23 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := tmp in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := prec in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -10012,7 +9924,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -10046,7 +9958,8 @@ Module fmt. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer 0 ] |))) + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer 0 ] |))) ] |), [ @@ -10056,7 +9969,7 @@ Module fmt. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let added_precision := M.copy (| γ0_0 |) in let subtracted_precision := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -10084,7 +9997,7 @@ Module fmt. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -10103,7 +10016,12 @@ Module fmt. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -10114,25 +10032,23 @@ Module fmt. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -10141,7 +10057,7 @@ Module fmt. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10159,33 +10075,21 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.U128, - M.read (| n |), - Value.Integer 10 - |) + BinOp.Wrap.rem Integer.U128 (M.read (| n |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div Integer.U128 (M.read (| β |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10205,11 +10109,10 @@ Module fmt. ltac:(M.monadic (LogicalOp.or (| BinOp.Pure.ne - (BinOp.Panic.rem (| - Integer.U128, - M.read (| n |), - Value.Integer 2 - |)) + (BinOp.Wrap.rem + Integer.U128 + (M.read (| n |)) + (Value.Integer 2)) (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.gt @@ -10224,15 +10127,14 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U128, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U128 + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10258,11 +10160,10 @@ Module fmt. [] |), [ - BinOp.Panic.sub (| - Integer.U128, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U128 + (M.read (| n |)) + (Value.Integer 1) ] |)) |)) in @@ -10271,25 +10172,23 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -10323,7 +10222,7 @@ Module fmt. let exponent := M.copy (| γ0_1 |) in let trailing_zeros := M.copy (| γ0_2 |) in let added_precision := M.copy (| γ0_3 |) in - let buf := + let~ buf := M.alloc (| repeat (M.call_closure (| @@ -10338,7 +10237,7 @@ Module fmt. |)) 40 |) in - let curr := + let~ curr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10355,7 +10254,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let buf_ptr := + let~ buf_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10368,7 +10267,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let lut_ptr := + let~ lut_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10385,7 +10284,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -10403,30 +10302,27 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - M.rust_cast - (BinOp.Panic.rem (| - Integer.U128, - M.read (| n |), - Value.Integer 100 - |)), - Value.Integer 1 - |) + BinOp.Wrap.shl + (M.rust_cast + (BinOp.Wrap.rem + Integer.U128 + (M.read (| n |)) + (Value.Integer 100))) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 2 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 2) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -10455,25 +10351,23 @@ Module fmt. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - Value.Integer 100 - |) + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (Value.Integer 100) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -10481,7 +10375,7 @@ Module fmt. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -10492,8 +10386,8 @@ Module fmt. ] |))) |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in - let _ := + let~ n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10509,18 +10403,14 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10530,42 +10420,32 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - BinOp.Panic.add (| - Integer.U8, - BinOp.Panic.rem (| - Integer.U8, - M.rust_cast (M.read (| n |)), - Value.Integer 10 - |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (BinOp.Wrap.rem + Integer.U8 + (M.rust_cast (M.read (| n |))) + (Value.Integer 10)) + (M.read (| UnsupportedLiteral |)) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.Isize, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div Integer.Isize (M.read (| β |)) (Value.Integer 10) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10589,17 +10469,13 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10615,15 +10491,15 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let buf_slice := + let~ buf_slice := M.copy (| - let _ := + let~ _ := let β := curr in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10633,17 +10509,16 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - BinOp.Panic.add (| - Integer.U8, - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (M.rust_cast (M.read (| n |))) + (M.read (| UnsupportedLiteral |)) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -10656,9 +10531,8 @@ Module fmt. [] |), [ (* Unsize *) M.pointer_coercion buf ] - |), - M.read (| M.use curr |) - |) + |)) + (M.read (| M.use curr |)) |) in M.alloc (| M.call_closure (| @@ -10682,7 +10556,7 @@ Module fmt. |) |) |) in - let exp_buf := + let~ exp_buf := M.alloc (| repeat (M.call_closure (| @@ -10697,7 +10571,7 @@ Module fmt. |)) 3 |) in - let exp_ptr := + let~ exp_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10710,9 +10584,9 @@ Module fmt. [ (* Unsize *) M.pointer_coercion exp_buf ] |) |) in - let exp_slice := + let~ exp_slice := M.copy (| - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10740,7 +10614,7 @@ Module fmt. |) |) |) in - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10757,7 +10631,7 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10767,20 +10641,19 @@ Module fmt. |), [ M.read (| exp_ptr |); Value.Integer 1 ] |), - BinOp.Panic.add (| - Integer.U8, - M.rust_cast (M.read (| exponent |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (M.rust_cast (M.read (| exponent |))) + (M.read (| UnsupportedLiteral |)) |) in M.alloc (| Value.Integer 2 |))); fun γ => ltac:(M.monadic - (let off := + (let~ off := M.alloc (| - BinOp.Panic.shl (| M.read (| exponent |), Value.Integer 1 |) + BinOp.Wrap.shl (M.read (| exponent |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -10825,7 +10698,7 @@ Module fmt. |) |) |) in - let parts := + let~ parts := M.alloc (| M.alloc (| Value.Array @@ -10842,7 +10715,7 @@ Module fmt. ] |) |) in - let sign := + let~ sign := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10895,7 +10768,7 @@ Module fmt. ] |) |) in - let formatted := + let~ formatted := M.alloc (| Value.StructRecord "core::num::fmt::Formatted" @@ -10944,9 +10817,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -11032,9 +10905,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -11120,9 +10993,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -11208,9 +11081,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -11369,7 +11242,7 @@ Module fmt. let buf := M.alloc (| buf |) in let curr := M.alloc (| curr |) in M.read (| - let buf_ptr := + let~ buf_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11380,7 +11253,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion (M.read (| buf |)) ] |) |) in - let lut_ptr := + let~ lut_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11397,7 +11270,7 @@ Module fmt. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11421,7 +11294,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11435,151 +11308,125 @@ Module fmt. (M.rust_cast (M.read (| UnsupportedLiteral |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let to_parse := + let~ to_parse := M.alloc (| - BinOp.Panic.rem (| - Integer.U64, - M.read (| n |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |) + BinOp.Wrap.rem + Integer.U64 + (M.read (| n |)) + (M.rust_cast (M.read (| UnsupportedLiteral |))) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (M.rust_cast (M.read (| UnsupportedLiteral |))) |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d2 := + let~ d2 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d3 := + let~ d3 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d4 := + let~ d4 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d5 := + let~ d5 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d6 := + let~ d6 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d7 := + let~ d7 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d8 := + let~ d8 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 16 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 16) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11603,18 +11450,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 0 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 0) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11638,18 +11484,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 2) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11673,18 +11518,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 4 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 4) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11708,18 +11552,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 6 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 6) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11743,18 +11586,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 8 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 8) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11778,18 +11620,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 10 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 10) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11813,18 +11654,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 12 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 12) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11848,11 +11688,10 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 14 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 14) ] |); Value.Integer 2 @@ -11863,7 +11702,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11877,91 +11716,77 @@ Module fmt. (M.rust_cast (M.read (| UnsupportedLiteral |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let to_parse := + let~ to_parse := M.alloc (| - BinOp.Panic.rem (| - Integer.U64, - M.read (| n |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |) + BinOp.Wrap.rem + Integer.U64 + (M.read (| n |)) + (M.rust_cast (M.read (| UnsupportedLiteral |))) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (M.rust_cast (M.read (| UnsupportedLiteral |))) |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d2 := + let~ d2 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d3 := + let~ d3 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let d4 := + let~ d4 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.read (| to_parse |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.read (| to_parse |)) + (M.rust_cast (M.read (| UnsupportedLiteral |)))) + (Value.Integer 100)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 8 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 8) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -11985,18 +11810,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 0 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 0) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12020,18 +11844,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 2) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12055,18 +11878,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 4 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 4) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12090,11 +11912,10 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 6 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 6) ] |); Value.Integer 2 @@ -12105,8 +11926,8 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in - let _ := + let~ n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12120,53 +11941,41 @@ Module fmt. (M.rust_cast (M.read (| UnsupportedLiteral |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let to_parse := + let~ to_parse := M.alloc (| - BinOp.Panic.rem (| - Integer.U32, - M.read (| n |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |) + BinOp.Wrap.rem + Integer.U32 + (M.read (| n |)) + (M.rust_cast (M.read (| UnsupportedLiteral |))) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| - Integer.U32, - M.read (| β |), - M.rust_cast (M.read (| UnsupportedLiteral |)) - |) + BinOp.Wrap.div + Integer.U32 + (M.read (| β |)) + (M.rust_cast (M.read (| UnsupportedLiteral |))) |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.div (| - Integer.U32, - M.read (| to_parse |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.div Integer.U32 (M.read (| to_parse |)) (Value.Integer 100)) + (Value.Integer 1) |) in - let d2 := + let~ d2 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| - Integer.U32, - M.read (| to_parse |), - Value.Integer 100 - |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem Integer.U32 (M.read (| to_parse |)) (Value.Integer 100)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 4 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 4) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12190,18 +11999,17 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 0 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 0) ] |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12225,11 +12033,10 @@ Module fmt. |), [ M.read (| buf_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.read (| curr |) |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.read (| curr |) |)) + (Value.Integer 2) ] |); Value.Integer 2 @@ -12240,8 +12047,8 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let n := M.alloc (| M.rust_cast (M.read (| n |)) |) in - let _ := + let~ n := M.alloc (| M.rust_cast (M.read (| n |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12250,26 +12057,25 @@ Module fmt. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (Value.Integer 100) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let d1 := + let~ d1 := M.alloc (| - BinOp.Panic.shl (| - BinOp.Panic.rem (| Integer.U16, M.read (| n |), Value.Integer 100 |), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Wrap.rem Integer.U16 (M.read (| n |)) (Value.Integer 100)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.div (| Integer.U16, M.read (| β |), Value.Integer 100 |) + BinOp.Wrap.div Integer.U16 (M.read (| β |)) (Value.Integer 100) |) in - let _ := + let~ _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12309,13 +12115,13 @@ Module fmt. (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| n |)) (Value.Integer 10) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -12325,24 +12131,22 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| M.read (| curr |) |) ] |), - BinOp.Panic.add (| - Integer.U8, - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (M.rust_cast (M.read (| n |))) + (M.read (| UnsupportedLiteral |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let d1 := - M.alloc (| BinOp.Panic.shl (| M.read (| n |), Value.Integer 1 |) |) in - let _ := + (let~ d1 := M.alloc (| BinOp.Wrap.shl (M.read (| n |)) (Value.Integer 1) |) in + let~ _ := let β := M.read (| curr |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12430,9 +12234,9 @@ Module fmt. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_nonnegative := + let~ is_nonnegative := M.alloc (| BinOp.Pure.ge (M.read (| M.read (| self |) |)) (Value.Integer 0) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -12556,7 +12360,7 @@ Module fmt. let is_nonnegative := M.alloc (| is_nonnegative |) in let f := M.alloc (| f |) in M.read (| - let buf := + let~ buf := M.alloc (| repeat (M.call_closure (| @@ -12569,7 +12373,7 @@ Module fmt. |)) 39 |) in - let curr := + let~ curr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12597,14 +12401,14 @@ Module fmt. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let n := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::fmt::num::parse_u64_into", [] |), [ M.read (| rem |); buf; curr ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12620,11 +12424,11 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let target := + let~ target := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -12637,12 +12441,11 @@ Module fmt. [] |), [ (* Unsize *) M.pointer_coercion buf ] - |), - Value.Integer 19 - |) + |)) + (Value.Integer 19) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12671,16 +12474,15 @@ Module fmt. ] |); M.read (| UnsupportedLiteral |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| curr |), - M.read (| target |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| curr |)) + (M.read (| target |)) ] |) |) in M.alloc (| Value.Tuple [] |) in - let _ := M.write (| curr, M.read (| target |) |) in + let~ _ := M.write (| curr, M.read (| target |) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12695,7 +12497,7 @@ Module fmt. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let n := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12720,11 +12522,11 @@ Module fmt. M.read (| γ |), Value.Bool true |) in - let target := + let~ target := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -12738,11 +12540,10 @@ Module fmt. [] |), [ (* Unsize *) M.pointer_coercion buf ] - |), - Value.Integer 38 - |) + |)) + (Value.Integer 38) |) in - let buf_ptr := + let~ buf_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12756,7 +12557,7 @@ Module fmt. [ (* Unsize *) M.pointer_coercion buf ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -12776,24 +12577,22 @@ Module fmt. ] |); M.read (| UnsupportedLiteral |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| curr |), - M.read (| target |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| curr |)) + (M.read (| target |)) ] |) |) in - let _ := + let~ _ := M.write (| curr, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| target |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| target |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -12803,11 +12602,10 @@ Module fmt. |), [ M.read (| buf_ptr |); M.read (| curr |) ] |), - BinOp.Panic.add (| - Integer.U8, - M.rust_cast (M.read (| n |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.add + Integer.U8 + (M.rust_cast (M.read (| n |))) + (M.read (| UnsupportedLiteral |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -12818,7 +12616,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let buf_slice := + let~ buf_slice := M.alloc (| M.call_closure (| M.get_function (| "core::str::converts::from_utf8_unchecked", [] |), @@ -12851,9 +12649,9 @@ Module fmt. M.read (| curr |) ] |)); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -12866,9 +12664,8 @@ Module fmt. [] |), [ (* Unsize *) M.pointer_coercion buf ] - |), - M.read (| curr |) - |) + |)) + (M.read (| curr |)) ] |) ] @@ -12918,7 +12715,7 @@ Module fmt. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let quot := + let~ quot := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -12930,26 +12727,24 @@ Module fmt. (M.alloc (| BinOp.Pure.lt (M.read (| n |)) - (BinOp.Panic.shl (| Value.Integer 1, Value.Integer 83 |)) + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 83)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| M.rust_cast - (BinOp.Panic.div (| - Integer.U64, - M.rust_cast (BinOp.Panic.shr (| M.read (| n |), Value.Integer 19 |)), - BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::fmt::num::udiv_1e19::DIV" |) |), - Value.Integer 19 - |) - |)) + (BinOp.Wrap.div + Integer.U64 + (M.rust_cast (BinOp.Wrap.shr (M.read (| n |)) (Value.Integer 19))) + (BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::fmt::num::udiv_1e19::DIV" |) |)) + (Value.Integer 19))) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.shr (| - M.call_closure (| + BinOp.Wrap.shr + (M.call_closure (| M.get_function (| "core::fmt::num::u128_mulhi", [] |), [ M.read (| n |); @@ -12957,26 +12752,23 @@ Module fmt. M.get_constant (| "core::fmt::num::udiv_1e19::FACTOR" |) |) ] - |), - Value.Integer 62 - |) + |)) + (Value.Integer 62) |))) ] |) |) in - let rem := + let~ rem := M.alloc (| M.rust_cast - (BinOp.Panic.sub (| - Integer.U128, - M.read (| n |), - BinOp.Panic.mul (| - Integer.U128, - M.read (| quot |), - M.rust_cast - (M.read (| M.get_constant (| "core::fmt::num::udiv_1e19::DIV" |) |)) - |) - |)) + (BinOp.Wrap.sub + Integer.U128 + (M.read (| n |)) + (BinOp.Wrap.mul + Integer.U128 + (M.read (| quot |)) + (M.rust_cast + (M.read (| M.get_constant (| "core::fmt::num::udiv_1e19::DIV" |) |))))) |) in M.alloc (| Value.Tuple [ M.read (| quot |); M.read (| rem |) ] |) |))) @@ -13019,66 +12811,56 @@ Module fmt. (let x := M.alloc (| x |) in let y := M.alloc (| y |) in M.read (| - let x_lo := M.alloc (| M.rust_cast (M.read (| x |)) |) in - let x_hi := - M.alloc (| M.rust_cast (BinOp.Panic.shr (| M.read (| x |), Value.Integer 64 |)) |) in - let y_lo := M.alloc (| M.rust_cast (M.read (| y |)) |) in - let y_hi := - M.alloc (| M.rust_cast (BinOp.Panic.shr (| M.read (| y |), Value.Integer 64 |)) |) in - let carry := + let~ x_lo := M.alloc (| M.rust_cast (M.read (| x |)) |) in + let~ x_hi := + M.alloc (| M.rust_cast (BinOp.Wrap.shr (M.read (| x |)) (Value.Integer 64)) |) in + let~ y_lo := M.alloc (| M.rust_cast (M.read (| y |)) |) in + let~ y_hi := + M.alloc (| M.rust_cast (BinOp.Wrap.shr (M.read (| y |)) (Value.Integer 64)) |) in + let~ carry := M.alloc (| - BinOp.Panic.shr (| - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast (M.read (| x_lo |)), - M.rust_cast (M.read (| y_lo |)) - |), - Value.Integer 64 - |) + BinOp.Wrap.shr + (BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| x_lo |))) + (M.rust_cast (M.read (| y_lo |)))) + (Value.Integer 64) |) in - let m := + let~ m := M.alloc (| - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast (M.read (| x_lo |)), - M.rust_cast (M.read (| y_hi |)) - |), - M.read (| carry |) - |) + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| x_lo |))) + (M.rust_cast (M.read (| y_hi |)))) + (M.read (| carry |)) |) in - let high1 := M.alloc (| BinOp.Panic.shr (| M.read (| m |), Value.Integer 64 |) |) in - let m_lo := M.alloc (| M.rust_cast (M.read (| m |)) |) in - let high2 := + let~ high1 := M.alloc (| BinOp.Wrap.shr (M.read (| m |)) (Value.Integer 64) |) in + let~ m_lo := M.alloc (| M.rust_cast (M.read (| m |)) |) in + let~ high2 := M.alloc (| - BinOp.Panic.shr (| - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast (M.read (| x_hi |)), - M.rust_cast (M.read (| y_lo |)) - |), - M.rust_cast (M.read (| m_lo |)) - |), - Value.Integer 64 - |) + BinOp.Wrap.shr + (BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| x_hi |))) + (M.rust_cast (M.read (| y_lo |)))) + (M.rust_cast (M.read (| m_lo |)))) + (Value.Integer 64) |) in M.alloc (| - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast (M.read (| x_hi |)), - M.rust_cast (M.read (| y_hi |)) - |), - M.read (| high1 |) - |), - M.read (| high2 |) - |) + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| x_hi |))) + (M.rust_cast (M.read (| y_hi |)))) + (M.read (| high1 |))) + (M.read (| high2 |)) |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/fmt/rt.v b/CoqOfRust/core/fmt/rt.v index 6529aa8af..9767ca0d4 100644 --- a/CoqOfRust/core/fmt/rt.v +++ b/CoqOfRust/core/fmt/rt.v @@ -208,7 +208,7 @@ Module fmt. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -218,7 +218,7 @@ Module fmt. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -953,7 +953,7 @@ Module fmt. fun γ => ltac:(M.monadic (M.read (| - let _v := + let~ _v := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/future/join.v b/CoqOfRust/core/future/join.v index 2012eaf83..b975ceb03 100644 --- a/CoqOfRust/core/future/join.v +++ b/CoqOfRust/core/future/join.v @@ -150,7 +150,7 @@ Module future. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.call_closure (| M.get_associated_function (| @@ -191,7 +191,7 @@ Module future. 0 |) in let f := M.alloc (| γ0_0 |) in - let val := + let~ val := M.copy (| M.match_operator (| M.alloc (| @@ -231,7 +231,12 @@ Module future. t)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::task::poll::Poll::Pending" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -245,7 +250,7 @@ Module future. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -280,7 +285,9 @@ Module future. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::future::join::MaybeDone::Taken" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), diff --git a/CoqOfRust/core/hash/mod.v b/CoqOfRust/core/hash/mod.v index 89aebd9e3..f97c81285 100644 --- a/CoqOfRust/core/hash/mod.v +++ b/CoqOfRust/core/hash/mod.v @@ -31,7 +31,7 @@ Module hash. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -48,7 +48,9 @@ Module hash. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -317,7 +319,7 @@ Module hash. (let self := M.alloc (| self |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_usize", [] |), @@ -338,7 +340,7 @@ Module hash. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write", [] |), @@ -351,7 +353,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", Self, [], "write_u8", [] |), @@ -708,14 +710,14 @@ Module hash. (let self := M.alloc (| self |) in let x := M.alloc (| x |) in M.read (| - let hasher := + let~ hasher := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::BuildHasher", Self, [], "build_hasher", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ Ty.associated ] |), @@ -959,7 +961,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -969,7 +971,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1045,7 +1047,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1055,7 +1057,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1131,7 +1133,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1141,7 +1143,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1217,7 +1219,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1227,7 +1229,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1303,7 +1305,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1313,7 +1315,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1389,7 +1391,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1399,7 +1401,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1475,7 +1477,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1485,7 +1487,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1561,7 +1563,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1571,7 +1573,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1647,7 +1649,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1657,7 +1659,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1733,7 +1735,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1743,7 +1745,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1819,7 +1821,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1829,7 +1831,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1905,7 +1907,7 @@ Module hash. (let data := M.alloc (| data |) in let state := M.alloc (| state |) in M.read (| - let newlen := + let~ newlen := M.alloc (| M.call_closure (| M.get_function (| @@ -1915,7 +1917,7 @@ Module hash. [ M.read (| data |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -2025,7 +2027,7 @@ Module hash. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_str", [] |), @@ -2120,7 +2122,7 @@ Module hash. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let value_T := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), @@ -2169,14 +2171,14 @@ Module hash. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let value_T := M.alloc (| γ0_0 |) in let value_B := M.alloc (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), @@ -2227,21 +2229,21 @@ Module hash. let value_T := M.alloc (| γ0_0 |) in let value_B := M.alloc (| γ0_1 |) in let value_C := M.alloc (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), @@ -2294,28 +2296,28 @@ Module hash. let value_B := M.alloc (| γ0_1 |) in let value_C := M.alloc (| γ0_2 |) in let value_D := M.alloc (| γ0_3 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), @@ -2370,35 +2372,35 @@ Module hash. let value_C := M.alloc (| γ0_2 |) in let value_D := M.alloc (| γ0_3 |) in let value_E := M.alloc (| γ0_4 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), @@ -2455,42 +2457,42 @@ Module hash. let value_D := M.alloc (| γ0_3 |) in let value_E := M.alloc (| γ0_4 |) in let value_F := M.alloc (| γ0_5 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), [ M.read (| value_E |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", F, [], "hash", [ S ] |), @@ -2549,49 +2551,49 @@ Module hash. let value_E := M.alloc (| γ0_4 |) in let value_F := M.alloc (| γ0_5 |) in let value_G := M.alloc (| γ0_6 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), [ M.read (| value_E |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", F, [], "hash", [ S ] |), [ M.read (| value_F |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", G, [], "hash", [ S ] |), @@ -2652,56 +2654,56 @@ Module hash. let value_F := M.alloc (| γ0_5 |) in let value_G := M.alloc (| γ0_6 |) in let value_H := M.alloc (| γ0_7 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), [ M.read (| value_E |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", F, [], "hash", [ S ] |), [ M.read (| value_F |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", G, [], "hash", [ S ] |), [ M.read (| value_G |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", H, [], "hash", [ S ] |), @@ -2764,63 +2766,63 @@ Module hash. let value_G := M.alloc (| γ0_6 |) in let value_H := M.alloc (| γ0_7 |) in let value_I := M.alloc (| γ0_8 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), [ M.read (| value_E |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", F, [], "hash", [ S ] |), [ M.read (| value_F |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", G, [], "hash", [ S ] |), [ M.read (| value_G |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", H, [], "hash", [ S ] |), [ M.read (| value_H |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", I, [], "hash", [ S ] |), @@ -2886,70 +2888,70 @@ Module hash. let value_H := M.alloc (| γ0_7 |) in let value_I := M.alloc (| γ0_8 |) in let value_J := M.alloc (| γ0_9 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), [ M.read (| value_E |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", F, [], "hash", [ S ] |), [ M.read (| value_F |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", G, [], "hash", [ S ] |), [ M.read (| value_G |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", H, [], "hash", [ S ] |), [ M.read (| value_H |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", I, [], "hash", [ S ] |), [ M.read (| value_I |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", J, [], "hash", [ S ] |), @@ -3017,77 +3019,77 @@ Module hash. let value_I := M.alloc (| γ0_8 |) in let value_J := M.alloc (| γ0_9 |) in let value_K := M.alloc (| γ0_10 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), [ M.read (| value_E |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", F, [], "hash", [ S ] |), [ M.read (| value_F |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", G, [], "hash", [ S ] |), [ M.read (| value_G |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", H, [], "hash", [ S ] |), [ M.read (| value_H |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", I, [], "hash", [ S ] |), [ M.read (| value_I |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", J, [], "hash", [ S ] |), [ M.read (| value_J |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", K, [], "hash", [ S ] |), @@ -3157,84 +3159,84 @@ Module hash. let value_J := M.alloc (| γ0_9 |) in let value_K := M.alloc (| γ0_10 |) in let value_L := M.alloc (| γ0_11 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ S ] |), [ M.read (| value_T |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", B, [], "hash", [ S ] |), [ M.read (| value_B |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", C, [], "hash", [ S ] |), [ M.read (| value_C |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", D, [], "hash", [ S ] |), [ M.read (| value_D |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", E, [], "hash", [ S ] |), [ M.read (| value_E |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", F, [], "hash", [ S ] |), [ M.read (| value_F |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", G, [], "hash", [ S ] |), [ M.read (| value_G |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", H, [], "hash", [ S ] |), [ M.read (| value_H |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", I, [], "hash", [ S ] |), [ M.read (| value_I |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", J, [], "hash", [ S ] |), [ M.read (| value_J |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", K, [], "hash", [ S ] |), [ M.read (| value_K |); M.read (| state |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", L, [], "hash", [ S ] |), @@ -3274,7 +3276,7 @@ Module hash. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_length_prefix", [] |), @@ -3322,7 +3324,7 @@ Module hash. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ H ] |), @@ -3359,7 +3361,7 @@ Module hash. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", T, [], "hash", [ H ] |), @@ -3416,7 +3418,7 @@ Module hash. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let address := M.copy (| γ0_0 |) in let metadata := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_usize", [] |), @@ -3433,7 +3435,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3498,7 +3500,7 @@ Module hash. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let address := M.copy (| γ0_0 |) in let metadata := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hasher", H, [], "write_usize", [] |), @@ -3515,7 +3517,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/hash/sip.v b/CoqOfRust/core/hash/sip.v index 246decfed..6599561f5 100644 --- a/CoqOfRust/core/hash/sip.v +++ b/CoqOfRust/core/hash/sip.v @@ -420,7 +420,7 @@ Module hash. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let names := + let~ names := M.alloc (| M.alloc (| Value.Array @@ -435,7 +435,7 @@ Module hash. ] |) |) in - let values := + let~ values := M.alloc (| (* Unsize *) M.pointer_coercion @@ -674,7 +674,7 @@ Module hash. let start := M.alloc (| start |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -682,7 +682,7 @@ Module hash. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -714,9 +714,9 @@ Module hash. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let i := M.alloc (| Value.Integer 0 |) in - let out := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ out := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -726,16 +726,16 @@ Module hash. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.add (| Integer.Usize, M.read (| i |), Value.Integer 3 |)) + (BinOp.Wrap.add Integer.Usize (M.read (| i |)) (Value.Integer 3)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| out, M.rust_cast (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -747,7 +747,7 @@ Module hash. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -758,21 +758,19 @@ Module hash. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| i |) - |), - M.call_closure (| + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| i |))) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u32" ] |), [] - |) - |)) + |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -813,8 +811,8 @@ Module hash. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let data := M.copy (| M.use (M.alloc (| Value.Integer 0 |)) |) in - let _ := + let~ data := M.copy (| M.use (M.alloc (| Value.Integer 0 |)) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -837,11 +835,10 @@ Module hash. |), [ M.read (| buf |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| i |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| i |)) ] |); M.rust_cast (M.read (| M.use (M.alloc (| data |)) |)); @@ -863,17 +860,17 @@ Module hash. |) |)) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 4 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 4) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -883,20 +880,20 @@ Module hash. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.add (| Integer.Usize, M.read (| i |), Value.Integer 1 |)) + (BinOp.Wrap.add Integer.Usize (M.read (| i |)) (Value.Integer 1)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := out in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| - M.rust_cast + (BinOp.Wrap.shl + (M.rust_cast (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -908,7 +905,7 @@ Module hash. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -919,21 +916,19 @@ Module hash. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| i |) - |), - M.call_closure (| + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| i |))) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u16" ] |), [] - |) - |)) + |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -974,8 +969,8 @@ Module hash. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let data := M.copy (| M.use (M.alloc (| Value.Integer 0 |)) |) in - let _ := + let~ data := M.copy (| M.use (M.alloc (| Value.Integer 0 |)) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -998,11 +993,10 @@ Module hash. |), [ M.read (| buf |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| i |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| i |)) ] |); M.rust_cast (M.read (| M.use (M.alloc (| data |)) |)); @@ -1022,19 +1016,18 @@ Module hash. [ M.read (| data |) ] |) |) - |)), - BinOp.Panic.mul (| Integer.Usize, M.read (| i |), Value.Integer 8 |) - |)) + |))) + (BinOp.Wrap.mul Integer.Usize (M.read (| i |)) (Value.Integer 8))) |) in let β := i in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 2) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1043,14 +1036,14 @@ Module hash. (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| i |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := out in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| - M.rust_cast + (BinOp.Wrap.shl + (M.rust_cast (M.read (| M.call_closure (| M.get_associated_function (| @@ -1060,28 +1053,26 @@ Module hash. |), [ M.read (| buf |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| i |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| i |)) ] |) - |)), - BinOp.Panic.mul (| Integer.Usize, M.read (| i |), Value.Integer 8 |) - |)) + |))) + (BinOp.Wrap.mul Integer.Usize (M.read (| i |)) (Value.Integer 8))) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1089,7 +1080,7 @@ Module hash. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1274,7 +1265,7 @@ Module hash. (let key0 := M.alloc (| key0 |) in let key1 := M.alloc (| key1 |) in M.read (| - let state := + let~ state := M.alloc (| Value.StructRecord "core::hash::sip::Hasher" @@ -1296,7 +1287,7 @@ Module hash. ("_marker", Value.StructTuple "core::marker::PhantomData" []) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1333,7 +1324,7 @@ Module hash. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1342,7 +1333,7 @@ Module hash. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1363,7 +1354,7 @@ Module hash. |)) (Value.Integer 8317987319222330741) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1384,7 +1375,7 @@ Module hash. |)) (Value.Integer 7237128888997146477) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1405,7 +1396,7 @@ Module hash. |)) (Value.Integer 7816392313619706465) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1426,7 +1417,7 @@ Module hash. |)) (Value.Integer 8387220255154660723) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1497,7 +1488,7 @@ Module hash. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1624,7 +1615,7 @@ Module hash. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1755,7 +1746,7 @@ Module hash. M.catch_return (| ltac:(M.monadic (M.read (| - let length := + let~ length := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1766,7 +1757,7 @@ Module hash. [ M.read (| msg |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1775,10 +1766,10 @@ Module hash. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| length |) |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| length |)) |) in - let needed := M.alloc (| Value.Integer 0 |) in - let _ := + let~ needed := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1799,22 +1790,21 @@ Module hash. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| needed, - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 8, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (Value.Integer 8) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "ntail" |) - |) - |) + |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1825,8 +1815,8 @@ Module hash. β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| - M.call_closure (| + (BinOp.Wrap.shl + (M.call_closure (| M.get_function (| "core::hash::sip::u8to64_le", [] |), [ M.read (| msg |); @@ -1839,19 +1829,17 @@ Module hash. [ M.read (| length |); M.read (| needed |) ] |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 8, - M.read (| + |)) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 8) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::hash::sip::Hasher", "ntail" |) - |) - |) - |)) + |)))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1871,7 +1859,7 @@ Module hash. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1880,11 +1868,10 @@ Module hash. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| length |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| length |)) |) in M.return_ (| Value.Tuple [] |) |) @@ -1892,7 +1879,7 @@ Module hash. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1915,7 +1902,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1934,7 +1921,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -1957,7 +1944,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1972,14 +1959,14 @@ Module hash. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| length |), M.read (| needed |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| length |)) (M.read (| needed |)) |) in - let left := + let~ left := M.alloc (| BinOp.Pure.bit_and (M.read (| len |)) (Value.Integer 7) |) in - let i := M.copy (| needed |) in - let _ := + let~ i := M.copy (| needed |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1992,20 +1979,19 @@ Module hash. (M.alloc (| BinOp.Pure.lt (M.read (| i |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| left |) - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| left |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let mi := + let~ mi := M.copy (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2017,7 +2003,7 @@ Module hash. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2028,17 +2014,16 @@ Module hash. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.call_closure (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u64" ] |), [] - |) - |)) + |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -2080,9 +2065,9 @@ Module hash. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let data := + let~ data := M.copy (| M.use (M.alloc (| Value.Integer 0 |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2126,7 +2111,7 @@ Module hash. |) |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2141,7 +2126,7 @@ Module hash. β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| mi |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2160,7 +2145,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2175,15 +2160,11 @@ Module hash. β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| mi |)) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 8 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 8) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2191,7 +2172,7 @@ Module hash. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2202,7 +2183,7 @@ Module hash. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2214,7 +2195,7 @@ Module hash. [ M.read (| msg |); M.read (| i |); M.read (| left |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2245,7 +2226,7 @@ Module hash. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2264,7 +2245,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2305,7 +2286,7 @@ Module hash. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let state := + let~ state := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2313,11 +2294,11 @@ Module hash. "state" |) |) in - let b := + let~ b := M.alloc (| BinOp.Pure.bit_or - (BinOp.Panic.shl (| - BinOp.Pure.bit_and + (BinOp.Wrap.shl + (BinOp.Pure.bit_and (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| @@ -2326,9 +2307,8 @@ Module hash. "length" |) |))) - (Value.Integer 255), - Value.Integer 56 - |)) + (Value.Integer 255)) + (Value.Integer 56)) (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2337,7 +2317,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| state, @@ -2345,14 +2325,14 @@ Module hash. "v3" |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::sip::Sip", S, [], "c_rounds", [] |), [ state ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| state, @@ -2360,7 +2340,7 @@ Module hash. "v0" |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| state, @@ -2368,7 +2348,7 @@ Module hash. "v2" |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (Value.Integer 255) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::sip::Sip", S, [], "d_rounds", [] |), @@ -2637,8 +2617,8 @@ Module hash. ltac:(M.monadic (let state := M.alloc (| state |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2665,7 +2645,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2686,7 +2666,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2705,7 +2685,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2726,7 +2706,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2753,7 +2733,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2774,7 +2754,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2793,7 +2773,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2820,7 +2800,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2841,7 +2821,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2860,7 +2840,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2887,7 +2867,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2908,7 +2888,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2927,7 +2907,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2967,8 +2947,8 @@ Module hash. ltac:(M.monadic (let state := M.alloc (| state |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -2995,7 +2975,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3016,7 +2996,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3035,7 +3015,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3056,7 +3036,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3083,7 +3063,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3104,7 +3084,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3123,7 +3103,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3150,7 +3130,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3171,7 +3151,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3190,7 +3170,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3217,7 +3197,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3238,7 +3218,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3257,7 +3237,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3279,8 +3259,8 @@ Module hash. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3307,7 +3287,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3328,7 +3308,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3347,7 +3327,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3368,7 +3348,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3395,7 +3375,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3416,7 +3396,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3435,7 +3415,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3462,7 +3442,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3483,7 +3463,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3502,7 +3482,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3529,7 +3509,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3550,7 +3530,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3569,7 +3549,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3591,8 +3571,8 @@ Module hash. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3619,7 +3599,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3640,7 +3620,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3659,7 +3639,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3680,7 +3660,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3707,7 +3687,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3728,7 +3708,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3747,7 +3727,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3774,7 +3754,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3795,7 +3775,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3814,7 +3794,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3841,7 +3821,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3862,7 +3842,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -3881,7 +3861,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4004,8 +3984,8 @@ Module hash. ltac:(M.monadic (let state := M.alloc (| state |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4032,7 +4012,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4053,7 +4033,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4072,7 +4052,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4093,7 +4073,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4120,7 +4100,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4141,7 +4121,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4160,7 +4140,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4187,7 +4167,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4208,7 +4188,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4227,7 +4207,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4254,7 +4234,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4275,7 +4255,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4294,7 +4274,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4316,8 +4296,8 @@ Module hash. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4344,7 +4324,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4365,7 +4345,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4384,7 +4364,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4405,7 +4385,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4432,7 +4412,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4453,7 +4433,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4472,7 +4452,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4499,7 +4479,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4520,7 +4500,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4539,7 +4519,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4566,7 +4546,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4587,7 +4567,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4606,7 +4586,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4647,8 +4627,8 @@ Module hash. ltac:(M.monadic (let state := M.alloc (| state |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4675,7 +4655,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4696,7 +4676,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4715,7 +4695,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4736,7 +4716,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4763,7 +4743,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4784,7 +4764,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4803,7 +4783,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4830,7 +4810,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4851,7 +4831,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4870,7 +4850,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4897,7 +4877,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4918,7 +4898,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4937,7 +4917,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4959,8 +4939,8 @@ Module hash. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -4987,7 +4967,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5008,7 +4988,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5027,7 +5007,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5048,7 +5028,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5075,7 +5055,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5096,7 +5076,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5115,7 +5095,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5142,7 +5122,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5163,7 +5143,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5182,7 +5162,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5209,7 +5189,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5230,7 +5210,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5249,7 +5229,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5271,8 +5251,8 @@ Module hash. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5299,7 +5279,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5320,7 +5300,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5339,7 +5319,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5360,7 +5340,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5387,7 +5367,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5408,7 +5388,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5427,7 +5407,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5454,7 +5434,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5475,7 +5455,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5494,7 +5474,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5521,7 +5501,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5542,7 +5522,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5561,7 +5541,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5583,8 +5563,8 @@ Module hash. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5611,7 +5591,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5632,7 +5612,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5651,7 +5631,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5672,7 +5652,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5699,7 +5679,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5720,7 +5700,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5739,7 +5719,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5766,7 +5746,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5787,7 +5767,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5806,7 +5786,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5833,7 +5813,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5854,7 +5834,7 @@ Module hash. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| state |), @@ -5873,7 +5853,7 @@ Module hash. |) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| state |), diff --git a/CoqOfRust/core/hint.v b/CoqOfRust/core/hint.v index 4a6d5e5eb..2ced32a29 100644 --- a/CoqOfRust/core/hint.v +++ b/CoqOfRust/core/hint.v @@ -17,7 +17,7 @@ Module hint. | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -25,7 +25,7 @@ Module hint. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -101,7 +101,7 @@ Module hint. | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::core_arch::x86::sse2::_mm_pause", [] |), diff --git a/CoqOfRust/core/internal_macros.v b/CoqOfRust/core/internal_macros.v index 8b67c40a1..d24d4f735 100644 --- a/CoqOfRust/core/internal_macros.v +++ b/CoqOfRust/core/internal_macros.v @@ -388,7 +388,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -437,7 +437,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -616,7 +616,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -665,7 +665,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -844,7 +844,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -893,7 +893,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1072,7 +1072,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1121,7 +1121,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1300,7 +1300,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1349,7 +1349,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1569,7 +1569,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1618,7 +1618,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1797,7 +1797,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1846,7 +1846,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2025,7 +2025,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2074,7 +2074,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2253,7 +2253,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2301,7 +2301,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2480,7 +2480,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2528,7 +2528,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2707,7 +2707,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2755,7 +2755,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2934,7 +2934,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2982,7 +2982,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3161,7 +3161,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3209,7 +3209,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3429,7 +3429,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3477,7 +3477,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3656,7 +3656,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3704,7 +3704,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3883,7 +3883,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3931,7 +3931,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4110,7 +4110,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4158,7 +4158,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4337,7 +4337,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4385,7 +4385,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4564,7 +4564,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4612,7 +4612,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4791,7 +4791,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4839,7 +4839,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5018,7 +5018,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5066,7 +5066,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5286,7 +5286,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5334,7 +5334,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5513,7 +5513,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5561,7 +5561,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5740,7 +5740,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5788,7 +5788,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5967,7 +5967,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6015,7 +6015,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6194,7 +6194,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6242,7 +6242,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6421,7 +6421,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6469,7 +6469,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6648,7 +6648,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6696,7 +6696,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6875,7 +6875,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6923,7 +6923,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7143,7 +7143,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7191,7 +7191,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7370,7 +7370,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7418,7 +7418,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7597,7 +7597,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7645,7 +7645,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7824,7 +7824,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7872,7 +7872,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8051,7 +8051,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8099,7 +8099,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8278,7 +8278,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8326,7 +8326,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8505,7 +8505,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8553,7 +8553,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8732,7 +8732,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8780,7 +8780,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9000,7 +9000,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9048,7 +9048,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9227,7 +9227,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9275,7 +9275,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9454,7 +9454,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9502,7 +9502,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9681,7 +9681,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9729,7 +9729,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9908,7 +9908,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9956,7 +9956,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10135,7 +10135,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10183,7 +10183,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10362,7 +10362,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10410,7 +10410,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10589,7 +10589,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10637,7 +10637,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10857,7 +10857,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10905,7 +10905,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11084,7 +11084,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11132,7 +11132,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11311,7 +11311,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11359,7 +11359,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11538,7 +11538,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11587,7 +11587,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11766,7 +11766,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11815,7 +11815,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11994,7 +11994,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12043,7 +12043,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12222,7 +12222,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12271,7 +12271,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12450,7 +12450,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12499,7 +12499,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12719,7 +12719,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12768,7 +12768,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12947,7 +12947,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12996,7 +12996,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13175,7 +13175,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13224,7 +13224,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13403,7 +13403,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13451,7 +13451,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13630,7 +13630,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13678,7 +13678,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13857,7 +13857,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13905,7 +13905,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14084,7 +14084,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14132,7 +14132,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14311,7 +14311,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14359,7 +14359,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14579,7 +14579,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14627,7 +14627,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14806,7 +14806,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14854,7 +14854,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15033,7 +15033,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15081,7 +15081,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15260,7 +15260,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15308,7 +15308,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15487,7 +15487,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15535,7 +15535,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15714,7 +15714,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15762,7 +15762,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15941,7 +15941,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15989,7 +15989,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16168,7 +16168,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16216,7 +16216,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16436,7 +16436,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16484,7 +16484,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16663,7 +16663,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16711,7 +16711,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16890,7 +16890,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16938,7 +16938,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17117,7 +17117,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17165,7 +17165,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17344,7 +17344,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17392,7 +17392,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17571,7 +17571,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17619,7 +17619,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17798,7 +17798,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17846,7 +17846,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18025,7 +18025,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18073,7 +18073,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18293,7 +18293,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18341,7 +18341,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18520,7 +18520,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18568,7 +18568,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18747,7 +18747,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18795,7 +18795,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18974,7 +18974,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19022,7 +19022,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19201,7 +19201,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19249,7 +19249,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19428,7 +19428,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19476,7 +19476,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19655,7 +19655,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19703,7 +19703,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19882,7 +19882,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19930,7 +19930,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20150,7 +20150,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20198,7 +20198,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20377,7 +20377,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20425,7 +20425,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20604,7 +20604,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20652,7 +20652,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20831,7 +20831,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20879,7 +20879,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21058,7 +21058,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21106,7 +21106,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21285,7 +21285,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21333,7 +21333,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21512,7 +21512,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21560,7 +21560,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21739,7 +21739,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21787,7 +21787,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22007,7 +22007,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22055,7 +22055,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22234,7 +22234,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22282,7 +22282,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22461,7 +22461,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22509,7 +22509,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22921,7 +22921,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23085,7 +23085,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23251,7 +23251,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23417,7 +23417,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23583,7 +23583,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23749,7 +23749,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23915,7 +23915,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24081,7 +24081,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24247,7 +24247,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24413,7 +24413,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24579,7 +24579,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24745,7 +24745,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24909,7 +24909,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25073,7 +25073,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25239,7 +25239,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25405,7 +25405,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25571,7 +25571,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25737,7 +25737,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25903,7 +25903,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26069,7 +26069,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26235,7 +26235,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26401,7 +26401,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26567,7 +26567,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26733,7 +26733,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26912,7 +26912,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26960,7 +26960,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27139,7 +27139,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27187,7 +27187,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27366,7 +27366,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27414,7 +27414,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27593,7 +27593,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27641,7 +27641,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27820,7 +27820,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -27868,7 +27868,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28088,7 +28088,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28136,7 +28136,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28315,7 +28315,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28363,7 +28363,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28542,7 +28542,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28590,7 +28590,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28808,7 +28808,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -28855,7 +28855,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29032,7 +29032,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29079,7 +29079,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29256,7 +29256,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29303,7 +29303,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29480,7 +29480,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29527,7 +29527,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29704,7 +29704,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29751,7 +29751,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -29969,7 +29969,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30016,7 +30016,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30193,7 +30193,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30240,7 +30240,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30417,7 +30417,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30464,7 +30464,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30684,7 +30684,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30732,7 +30732,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30911,7 +30911,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -30959,7 +30959,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31138,7 +31138,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31186,7 +31186,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31365,7 +31365,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31413,7 +31413,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31592,7 +31592,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31640,7 +31640,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31860,7 +31860,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -31908,7 +31908,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32087,7 +32087,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32135,7 +32135,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32314,7 +32314,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32362,7 +32362,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32582,7 +32582,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32630,7 +32630,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32809,7 +32809,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -32857,7 +32857,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33036,7 +33036,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33084,7 +33084,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33263,7 +33263,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33311,7 +33311,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33490,7 +33490,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33538,7 +33538,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33758,7 +33758,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33806,7 +33806,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -33985,7 +33985,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34033,7 +34033,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34212,7 +34212,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34260,7 +34260,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34480,7 +34480,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34528,7 +34528,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34707,7 +34707,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34755,7 +34755,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34934,7 +34934,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -34982,7 +34982,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35161,7 +35161,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35209,7 +35209,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35388,7 +35388,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35436,7 +35436,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35656,7 +35656,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35704,7 +35704,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35883,7 +35883,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -35931,7 +35931,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36110,7 +36110,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36158,7 +36158,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36378,7 +36378,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36426,7 +36426,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36605,7 +36605,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36653,7 +36653,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36832,7 +36832,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36880,7 +36880,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37059,7 +37059,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37107,7 +37107,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37286,7 +37286,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37334,7 +37334,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37554,7 +37554,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37602,7 +37602,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37781,7 +37781,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -37829,7 +37829,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38008,7 +38008,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38056,7 +38056,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38276,7 +38276,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38324,7 +38324,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38503,7 +38503,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38551,7 +38551,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38730,7 +38730,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38778,7 +38778,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -38957,7 +38957,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39005,7 +39005,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39184,7 +39184,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39232,7 +39232,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39452,7 +39452,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39500,7 +39500,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39679,7 +39679,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39727,7 +39727,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39906,7 +39906,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -39954,7 +39954,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40172,7 +40172,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40219,7 +40219,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40396,7 +40396,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40443,7 +40443,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40620,7 +40620,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40667,7 +40667,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40844,7 +40844,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -40891,7 +40891,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41068,7 +41068,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41115,7 +41115,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41333,7 +41333,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41380,7 +41380,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41557,7 +41557,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41604,7 +41604,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41781,7 +41781,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -41828,7 +41828,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42048,7 +42048,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42096,7 +42096,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42275,7 +42275,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42323,7 +42323,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42502,7 +42502,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42550,7 +42550,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42729,7 +42729,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42777,7 +42777,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -42956,7 +42956,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43004,7 +43004,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43224,7 +43224,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43272,7 +43272,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43451,7 +43451,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43499,7 +43499,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43678,7 +43678,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43726,7 +43726,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43946,7 +43946,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -43994,7 +43994,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44173,7 +44173,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44221,7 +44221,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44400,7 +44400,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44448,7 +44448,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44627,7 +44627,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44675,7 +44675,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44854,7 +44854,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -44902,7 +44902,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45122,7 +45122,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45170,7 +45170,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45349,7 +45349,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45397,7 +45397,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45576,7 +45576,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45624,7 +45624,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45844,7 +45844,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -45892,7 +45892,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46071,7 +46071,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46119,7 +46119,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46298,7 +46298,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46346,7 +46346,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46525,7 +46525,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46573,7 +46573,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46752,7 +46752,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -46800,7 +46800,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47020,7 +47020,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47068,7 +47068,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47247,7 +47247,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47295,7 +47295,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47474,7 +47474,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47522,7 +47522,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47742,7 +47742,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47790,7 +47790,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -47969,7 +47969,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48017,7 +48017,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48196,7 +48196,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48244,7 +48244,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48423,7 +48423,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48471,7 +48471,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48650,7 +48650,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48698,7 +48698,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48918,7 +48918,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -48966,7 +48966,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -49145,7 +49145,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -49193,7 +49193,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -49372,7 +49372,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -49420,7 +49420,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -57952,7 +57952,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -57993,7 +57993,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58034,7 +58034,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58075,7 +58075,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58116,7 +58116,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58157,7 +58157,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58198,7 +58198,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58239,7 +58239,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58280,7 +58280,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58321,7 +58321,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58362,7 +58362,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58403,7 +58403,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58444,7 +58444,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58485,7 +58485,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58526,7 +58526,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58567,7 +58567,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58608,7 +58608,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58649,7 +58649,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58690,7 +58690,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58731,7 +58731,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58772,7 +58772,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58813,7 +58813,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58854,7 +58854,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58895,7 +58895,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58936,7 +58936,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58977,7 +58977,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59018,7 +59018,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59059,7 +59059,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59100,7 +59100,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59141,7 +59141,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59182,7 +59182,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59223,7 +59223,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59264,7 +59264,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59305,7 +59305,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59346,7 +59346,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59387,7 +59387,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59428,7 +59428,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59469,7 +59469,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59510,7 +59510,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59551,7 +59551,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59592,7 +59592,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59633,7 +59633,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59674,7 +59674,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59715,7 +59715,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59756,7 +59756,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59797,7 +59797,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59838,7 +59838,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59879,7 +59879,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59920,7 +59920,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59961,7 +59961,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60002,7 +60002,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60043,7 +60043,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60084,7 +60084,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60125,7 +60125,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60166,7 +60166,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60207,7 +60207,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60248,7 +60248,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60289,7 +60289,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60330,7 +60330,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60371,7 +60371,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60412,7 +60412,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60453,7 +60453,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60494,7 +60494,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60535,7 +60535,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60576,7 +60576,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60617,7 +60617,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60658,7 +60658,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60699,7 +60699,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60740,7 +60740,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -60781,7 +60781,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99499,7 +99499,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99540,7 +99540,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99581,7 +99581,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99622,7 +99622,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99663,7 +99663,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99704,7 +99704,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99745,7 +99745,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99786,7 +99786,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99827,7 +99827,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99868,7 +99868,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99909,7 +99909,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99950,7 +99950,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -99991,7 +99991,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100032,7 +100032,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100073,7 +100073,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100114,7 +100114,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100155,7 +100155,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100196,7 +100196,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100237,7 +100237,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100278,7 +100278,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100319,7 +100319,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100360,7 +100360,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100401,7 +100401,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100442,7 +100442,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100483,7 +100483,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100524,7 +100524,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100565,7 +100565,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100606,7 +100606,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100647,7 +100647,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100688,7 +100688,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100729,7 +100729,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100770,7 +100770,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100811,7 +100811,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100852,7 +100852,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100893,7 +100893,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100934,7 +100934,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100975,7 +100975,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101016,7 +101016,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101057,7 +101057,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101098,7 +101098,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101139,7 +101139,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101180,7 +101180,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101221,7 +101221,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101262,7 +101262,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101303,7 +101303,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101344,7 +101344,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101385,7 +101385,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101426,7 +101426,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101467,7 +101467,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101508,7 +101508,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101549,7 +101549,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101590,7 +101590,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101631,7 +101631,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101672,7 +101672,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101713,7 +101713,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101754,7 +101754,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101795,7 +101795,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101836,7 +101836,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101877,7 +101877,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101918,7 +101918,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -101959,7 +101959,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102000,7 +102000,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102041,7 +102041,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102082,7 +102082,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102123,7 +102123,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102164,7 +102164,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102205,7 +102205,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102246,7 +102246,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102287,7 +102287,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102328,7 +102328,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102369,7 +102369,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102410,7 +102410,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102451,7 +102451,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102492,7 +102492,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102533,7 +102533,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102574,7 +102574,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102615,7 +102615,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102656,7 +102656,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102697,7 +102697,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102738,7 +102738,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102779,7 +102779,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102820,7 +102820,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102861,7 +102861,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102902,7 +102902,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102943,7 +102943,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -102984,7 +102984,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103025,7 +103025,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103066,7 +103066,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103107,7 +103107,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103148,7 +103148,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103189,7 +103189,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103230,7 +103230,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103271,7 +103271,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103312,7 +103312,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103353,7 +103353,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103394,7 +103394,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103435,7 +103435,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103476,7 +103476,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103517,7 +103517,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103558,7 +103558,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103599,7 +103599,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103640,7 +103640,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103681,7 +103681,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103722,7 +103722,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103763,7 +103763,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103804,7 +103804,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103845,7 +103845,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103886,7 +103886,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103927,7 +103927,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -103968,7 +103968,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104009,7 +104009,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104050,7 +104050,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104091,7 +104091,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104132,7 +104132,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104173,7 +104173,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104214,7 +104214,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104255,7 +104255,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104296,7 +104296,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104337,7 +104337,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104378,7 +104378,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104419,7 +104419,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104460,7 +104460,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104501,7 +104501,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104542,7 +104542,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104583,7 +104583,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104624,7 +104624,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104665,7 +104665,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104706,7 +104706,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104747,7 +104747,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104788,7 +104788,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104829,7 +104829,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104870,7 +104870,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104911,7 +104911,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104952,7 +104952,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -104993,7 +104993,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105034,7 +105034,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105075,7 +105075,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105116,7 +105116,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105157,7 +105157,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105198,7 +105198,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105239,7 +105239,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105280,7 +105280,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105321,7 +105321,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105362,7 +105362,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105403,7 +105403,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105444,7 +105444,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105485,7 +105485,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105526,7 +105526,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105567,7 +105567,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105608,7 +105608,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105649,7 +105649,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105690,7 +105690,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105731,7 +105731,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105772,7 +105772,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105813,7 +105813,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105854,7 +105854,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105895,7 +105895,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105936,7 +105936,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -105977,7 +105977,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106018,7 +106018,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106059,7 +106059,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106100,7 +106100,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106141,7 +106141,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106182,7 +106182,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106223,7 +106223,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106264,7 +106264,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106305,7 +106305,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106346,7 +106346,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106387,7 +106387,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106428,7 +106428,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106469,7 +106469,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106510,7 +106510,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106551,7 +106551,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106592,7 +106592,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106633,7 +106633,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106674,7 +106674,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106715,7 +106715,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106756,7 +106756,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106797,7 +106797,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106838,7 +106838,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106879,7 +106879,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106920,7 +106920,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -106961,7 +106961,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107002,7 +107002,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107043,7 +107043,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107084,7 +107084,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107125,7 +107125,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107166,7 +107166,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107207,7 +107207,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107248,7 +107248,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107289,7 +107289,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107330,7 +107330,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107371,7 +107371,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107412,7 +107412,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107453,7 +107453,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107494,7 +107494,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107535,7 +107535,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107576,7 +107576,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107617,7 +107617,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107658,7 +107658,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107699,7 +107699,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107740,7 +107740,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107781,7 +107781,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107822,7 +107822,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107863,7 +107863,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107904,7 +107904,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107945,7 +107945,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -107986,7 +107986,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108027,7 +108027,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108068,7 +108068,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108109,7 +108109,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108150,7 +108150,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108191,7 +108191,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108232,7 +108232,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108273,7 +108273,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108314,7 +108314,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108355,7 +108355,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108396,7 +108396,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108437,7 +108437,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108478,7 +108478,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108519,7 +108519,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108560,7 +108560,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108601,7 +108601,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108642,7 +108642,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108683,7 +108683,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108724,7 +108724,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108765,7 +108765,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108806,7 +108806,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108847,7 +108847,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108888,7 +108888,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108929,7 +108929,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108970,7 +108970,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109011,7 +109011,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109052,7 +109052,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109093,7 +109093,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109134,7 +109134,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109175,7 +109175,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109216,7 +109216,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109257,7 +109257,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109298,7 +109298,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109339,7 +109339,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109380,7 +109380,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109421,7 +109421,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109462,7 +109462,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109503,7 +109503,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109544,7 +109544,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109585,7 +109585,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109626,7 +109626,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109667,7 +109667,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109708,7 +109708,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109749,7 +109749,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109790,7 +109790,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109831,7 +109831,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109872,7 +109872,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109913,7 +109913,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109954,7 +109954,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109995,7 +109995,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110036,7 +110036,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110077,7 +110077,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110118,7 +110118,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110159,7 +110159,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110200,7 +110200,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110241,7 +110241,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110282,7 +110282,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110323,7 +110323,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110364,7 +110364,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110405,7 +110405,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110446,7 +110446,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110487,7 +110487,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110528,7 +110528,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110569,7 +110569,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110610,7 +110610,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110651,7 +110651,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110692,7 +110692,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110733,7 +110733,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110774,7 +110774,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110815,7 +110815,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110856,7 +110856,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110897,7 +110897,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110938,7 +110938,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -110979,7 +110979,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111020,7 +111020,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111061,7 +111061,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111102,7 +111102,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111143,7 +111143,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111184,7 +111184,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111225,7 +111225,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111266,7 +111266,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111307,7 +111307,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111348,7 +111348,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111389,7 +111389,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111430,7 +111430,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111471,7 +111471,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111512,7 +111512,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111553,7 +111553,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111594,7 +111594,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111635,7 +111635,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111676,7 +111676,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111717,7 +111717,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111758,7 +111758,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111799,7 +111799,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111840,7 +111840,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111881,7 +111881,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111922,7 +111922,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -111963,7 +111963,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112004,7 +112004,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112045,7 +112045,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112086,7 +112086,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112127,7 +112127,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112168,7 +112168,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112209,7 +112209,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112250,7 +112250,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112291,7 +112291,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112332,7 +112332,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112373,7 +112373,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112414,7 +112414,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112455,7 +112455,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112496,7 +112496,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112537,7 +112537,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112578,7 +112578,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112619,7 +112619,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112660,7 +112660,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112701,7 +112701,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112742,7 +112742,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112783,7 +112783,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112824,7 +112824,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -112865,7 +112865,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/intrinsics.v b/CoqOfRust/core/intrinsics.v index 9a2f0aa1f..8d49755b0 100644 --- a/CoqOfRust/core/intrinsics.v +++ b/CoqOfRust/core/intrinsics.v @@ -1196,7 +1196,7 @@ Module intrinsics. ltac:(M.monadic (let len := M.alloc (| len |) in M.read (| - let max_len := + let~ max_len := M.copy (| M.get_constant (| "core::intrinsics::is_valid_allocation_size_discriminant" |) |) in @@ -1229,21 +1229,21 @@ Module intrinsics. let dst := M.alloc (| dst |) in let count := M.alloc (| count |) in M.read (| - let src_usize := + let~ src_usize := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "addr", [] |), [ M.read (| src |) ] |) |) in - let dst_usize := + let~ dst_usize := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "addr", [] |), [ M.read (| dst |) ] |) |) in - let size := + let~ size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1265,7 +1265,7 @@ Module intrinsics. ] |) |) in - let diff := + let~ diff := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "abs_diff", [] |), @@ -1311,7 +1311,7 @@ Module intrinsics. let dst := M.alloc (| dst |) in let count := M.alloc (| count |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1319,7 +1319,7 @@ Module intrinsics. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1524,7 +1524,7 @@ Module intrinsics. let dst := M.alloc (| dst |) in let count := M.alloc (| count |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1532,7 +1532,7 @@ Module intrinsics. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1694,7 +1694,7 @@ Module intrinsics. let val := M.alloc (| val |) in let count := M.alloc (| count |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1702,7 +1702,7 @@ Module intrinsics. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/io/borrowed_buf.v b/CoqOfRust/core/io/borrowed_buf.v index b029b9944..b09555717 100644 --- a/CoqOfRust/core/io/borrowed_buf.v +++ b/CoqOfRust/core/io/borrowed_buf.v @@ -147,7 +147,7 @@ Module io. ltac:(M.monadic (let slice := M.alloc (| slice |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -506,7 +506,7 @@ Module io. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -535,7 +535,7 @@ Module io. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -693,9 +693,9 @@ Module io. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::io::borrowed_buf::BorrowedBuf", "capacity", @@ -710,8 +710,8 @@ Module io. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| @@ -723,8 +723,7 @@ Module io. "core::io::borrowed_buf::BorrowedBuf", "filled" |) - |) - |))) + |)))) | _, _ => M.impossible end. @@ -740,9 +739,9 @@ Module io. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| @@ -754,15 +753,14 @@ Module io. "core::io::borrowed_buf::BorrowedBuf", "filled" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::io::borrowed_buf::BorrowedCursor", "start" |) - |) - |))) + |)))) | _, _ => M.impossible end. @@ -1070,7 +1068,7 @@ Module io. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| @@ -1083,11 +1081,8 @@ Module io. "core::io::borrowed_buf::BorrowedBuf", "filled" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| n |) |) - |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| n |)) |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -1158,7 +1153,7 @@ Module io. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let uninit := + let~ uninit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1169,8 +1164,8 @@ Module io. [ M.read (| self |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1212,7 +1207,7 @@ Module io. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -1262,7 +1257,7 @@ Module io. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -1291,9 +1286,9 @@ Module io. "init" |) |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| M.SubPointer.get_struct_record_field (| @@ -1305,9 +1300,8 @@ Module io. "core::io::borrowed_buf::BorrowedBuf", "filled" |) - |), - M.read (| n |) - |) + |)) + (M.read (| n |)) ] |) |) in @@ -1341,7 +1335,7 @@ Module io. (let self := M.alloc (| self |) in let buf := M.alloc (| buf |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1386,8 +1380,8 @@ Module io. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1439,8 +1433,8 @@ Module io. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1462,7 +1456,7 @@ Module io. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| @@ -1477,18 +1471,17 @@ Module io. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |) |))) diff --git a/CoqOfRust/core/iter/adapters/array_chunks.v b/CoqOfRust/core/iter/adapters/array_chunks.v index 3132f5238..58c53886c 100644 --- a/CoqOfRust/core/iter/adapters/array_chunks.v +++ b/CoqOfRust/core/iter/adapters/array_chunks.v @@ -145,7 +145,7 @@ Module iter. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -265,7 +265,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -306,11 +306,11 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -325,11 +325,12 @@ Module iter. "iter" |) ] - |), - M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) |) - |) + |)) + (M.read (| + M.get_constant (| "core::iter::adapters::array_chunks::N" |) + |)) |) in - let remainder := + let~ remainder := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -406,7 +407,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -426,7 +427,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -543,13 +544,12 @@ Module iter. M.alloc (| Value.Tuple [ - BinOp.Panic.div (| - Integer.Usize, - M.read (| lower |), - M.read (| + BinOp.Wrap.div + Integer.Usize + (M.read (| lower |)) + (M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) - |) - |); + |)); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], @@ -572,15 +572,14 @@ Module iter. fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - BinOp.Panic.div (| - Integer.Usize, - M.read (| n |), - M.read (| + BinOp.Wrap.div + Integer.Usize + (M.read (| n |)) + (M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) - |) - |))) + |)))) ] |) | _ => M.impossible (||) @@ -606,9 +605,9 @@ Module iter. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", I, @@ -625,9 +624,8 @@ Module iter. |) |) ] - |), - M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) |) - |))) + |)) + (M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) |)))) | _, _ => M.impossible end. @@ -664,7 +662,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let acc := M.copy (| init |) in + let~ acc := M.copy (| init |) in M.loop (| ltac:(M.monadic (M.match_operator (| @@ -786,7 +784,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -983,7 +981,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -996,8 +994,8 @@ Module iter. [ M.read (| self |) ] |) |) in - let acc := M.copy (| init |) in - let iter := + let~ acc := M.copy (| init |) in + let~ iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1022,7 +1020,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1057,7 +1055,7 @@ Module iter. 0 |) in let chunk := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1152,7 +1150,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1290,9 +1288,9 @@ Module iter. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -1307,9 +1305,8 @@ Module iter. "iter" |) ] - |), - M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) |) - |))) + |)) + (M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) |)))) | _, _ => M.impossible end. @@ -1467,8 +1464,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let inner_len := + let~ accum := M.copy (| init |) in + let~ inner_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1487,8 +1484,8 @@ Module iter. ] |) |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1500,11 +1497,10 @@ Module iter. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| inner_len |), - M.read (| i |) - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| inner_len |)) + (M.read (| i |))) (M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) |)) @@ -1514,7 +1510,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let chunk := + let~ chunk := M.alloc (| M.call_closure (| M.get_function (| @@ -1537,13 +1533,12 @@ Module iter. ltac:(M.monadic (let local := M.copy (| γ |) in M.read (| - let idx := + let~ idx := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| local |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| local |)) |) in M.alloc (| M.call_closure (| @@ -1572,7 +1567,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -1587,17 +1582,16 @@ Module iter. [ f; Value.Tuple [ M.read (| accum |); M.read (| chunk |) ] ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| M.get_constant (| "core::iter::adapters::array_chunks::N" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1605,7 +1599,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/iter/adapters/chain.v b/CoqOfRust/core/iter/adapters/chain.v index 7744c44b4..de7af5590 100644 --- a/CoqOfRust/core/iter/adapters/chain.v +++ b/CoqOfRust/core/iter/adapters/chain.v @@ -345,7 +345,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let a_count := + let~ a_count := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -375,11 +375,14 @@ Module iter. [ M.read (| a |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in - let b_count := + let~ b_count := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -409,12 +412,15 @@ Module iter. [ M.read (| b |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| a_count |), M.read (| b_count |) |) + BinOp.Wrap.add Integer.Usize (M.read (| a_count |)) (M.read (| b_count |)) |) |))) | _, _ => M.impossible @@ -449,7 +455,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -468,7 +474,7 @@ Module iter. 0 |) in let a := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -538,7 +544,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -551,7 +557,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -570,7 +576,7 @@ Module iter. 0 |) in let b := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -684,7 +690,7 @@ Module iter. let acc := M.alloc (| acc |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -703,7 +709,7 @@ Module iter. 0 |) in let a := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -721,7 +727,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -740,7 +746,7 @@ Module iter. 0 |) in let b := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -791,7 +797,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -810,7 +816,7 @@ Module iter. 0 |) in let a := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| n, M.read (| @@ -870,7 +876,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -883,7 +889,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -987,7 +993,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1006,7 +1012,7 @@ Module iter. 0 |) in let a := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| n, M.read (| @@ -1047,7 +1053,13 @@ Module iter. |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer 0 |))); + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| Value.Integer 0 |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in @@ -1081,7 +1093,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1389,7 +1401,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let a_last := + let~ a_last := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1420,7 +1432,7 @@ Module iter. ] |) |) in - let b_last := + let~ b_last := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1566,7 +1578,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let b_lower := M.copy (| γ0_0 |) in let b_upper := M.copy (| γ0_1 |) in - let lower := + let~ lower := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1577,7 +1589,7 @@ Module iter. [ M.read (| a_lower |); M.read (| b_lower |) ] |) |) in - let upper := + let~ upper := M.copy (| M.match_operator (| M.alloc (| @@ -1654,6 +1666,7 @@ Module iter. 0 |) in let a := M.alloc (| γ2_0 |) in + let _ := M.is_struct_tuple (| γ1_1, "core::option::Option::None" |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1681,6 +1694,7 @@ Module iter. "core::iter::adapters::chain::Chain", "b" |) in + let _ := M.is_struct_tuple (| γ1_0, "core::option::Option::None" |) in let γ2_0 := M.SubPointer.get_struct_tuple_field (| γ1_1, @@ -1715,6 +1729,8 @@ Module iter. "core::iter::adapters::chain::Chain", "b" |) in + let _ := M.is_struct_tuple (| γ1_0, "core::option::Option::None" |) in + let _ := M.is_struct_tuple (| γ1_1, "core::option::Option::None" |) in M.alloc (| Value.Tuple [ @@ -1958,7 +1974,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1977,7 +1993,7 @@ Module iter. 0 |) in let b := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| n, M.read (| @@ -2037,7 +2053,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2050,7 +2066,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2154,7 +2170,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2173,7 +2189,7 @@ Module iter. 0 |) in let b := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| n, M.read (| @@ -2214,7 +2230,13 @@ Module iter. |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.Integer 0 |))); + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| Value.Integer 0 |))); fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in @@ -2248,7 +2270,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2570,7 +2592,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2589,7 +2611,7 @@ Module iter. 0 |) in let b := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2659,7 +2681,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2672,7 +2694,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2691,7 +2713,7 @@ Module iter. 0 |) in let a := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2805,7 +2827,7 @@ Module iter. let acc := M.alloc (| acc |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2824,7 +2846,7 @@ Module iter. 0 |) in let b := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2842,7 +2864,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2861,7 +2883,7 @@ Module iter. 0 |) in let a := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2988,7 +3010,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3076,7 +3098,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3096,7 +3118,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| opt |), Value.StructTuple "core::option::Option::None" [] diff --git a/CoqOfRust/core/iter/adapters/cloned.v b/CoqOfRust/core/iter/adapters/cloned.v index f7858981c..88034af8e 100644 --- a/CoqOfRust/core/iter/adapters/cloned.v +++ b/CoqOfRust/core/iter/adapters/cloned.v @@ -727,7 +727,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let item := + let~ item := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/iter/adapters/copied.v b/CoqOfRust/core/iter/adapters/copied.v index 258f4ae27..8c409e3ca 100644 --- a/CoqOfRust/core/iter/adapters/copied.v +++ b/CoqOfRust/core/iter/adapters/copied.v @@ -1051,7 +1051,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let raw_array := + let~ raw_array := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1062,7 +1062,7 @@ Module iter. [] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1077,7 +1077,7 @@ Module iter. [ self ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1094,7 +1094,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1217,7 +1217,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1240,7 +1240,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1341,7 +1341,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), diff --git a/CoqOfRust/core/iter/adapters/cycle.v b/CoqOfRust/core/iter/adapters/cycle.v index cfadafa19..bb1315dc6 100644 --- a/CoqOfRust/core/iter/adapters/cycle.v +++ b/CoqOfRust/core/iter/adapters/cycle.v @@ -193,7 +193,8 @@ Module iter. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -358,7 +359,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.write (| acc, M.read (| @@ -436,7 +437,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -454,8 +455,8 @@ Module iter. ] |) |) in - let is_empty := M.alloc (| Value.Bool true |) in - let _ := + let~ is_empty := M.alloc (| Value.Bool true |) in + let~ _ := M.write (| acc, M.read (| @@ -503,7 +504,7 @@ Module iter. ltac:(M.monadic (let x := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.write (| is_empty, Value.Bool false @@ -584,7 +585,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -622,7 +623,7 @@ Module iter. M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -646,7 +647,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -763,7 +764,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| @@ -827,7 +828,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -845,7 +846,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -869,7 +870,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| n, M.read (| @@ -976,7 +977,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/iter/adapters/enumerate.v b/CoqOfRust/core/iter/adapters/enumerate.v index a592eb54d..89fd20c8e 100644 --- a/CoqOfRust/core/iter/adapters/enumerate.v +++ b/CoqOfRust/core/iter/adapters/enumerate.v @@ -169,7 +169,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let a := + let~ a := M.copy (| M.match_operator (| M.alloc (| @@ -248,7 +248,7 @@ Module iter. ] |) |) in - let i := + let~ i := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -256,7 +256,7 @@ Module iter. "count" |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -265,7 +265,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -325,7 +325,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let a := + let~ a := M.copy (| M.match_operator (| M.alloc (| @@ -405,28 +405,27 @@ Module iter. ] |) |) in - let i := + let~ i := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "count" |) - |), - M.read (| n |) - |) + |)) + (M.read (| n |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "count" |), - BinOp.Panic.add (| Integer.Usize, M.read (| i |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| i |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -615,7 +614,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let remaining := + let~ remaining := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -635,7 +634,7 @@ Module iter. ] |) |) in - let advanced := + let~ advanced := M.copy (| M.match_operator (| remaining, @@ -659,23 +658,22 @@ Module iter. |) in let rem := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", [] |), [ M.read (| rem |) ] - |) - |) + |)) |))) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -684,7 +682,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| advanced |) |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| advanced |)) |) in remaining |))) @@ -710,7 +708,7 @@ Module iter. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let value := + let~ value := M.alloc (| M.call_closure (| M.get_function (| "core::iter::adapters::zip::try_get_unchecked", [ I ] |), @@ -727,17 +725,16 @@ Module iter. M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "count" |) - |), - M.read (| idx |) - |); + |)) + (M.read (| idx |)); M.read (| value |) ] |) @@ -787,7 +784,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let a := + let~ a := M.copy (| M.match_operator (| M.alloc (| @@ -866,7 +863,7 @@ Module iter. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -891,17 +888,16 @@ Module iter. [ Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "count" |) - |), - M.read (| len |) - |); + |)) + (M.read (| len |)); M.read (| a |) ] ] @@ -930,7 +926,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let a := + let~ a := M.copy (| M.match_operator (| M.alloc (| @@ -1010,7 +1006,7 @@ Module iter. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1035,17 +1031,16 @@ Module iter. [ Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "count" |) - |), - M.read (| len |) - |); + |)) + (M.read (| len |)); M.read (| a |) ] ] @@ -1087,18 +1082,18 @@ Module iter. let init := M.alloc (| init |) in let fold := M.alloc (| fold |) in M.read (| - let count := + let~ count := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::enumerate::Enumerate", "count" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -1113,8 +1108,7 @@ Module iter. "iter" |) ] - |) - |) + |)) |) in M.alloc (| M.call_closure (| @@ -1173,18 +1167,18 @@ Module iter. let init := M.alloc (| init |) in let fold := M.alloc (| fold |) in M.read (| - let count := + let~ count := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::enumerate::Enumerate", "count" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -1199,8 +1193,7 @@ Module iter. "iter" |) ] - |) - |) + |)) |) in M.alloc (| M.call_closure (| diff --git a/CoqOfRust/core/iter/adapters/filter.v b/CoqOfRust/core/iter/adapters/filter.v index 279d3d708..24309af9e 100644 --- a/CoqOfRust/core/iter/adapters/filter.v +++ b/CoqOfRust/core/iter/adapters/filter.v @@ -454,7 +454,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let array := + let~ array := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -465,7 +465,7 @@ Module iter. [] |) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "core::iter::adapters::filter::next_chunk::Guard" @@ -474,7 +474,7 @@ Module iter. ("initialized", Value.Integer 0) ] |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -511,7 +511,7 @@ Module iter. ltac:(M.monadic (let element := M.copy (| γ |) in M.read (| - let idx := + let~ idx := M.copy (| M.SubPointer.get_struct_record_field (| guard, @@ -519,17 +519,17 @@ Module iter. "initialized" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| guard, "core::iter::adapters::filter::next_chunk::Guard", "initialized" |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (M.rust_cast (M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", @@ -550,10 +550,9 @@ Module iter. |); Value.Tuple [ element ] ] - |)) - |) + |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -641,7 +640,7 @@ Module iter. ] |) |) in - let guard := + let~ guard := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -693,7 +692,7 @@ Module iter. "core::ops::control_flow::ControlFlow::Continue", 0 |) in - let initialized := + let~ initialized := M.copy (| M.SubPointer.get_struct_record_field (| M.call_closure (| diff --git a/CoqOfRust/core/iter/adapters/filter_map.v b/CoqOfRust/core/iter/adapters/filter_map.v index 314d3db30..e76117d04 100644 --- a/CoqOfRust/core/iter/adapters/filter_map.v +++ b/CoqOfRust/core/iter/adapters/filter_map.v @@ -224,7 +224,14 @@ Module iter. ] |) |))); - fun γ => ltac:(M.monadic acc) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + acc)) ] |) |))) @@ -320,7 +327,12 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::try_trait::Try", @@ -461,7 +473,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let array := + let~ array := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -472,7 +484,7 @@ Module iter. [] |) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "core::iter::adapters::filter_map::next_chunk::Guard" @@ -481,7 +493,7 @@ Module iter. ("initialized", Value.Integer 0) ] |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -518,7 +530,7 @@ Module iter. ltac:(M.monadic (let element := M.copy (| γ |) in M.read (| - let idx := + let~ idx := M.copy (| M.SubPointer.get_struct_record_field (| guard, @@ -526,7 +538,7 @@ Module iter. "initialized" |) |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -546,17 +558,17 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| guard, "core::iter::adapters::filter_map::next_chunk::Guard", "initialized" |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply @@ -566,11 +578,10 @@ Module iter. [] |), [ val ] - |)) - |) + |))) |) in - let _ := - let opt_payload_at := + let~ _ := + let~ opt_payload_at := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -621,7 +632,7 @@ Module iter. ] |) |) in - let dst := + let~ dst := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -664,7 +675,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -683,7 +694,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -747,7 +758,7 @@ Module iter. ] |) |) in - let guard := + let~ guard := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -797,7 +808,7 @@ Module iter. "core::ops::control_flow::ControlFlow::Continue", 0 |) in - let initialized := + let~ initialized := M.copy (| M.SubPointer.get_struct_record_field (| M.call_closure (| diff --git a/CoqOfRust/core/iter/adapters/flatten.v b/CoqOfRust/core/iter/adapters/flatten.v index 3a60dcbd7..d80b0f500 100644 --- a/CoqOfRust/core/iter/adapters/flatten.v +++ b/CoqOfRust/core/iter/adapters/flatten.v @@ -1981,7 +1981,7 @@ Module iter. let acc := M.alloc (| acc |) in let fold := M.alloc (| fold |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2000,7 +2000,7 @@ Module iter. 0 |) in let iter := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2018,7 +2018,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2045,7 +2045,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2064,7 +2064,7 @@ Module iter. 0 |) in let iter := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2132,7 +2132,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2154,7 +2154,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2232,7 +2232,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2241,7 +2241,7 @@ Module iter. |), Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2333,7 +2333,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2342,7 +2342,7 @@ Module iter. |), Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2364,7 +2364,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2442,7 +2442,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2505,7 +2505,7 @@ Module iter. let acc := M.alloc (| acc |) in let fold := M.alloc (| fold |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2524,7 +2524,7 @@ Module iter. 0 |) in let iter := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2542,7 +2542,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2569,7 +2569,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2588,7 +2588,7 @@ Module iter. 0 |) in let iter := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2656,7 +2656,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2678,7 +2678,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2756,7 +2756,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2765,7 +2765,7 @@ Module iter. |), Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2857,7 +2857,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2866,7 +2866,7 @@ Module iter. |), Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2888,7 +2888,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2966,7 +2966,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3031,7 +3031,7 @@ Module iter. M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3105,7 +3105,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -3337,7 +3339,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let blo := M.copy (| γ0_0 |) in let bhi := M.copy (| γ0_1 |) in - let lo := + let~ lo := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3348,7 +3350,7 @@ Module iter. [ M.read (| flo |); M.read (| blo |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3414,7 +3416,7 @@ Module iter. |) in let lower := M.copy (| γ0_0 |) in let upper := M.copy (| γ0_1 |) in - let lower := + let~ lower := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3438,7 +3440,7 @@ Module iter. ] |) |) in - let upper := + let~ upper := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4275,7 +4277,7 @@ Module iter. M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4367,7 +4369,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -4822,7 +4826,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4910,7 +4914,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4930,7 +4934,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| opt |), Value.StructTuple "core::option::Option::None" [] diff --git a/CoqOfRust/core/iter/adapters/fuse.v b/CoqOfRust/core/iter/adapters/fuse.v index 2136dd49d..66e51d454 100644 --- a/CoqOfRust/core/iter/adapters/fuse.v +++ b/CoqOfRust/core/iter/adapters/fuse.v @@ -253,7 +253,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -303,7 +304,10 @@ Module iter. [ M.read (| iter |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 0 |))) ] |) |))) @@ -355,7 +359,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [ Value.Integer 0; @@ -419,7 +424,7 @@ Module iter. let acc := M.alloc (| acc |) in let fold := M.alloc (| fold |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -438,7 +443,7 @@ Module iter. 0 |) in let iter := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -538,7 +543,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::intrinsics::unreachable", [] |), @@ -677,7 +683,7 @@ Module iter. let acc := M.alloc (| acc |) in let fold := M.alloc (| fold |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -696,7 +702,7 @@ Module iter. 0 |) in let iter := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -810,7 +816,10 @@ Module iter. [ M.read (| iter |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 0 |))) ] |) |))) @@ -860,7 +869,10 @@ Module iter. [ M.read (| iter |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Bool true |))) ] |) |))) @@ -1104,7 +1116,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1123,7 +1135,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -1197,7 +1209,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1438,7 +1450,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1457,7 +1469,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -1531,7 +1543,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1886,7 +1898,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1905,7 +1917,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2356,7 +2368,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2375,7 +2387,7 @@ Module iter. 0 |) in let iter := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -2684,7 +2696,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2772,7 +2784,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2792,7 +2804,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| opt |), Value.StructTuple "core::option::Option::None" [] diff --git a/CoqOfRust/core/iter/adapters/inspect.v b/CoqOfRust/core/iter/adapters/inspect.v index d5f498f4b..1fb8eb6b9 100644 --- a/CoqOfRust/core/iter/adapters/inspect.v +++ b/CoqOfRust/core/iter/adapters/inspect.v @@ -102,7 +102,7 @@ Module iter. (let self := M.alloc (| self |) in let elt := M.alloc (| elt |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -116,7 +116,7 @@ Module iter. 0 |) in let a := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -250,7 +250,7 @@ Module iter. ltac:(M.monadic (let item := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -330,7 +330,7 @@ Module iter. ltac:(M.monadic (let item := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -395,7 +395,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let next := + let~ next := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -597,7 +597,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let next := + let~ next := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/iter/adapters/intersperse.v b/CoqOfRust/core/iter/adapters/intersperse.v index bf7bea19b..189cf9440 100644 --- a/CoqOfRust/core/iter/adapters/intersperse.v +++ b/CoqOfRust/core/iter/adapters/intersperse.v @@ -265,7 +265,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -298,7 +298,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -350,7 +350,7 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let separator := + let~ separator := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -776,7 +776,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -810,7 +810,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -983,7 +983,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lo := M.copy (| γ0_0 |) in let hi := M.copy (| γ0_1 |) in - let next_is_elem := M.alloc (| UnOp.Pure.not (M.read (| needs_sep |)) |) in + let~ next_is_elem := M.alloc (| UnOp.Pure.not (M.read (| needs_sep |)) |) in M.alloc (| Value.Tuple [ @@ -1107,8 +1107,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1143,7 +1143,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -1200,7 +1200,7 @@ Module iter. ltac:(M.monadic (let x := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -1230,7 +1230,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| diff --git a/CoqOfRust/core/iter/adapters/map.v b/CoqOfRust/core/iter/adapters/map.v index 489ccc19e..3c847884c 100644 --- a/CoqOfRust/core/iter/adapters/map.v +++ b/CoqOfRust/core/iter/adapters/map.v @@ -853,7 +853,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let item := + let~ item := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/iter/adapters/map_while.v b/CoqOfRust/core/iter/adapters/map_while.v index 23b949684..297e3030c 100644 --- a/CoqOfRust/core/iter/adapters/map_while.v +++ b/CoqOfRust/core/iter/adapters/map_while.v @@ -173,7 +173,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -472,7 +472,12 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| Value.StructTuple "core::ops::control_flow::ControlFlow::Break" [ diff --git a/CoqOfRust/core/iter/adapters/map_windows.v b/CoqOfRust/core/iter/adapters/map_windows.v index 45d52ef29..64a5a2cbf 100644 --- a/CoqOfRust/core/iter/adapters/map_windows.v +++ b/CoqOfRust/core/iter/adapters/map_windows.v @@ -76,7 +76,7 @@ Module iter. (let iter := M.alloc (| iter |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -126,7 +126,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -144,7 +144,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -310,7 +310,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let iter := + let~ iter := M.copy (| M.match_operator (| M.alloc (| @@ -393,7 +393,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -403,7 +403,8 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.write (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::MapWindowsInner", @@ -446,6 +447,8 @@ Module iter. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -462,7 +465,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -694,15 +697,14 @@ Module iter. |), [ M.read (| lo |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.call_closure (| @@ -739,15 +741,14 @@ Module iter. |), [ M.read (| hi |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |))) ] @@ -793,7 +794,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let first_half := + let~ first_half := M.copy (| M.match_operator (| M.alloc (| @@ -884,7 +885,7 @@ Module iter. ] |) |) in - let buffer := + let~ buffer := M.alloc (| Value.Array [ @@ -1062,7 +1063,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1071,7 +1072,7 @@ Module iter. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1082,30 +1083,28 @@ Module iter. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::Buffer", "start" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |) - |)) - (BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| + |))) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |) - |))) + |)))) |)) in let _ := M.is_constant_or_break_match (| @@ -1194,7 +1193,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1203,7 +1202,7 @@ Module iter. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1214,30 +1213,28 @@ Module iter. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::Buffer", "start" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |) - |)) - (BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| + |))) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |) - |))) + |)))) |)) in let _ := M.is_constant_or_break_match (| @@ -1380,7 +1377,7 @@ Module iter. (let self := M.alloc (| self |) in let next := M.alloc (| next |) in M.read (| - let buffer_mut_ptr := + let~ buffer_mut_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1391,7 +1388,7 @@ Module iter. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1400,7 +1397,7 @@ Module iter. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1411,30 +1408,28 @@ Module iter. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::Buffer", "start" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |) - |)) - (BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| + |))) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |) - |))) + |)))) |)) in let _ := M.is_constant_or_break_match (| @@ -1461,7 +1456,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let to_drop := + let~ to_drop := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1485,9 +1480,9 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let to_drop := + let~ to_drop := M.copy (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1515,33 +1510,31 @@ Module iter. |), [ M.read (| buffer_mut_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::Buffer", "start" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |)); M.read (| buffer_mut_ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1566,15 +1559,14 @@ Module iter. |), [ M.read (| buffer_mut_ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| next |) @@ -1607,7 +1599,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1619,9 +1611,9 @@ Module iter. to_drop)); fun γ => ltac:(M.monadic - (let to_drop := + (let~ to_drop := M.copy (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1646,21 +1638,20 @@ Module iter. |), [ M.read (| buffer_mut_ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::map_windows::Buffer", "start" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::iter::adapters::map_windows::N" |) - |) - |) + |)) ] |); M.read (| next |) @@ -1693,7 +1684,7 @@ Module iter. |) |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1702,13 +1693,13 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in to_drop)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::drop_in_place", [ T ] |), @@ -1757,7 +1748,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let buffer := + let~ buffer := M.alloc (| Value.StructRecord "core::iter::adapters::map_windows::Buffer" @@ -1792,7 +1783,7 @@ Module iter. |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1944,7 +1935,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let initialized_part := + let~ initialized_part := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), @@ -1993,7 +1984,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2040,7 +2031,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let window := + let~ window := M.copy (| M.match_operator (| M.alloc (| @@ -2123,7 +2114,7 @@ Module iter. ] |) |) in - let out := + let~ out := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/iter/adapters/mod.v b/CoqOfRust/core/iter/adapters/mod.v index 372ad1a38..dd8be5fba 100644 --- a/CoqOfRust/core/iter/adapters/mod.v +++ b/CoqOfRust/core/iter/adapters/mod.v @@ -41,14 +41,14 @@ Module iter. (let iter := M.alloc (| iter |) in let f := M.alloc (| f |) in M.read (| - let residual := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let shunt := + let~ residual := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ shunt := M.alloc (| Value.StructRecord "core::iter::adapters::GenericShunt" [ ("iter", M.read (| iter |)); ("residual", residual) ] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -88,7 +88,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::try_trait::Try", @@ -380,7 +381,7 @@ Module iter. 0 |) in let r := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| M.SubPointer.get_struct_record_field (| diff --git a/CoqOfRust/core/iter/adapters/peekable.v b/CoqOfRust/core/iter/adapters/peekable.v index 9cef9e7be..e8e018834 100644 --- a/CoqOfRust/core/iter/adapters/peekable.v +++ b/CoqOfRust/core/iter/adapters/peekable.v @@ -168,7 +168,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let iter := + let~ iter := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -252,7 +252,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let iter := + let~ iter := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -388,7 +388,7 @@ Module iter. fun γ => ltac:(M.monadic (let other := M.copy (| γ |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -439,7 +439,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -576,7 +576,8 @@ Module iter. v)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -644,6 +645,7 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.Integer 0 |))); fun γ => ltac:(M.monadic @@ -660,10 +662,10 @@ Module iter. 0 |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", I, @@ -680,12 +682,12 @@ Module iter. |) |) ] - |) - |) + |)) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -757,6 +759,7 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic @@ -806,13 +809,14 @@ Module iter. "core::iter::adapters::peekable::Peekable", "iter" |); - BinOp.Panic.sub (| Integer.Usize, M.read (| n |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (Value.Integer 1) ] |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -856,7 +860,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let peek_opt := + let~ peek_opt := M.copy (| M.match_operator (| M.alloc (| @@ -886,6 +890,8 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| M.never_to_any (| M.read (| @@ -907,7 +913,8 @@ Module iter. v)); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |) in @@ -971,7 +978,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let peek_len := + let~ peek_len := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -988,6 +995,8 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| M.never_to_any (| M.read (| @@ -1018,7 +1027,10 @@ Module iter. 0 |) in M.alloc (| Value.Integer 1 |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in @@ -1048,7 +1060,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lo := M.copy (| γ0_0 |) in let hi := M.copy (| γ0_1 |) in - let lo := + let~ lo := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1059,7 +1071,7 @@ Module iter. [ M.read (| lo |); M.read (| peek_len |) ] |) |) in - let hi := + let~ hi := M.copy (| M.match_operator (| hi, @@ -1085,7 +1097,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] @@ -1125,7 +1139,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let acc := + let~ acc := M.copy (| M.match_operator (| M.alloc (| @@ -1155,6 +1169,8 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| M.never_to_any (| M.read (| @@ -1252,7 +1268,10 @@ Module iter. val)) ] |))); - fun γ => ltac:(M.monadic init) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + init)) ] |) |) in @@ -1305,7 +1324,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let acc := + let~ acc := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -1322,6 +1341,8 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| init |) |) |) @@ -1354,7 +1375,10 @@ Module iter. [ fold; Value.Tuple [ M.read (| init |); M.read (| v |) ] ] |) |))); - fun γ => ltac:(M.monadic init) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + init)) ] |) |) in @@ -1524,10 +1548,12 @@ Module iter. 0 |) in let γ0_0 := M.read (| γ0_0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::traits::double_ended::DoubleEndedIterator", @@ -1608,6 +1634,7 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1698,7 +1725,7 @@ Module iter. 0 |) in let r := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1729,7 +1756,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::traits::double_ended::DoubleEndedIterator", @@ -1794,6 +1822,7 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in init)); fun γ => ltac:(M.monadic @@ -1810,7 +1839,7 @@ Module iter. 0 |) in let v := M.copy (| γ1_0 |) in - let acc := + let~ acc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1847,7 +1876,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::traits::double_ended::DoubleEndedIterator", diff --git a/CoqOfRust/core/iter/adapters/scan.v b/CoqOfRust/core/iter/adapters/scan.v index 474d85bf1..55a9fd5a5 100644 --- a/CoqOfRust/core/iter/adapters/scan.v +++ b/CoqOfRust/core/iter/adapters/scan.v @@ -203,7 +203,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let a := + let~ a := M.copy (| M.match_operator (| M.alloc (| @@ -389,7 +389,7 @@ Module iter. let init := M.alloc (| init |) in let fold := M.alloc (| fold |) in M.read (| - let state := + let~ state := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -397,7 +397,7 @@ Module iter. "state" |) |) in - let f := + let~ f := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/core/iter/adapters/skip.v b/CoqOfRust/core/iter/adapters/skip.v index 3e39ae19d..89cb31bbf 100644 --- a/CoqOfRust/core/iter/adapters/skip.v +++ b/CoqOfRust/core/iter/adapters/skip.v @@ -300,7 +300,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let skip := + let~ skip := M.alloc (| M.call_closure (| M.get_function (| "core::mem::take", [ Ty.path "usize" ] |), @@ -313,7 +313,7 @@ Module iter. ] |) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| @@ -340,6 +340,8 @@ Module iter. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -367,11 +369,10 @@ Module iter. "core::iter::adapters::skip::Skip", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| skip |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| skip |)) + (Value.Integer 1) ] |) ] @@ -497,7 +498,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -553,17 +554,16 @@ Module iter. "core::iter::adapters::skip::Skip", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::skip::Skip", "n" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) @@ -629,7 +629,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -653,7 +653,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -679,17 +679,16 @@ Module iter. "core::iter::adapters::skip::Skip", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::skip::Skip", "n" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) ] @@ -816,7 +815,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower := M.copy (| γ0_0 |) in let upper := M.copy (| γ0_1 |) in - let lower := + let~ lower := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), @@ -832,7 +831,7 @@ Module iter. ] |) |) in - let upper := + let~ upper := M.copy (| M.match_operator (| upper, @@ -871,7 +870,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] @@ -913,7 +914,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let n := + let~ n := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -921,7 +922,7 @@ Module iter. "n" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -930,7 +931,7 @@ Module iter. |), Value.Integer 0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -978,11 +979,10 @@ Module iter. "core::iter::adapters::skip::Skip", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) ] |) |) @@ -1068,7 +1068,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1124,17 +1124,16 @@ Module iter. "core::iter::adapters::skip::Skip", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::skip::Skip", "n" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) @@ -1216,7 +1215,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let skip_inner := + let~ skip_inner := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1224,14 +1223,14 @@ Module iter. "n" |) |) in - let skip_and_advance := + let~ skip_and_advance := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| skip_inner |); M.read (| n |) ] |) |) in - let remainder := + let~ remainder := M.copy (| M.match_operator (| M.alloc (| @@ -1285,28 +1284,26 @@ Module iter. ] |) |) in - let advanced_inner := + let~ advanced_inner := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| skip_and_advance |), - M.read (| remainder |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| skip_and_advance |)) + (M.read (| remainder |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), [ M.read (| advanced_inner |); M.read (| skip_inner |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1327,7 +1324,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1568,7 +1565,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1613,7 +1610,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1629,7 +1626,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1645,11 +1642,10 @@ Module iter. "core::iter::adapters::skip::Skip", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (Value.Integer 1) ] |) |) in @@ -1695,7 +1691,7 @@ Module iter. let init := M.alloc (| init |) in let fold := M.alloc (| fold |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1849,7 +1845,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let min := + let~ min := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -1870,7 +1866,7 @@ Module iter. ] |) |) in - let rem := + let~ rem := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1890,7 +1886,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1969,7 +1965,7 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| min |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| min |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" diff --git a/CoqOfRust/core/iter/adapters/skip_while.v b/CoqOfRust/core/iter/adapters/skip_while.v index 19336101c..2faf91c67 100644 --- a/CoqOfRust/core/iter/adapters/skip_while.v +++ b/CoqOfRust/core/iter/adapters/skip_while.v @@ -224,7 +224,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let flag := + let~ flag := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -232,7 +232,7 @@ Module iter. "flag" |) |) in - let pred := + let~ pred := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -338,7 +338,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -461,7 +461,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -534,7 +536,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -598,7 +600,9 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| init |) |) |) |) diff --git a/CoqOfRust/core/iter/adapters/step_by.v b/CoqOfRust/core/iter/adapters/step_by.v index eb399eb72..dbc40c24a 100644 --- a/CoqOfRust/core/iter/adapters/step_by.v +++ b/CoqOfRust/core/iter/adapters/step_by.v @@ -163,7 +163,7 @@ Module iter. (let iter := M.alloc (| iter |) in let step := M.alloc (| step |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -187,7 +187,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -205,8 +205,7 @@ Module iter. "core::iter::adapters::step_by::StepBy" [ ("iter", M.read (| iter |)); - ("step", - BinOp.Panic.sub (| Integer.Usize, M.read (| step |), Value.Integer 1 |)); + ("step", BinOp.Wrap.sub Integer.Usize (M.read (| step |)) (Value.Integer 1)); ("first_take", Value.Bool true) ] |) @@ -230,11 +229,11 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", I, @@ -249,19 +248,17 @@ Module iter. "iter" |) ] - |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| + |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -300,11 +297,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| rem |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| rem |)) (Value.Integer 1) |))) ] |))); @@ -676,7 +669,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step_size := + let~ step_size := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -703,7 +696,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -808,7 +801,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let f := + let~ f := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -854,7 +847,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let f := + (let~ f := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -961,7 +954,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -979,7 +972,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -988,7 +981,7 @@ Module iter. |), Value.Bool false |) in - let first := + let~ first := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1007,7 +1000,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1031,35 +1024,30 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let step := + let~ step := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1077,7 +1065,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1093,26 +1081,21 @@ Module iter. "core::iter::adapters::step_by::StepBy", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| step |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| step |)) + (Value.Integer 1) ] |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -1122,7 +1105,7 @@ Module iter. M.read (| M.loop (| ltac:(M.monadic - (let mul := + (let~ mul := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1133,7 +1116,7 @@ Module iter. [ M.read (| n |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1181,9 +1164,9 @@ Module iter. "core::iter::adapters::step_by::StepBy", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") @@ -1192,9 +1175,8 @@ Module iter. [] |), [ M.read (| mul |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) @@ -1204,39 +1186,32 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let div_n := + let~ div_n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| n |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| n |)) |) in - let div_step := + let~ div_step := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| step |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| step |)) |) in - let nth_n := + let~ nth_n := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| div_n |), - M.read (| n |) - |) + BinOp.Wrap.mul Integer.Usize (M.read (| div_n |)) (M.read (| n |)) |) in - let nth_step := + let~ nth_step := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| div_step |), - M.read (| step |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| div_step |)) + (M.read (| step |)) |) in - let nth := + let~ nth := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1255,34 +1230,32 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := step in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| div_n |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| div_n |)) |) in nth_n)); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := n in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| div_step |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| div_step |)) |) in nth_step)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1298,11 +1271,10 @@ Module iter. "core::iter::adapters::step_by::StepBy", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| nth |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| nth |)) + (Value.Integer 1) ] |) |) in @@ -1348,7 +1320,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1366,7 +1338,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1397,7 +1369,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1582,7 +1556,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1600,7 +1574,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| self, @@ -1631,7 +1605,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| M.read (| acc |) |) |) |) @@ -1790,7 +1766,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), @@ -1799,17 +1775,16 @@ Module iter. M.get_associated_function (| Ty.path "usize", "saturating_mul", [] |), [ M.read (| n |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.call_closure (| @@ -1896,7 +1871,8 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::try_trait::Try", @@ -1917,7 +1893,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let acc := + let~ acc := M.copy (| M.match_operator (| M.alloc (| @@ -2085,7 +2061,10 @@ Module iter. |) |), [ - fun γ => ltac:(M.monadic init); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + init)); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2095,7 +2074,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let acc := + let~ acc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2193,7 +2172,7 @@ Module iter. (let r := M.alloc (| r |) in let step := M.alloc (| step |) in M.read (| - let inner_len := + let~ inner_len := M.copy (| M.SubPointer.get_tuple_field (| M.alloc (| @@ -2211,14 +2190,14 @@ Module iter. 0 |) |) in - let yield_count := + let~ yield_count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "div_ceil", [] |), [ M.read (| inner_len |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), M.rust_cast (M.read (| yield_count |)) @@ -2268,7 +2247,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2288,24 +2267,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2329,7 +2307,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let val := + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2341,7 +2319,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2357,7 +2335,7 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2368,11 +2346,7 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.U8, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U8 (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] @@ -2398,7 +2372,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let remaining := + let~ remaining := M.alloc (| M.rust_cast (M.read (| @@ -2439,7 +2413,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2569,8 +2543,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2604,7 +2578,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -2684,7 +2658,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2740,7 +2714,7 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2760,24 +2734,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2789,8 +2762,8 @@ Module iter. "end" |) |) in - let acc := M.copy (| init |) in - let val := + let~ acc := M.copy (| init |) in + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2802,7 +2775,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2827,7 +2800,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2846,7 +2819,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2857,7 +2835,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2874,7 +2852,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| val, M.call_closure (| @@ -2949,7 +2927,7 @@ Module iter. (let r := M.alloc (| r |) in let step := M.alloc (| step |) in M.read (| - let inner_len := + let~ inner_len := M.copy (| M.SubPointer.get_tuple_field (| M.alloc (| @@ -2967,14 +2945,14 @@ Module iter. 0 |) |) in - let yield_count := + let~ yield_count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "div_ceil", [] |), [ M.read (| inner_len |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), M.rust_cast (M.read (| yield_count |)) @@ -3024,7 +3002,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3044,24 +3022,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3085,7 +3062,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let val := + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3097,7 +3074,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3113,7 +3090,7 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3124,11 +3101,7 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.U16, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U16 (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] @@ -3154,7 +3127,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let remaining := + let~ remaining := M.alloc (| M.rust_cast (M.read (| @@ -3195,7 +3168,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3325,8 +3298,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3360,7 +3333,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -3440,7 +3413,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3496,7 +3469,7 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3516,24 +3489,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3545,8 +3517,8 @@ Module iter. "end" |) |) in - let acc := M.copy (| init |) in - let val := + let~ acc := M.copy (| init |) in + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3558,7 +3530,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3583,7 +3555,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3602,7 +3574,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3613,7 +3590,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -3630,7 +3607,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| val, M.call_closure (| @@ -3705,7 +3682,7 @@ Module iter. (let r := M.alloc (| r |) in let step := M.alloc (| step |) in M.read (| - let inner_len := + let~ inner_len := M.copy (| M.SubPointer.get_tuple_field (| M.alloc (| @@ -3723,14 +3700,14 @@ Module iter. 0 |) |) in - let yield_count := + let~ yield_count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "div_ceil", [] |), [ M.read (| inner_len |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), M.rust_cast (M.read (| yield_count |)) @@ -3780,7 +3757,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3800,24 +3777,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3841,7 +3817,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let val := + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3853,7 +3829,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3869,7 +3845,7 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3880,11 +3856,7 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.U32, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U32 (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] @@ -3910,7 +3882,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let remaining := + let~ remaining := M.alloc (| M.rust_cast (M.read (| @@ -3951,7 +3923,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4081,8 +4053,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4116,7 +4088,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -4196,7 +4168,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4252,7 +4224,7 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4272,24 +4244,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -4301,8 +4272,8 @@ Module iter. "end" |) |) in - let acc := M.copy (| init |) in - let val := + let~ acc := M.copy (| init |) in + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -4314,7 +4285,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4339,7 +4310,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4358,7 +4329,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4369,7 +4345,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -4386,7 +4362,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| val, M.call_closure (| @@ -4461,7 +4437,7 @@ Module iter. (let r := M.alloc (| r |) in let step := M.alloc (| step |) in M.read (| - let inner_len := + let~ inner_len := M.copy (| M.SubPointer.get_tuple_field (| M.alloc (| @@ -4479,14 +4455,14 @@ Module iter. 0 |) |) in - let yield_count := + let~ yield_count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "div_ceil", [] |), [ M.read (| inner_len |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), M.rust_cast (M.read (| yield_count |)) @@ -4536,7 +4512,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4556,24 +4532,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -4597,7 +4572,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let val := + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -4609,7 +4584,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -4625,7 +4600,7 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -4636,11 +4611,7 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.U64, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U64 (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] @@ -4666,7 +4637,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let remaining := + let~ remaining := M.alloc (| M.rust_cast (M.read (| @@ -4707,7 +4678,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4837,8 +4808,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4872,7 +4843,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -4952,7 +4923,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5008,7 +4979,7 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5028,24 +4999,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5057,8 +5027,8 @@ Module iter. "end" |) |) in - let acc := M.copy (| init |) in - let val := + let~ acc := M.copy (| init |) in + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5070,7 +5040,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5095,7 +5065,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5114,7 +5084,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5125,7 +5100,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -5142,7 +5117,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| val, M.call_closure (| @@ -5217,7 +5192,7 @@ Module iter. (let r := M.alloc (| r |) in let step := M.alloc (| step |) in M.read (| - let inner_len := + let~ inner_len := M.copy (| M.SubPointer.get_tuple_field (| M.alloc (| @@ -5235,14 +5210,14 @@ Module iter. 0 |) |) in - let yield_count := + let~ yield_count := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "div_ceil", [] |), [ M.read (| inner_len |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| r, "core::ops::range::Range", "end" |), M.read (| M.use yield_count |) @@ -5292,7 +5267,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5312,24 +5287,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5353,7 +5327,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let val := + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5365,7 +5339,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5381,7 +5355,7 @@ Module iter. [ M.read (| val |); M.read (| step |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5392,11 +5366,7 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| val |) ] @@ -5422,7 +5392,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let remaining := + let~ remaining := M.copy (| M.use (M.SubPointer.get_struct_record_field (| @@ -5461,7 +5431,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5591,8 +5561,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5626,7 +5596,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -5706,7 +5676,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5762,7 +5732,7 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let step := + let~ step := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5782,24 +5752,23 @@ Module iter. [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); M.read (| M.get_constant (| "core::num::MAX" |) |) ] |) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5811,8 +5780,8 @@ Module iter. "end" |) |) in - let acc := M.copy (| init |) in - let val := + let~ acc := M.copy (| init |) in + let~ val := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -5824,7 +5793,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5849,7 +5818,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5868,7 +5837,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5879,7 +5853,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -5896,7 +5870,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| val, M.call_closure (| @@ -5977,22 +5951,21 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -6016,7 +5989,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let start := + let~ start := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -6028,7 +6001,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -6039,29 +6012,22 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.U8, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U8 (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.U8, - M.read (| start |), - BinOp.Panic.mul (| - Integer.U8, - M.read (| step |), - BinOp.Panic.sub (| - Integer.U8, - M.read (| remaining |), - Value.Integer 1 - |) - |) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| start |)) + (BinOp.Wrap.mul + Integer.U8 + (M.read (| step |)) + (BinOp.Wrap.sub + Integer.U8 + (M.read (| remaining |)) + (Value.Integer 1))) ] |))); fun γ => @@ -6092,7 +6058,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6192,8 +6158,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6227,7 +6193,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -6307,7 +6273,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6356,8 +6322,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6391,7 +6357,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -6411,7 +6377,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6469,22 +6435,21 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -6508,7 +6473,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let start := + let~ start := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -6520,7 +6485,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -6531,29 +6496,22 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.U16, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U16 (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.U16, - M.read (| start |), - BinOp.Panic.mul (| - Integer.U16, - M.read (| step |), - BinOp.Panic.sub (| - Integer.U16, - M.read (| remaining |), - Value.Integer 1 - |) - |) - |) + BinOp.Wrap.add + Integer.U16 + (M.read (| start |)) + (BinOp.Wrap.mul + Integer.U16 + (M.read (| step |)) + (BinOp.Wrap.sub + Integer.U16 + (M.read (| remaining |)) + (Value.Integer 1))) ] |))); fun γ => @@ -6584,7 +6542,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6684,8 +6642,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6719,7 +6677,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -6799,7 +6757,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6848,8 +6806,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6883,7 +6841,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -6903,7 +6861,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6961,22 +6919,21 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -7000,7 +6957,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let start := + let~ start := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -7012,7 +6969,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -7023,29 +6980,22 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.U32, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U32 (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.U32, - M.read (| start |), - BinOp.Panic.mul (| - Integer.U32, - M.read (| step |), - BinOp.Panic.sub (| - Integer.U32, - M.read (| remaining |), - Value.Integer 1 - |) - |) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| start |)) + (BinOp.Wrap.mul + Integer.U32 + (M.read (| step |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| remaining |)) + (Value.Integer 1))) ] |))); fun γ => @@ -7076,7 +7026,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7176,8 +7126,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7211,7 +7161,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -7291,7 +7241,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7340,8 +7290,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7375,7 +7325,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -7395,7 +7345,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7453,24 +7403,23 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let step := + let~ step := M.copy (| M.use (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::step_by::StepBy", "step" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |)) |) in - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -7494,7 +7443,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let start := + let~ start := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -7506,7 +7455,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -7517,29 +7466,22 @@ Module iter. "core::ops::range::Range", "end" |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| remaining |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| remaining |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| step |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| remaining |), - Value.Integer 1 - |) - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| step |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| remaining |)) + (Value.Integer 1))) ] |))); fun γ => @@ -7570,7 +7512,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7670,8 +7612,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7705,7 +7647,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -7785,7 +7727,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7834,8 +7776,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7869,7 +7811,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -7889,7 +7831,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/iter/adapters/take.v b/CoqOfRust/core/iter/adapters/take.v index 2d31d5f7d..173cb7599 100644 --- a/CoqOfRust/core/iter/adapters/take.v +++ b/CoqOfRust/core/iter/adapters/take.v @@ -190,7 +190,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -199,7 +199,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -270,7 +270,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -279,11 +279,10 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1)) |) in M.alloc (| M.call_closure (| @@ -306,7 +305,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -330,7 +329,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -346,21 +345,20 @@ Module iter. "core::iter::adapters::take::Take", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -407,7 +405,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -475,7 +473,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower := M.copy (| γ0_0 |) in let upper := M.copy (| γ0_1 |) in - let lower := + let~ lower := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -491,7 +489,7 @@ Module iter. ] |) |) in - let upper := + let~ upper := M.copy (| M.match_operator (| upper, @@ -621,7 +619,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let n := + (let~ n := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -750,7 +748,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let min := + let~ min := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), @@ -766,7 +764,7 @@ Module iter. ] |) |) in - let rem := + let~ rem := M.copy (| M.match_operator (| M.alloc (| @@ -820,11 +818,11 @@ Module iter. ] |) |) in - let advanced := + let~ advanced := M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| min |), M.read (| rem |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| min |)) (M.read (| rem |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -833,7 +831,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| advanced |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (M.read (| advanced |)) |) in M.alloc (| M.call_closure (| @@ -860,8 +858,7 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| advanced |) |) - ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| advanced |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -1018,7 +1015,7 @@ Module iter. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := + (let~ n := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1026,7 +1023,7 @@ Module iter. "n" |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1035,7 +1032,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -1110,7 +1107,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1149,11 +1146,11 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let m := + let~ m := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", @@ -1169,11 +1166,10 @@ Module iter. |) |) ] - |), - M.read (| n |) - |) + |)) + (M.read (| n |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1182,11 +1178,10 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1)) |) in M.alloc (| M.call_closure (| @@ -1209,7 +1204,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1225,7 +1220,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1241,11 +1236,10 @@ Module iter. "core::iter::adapters::take::Take", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (Value.Integer 1) ] |) |) in @@ -1322,7 +1316,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let len := + (let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1384,21 +1378,19 @@ Module iter. "core::iter::adapters::take::Take", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::take::Take", "n" |) - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) ] |) |) @@ -1503,7 +1495,7 @@ Module iter. init)); fun γ => ltac:(M.monadic - (let len := + (let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1565,21 +1557,19 @@ Module iter. "core::iter::adapters::take::Take", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::iter::adapters::take::Take", "n" |) - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) ] |) |) @@ -1653,7 +1643,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let trim_inner := + let~ trim_inner := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), @@ -1684,14 +1674,14 @@ Module iter. ] |) |) in - let advance_by := + let~ advance_by := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| trim_inner |); M.read (| n |) ] |) |) in - let remainder := + let~ remainder := M.copy (| M.match_operator (| M.alloc (| @@ -1745,23 +1735,18 @@ Module iter. ] |) |) in - let advanced_by_inner := + let~ advanced_by_inner := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| advance_by |), - M.read (| remainder |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| advance_by |)) (M.read (| remainder |)) |) in - let advanced_by := + let~ advanced_by := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| advanced_by_inner |), - M.read (| trim_inner |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| advanced_by_inner |)) + (M.read (| trim_inner |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1770,7 +1755,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| advanced_by |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (M.read (| advanced_by |)) |) in M.alloc (| M.call_closure (| @@ -1797,13 +1782,7 @@ Module iter. "new", [] |), - [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.read (| advanced_by |) - |) - ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| advanced_by |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -1971,7 +1950,7 @@ Module iter. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let remaining := + let~ remaining := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -1991,7 +1970,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2011,11 +1990,10 @@ Module iter. "core::iter::adapters::take::Take", "iter" |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| remaining |), - Value.Integer 1 - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| remaining |)) + (Value.Integer 1); M.call_closure (| M.get_associated_function (| Self, "check.spec_for_each", [] |), [ M.read (| f |) ] @@ -2073,8 +2051,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let acc := M.copy (| init |) in - let end_ := + let~ acc := M.copy (| init |) in + let~ end_ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), @@ -2105,7 +2083,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2130,7 +2108,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2149,7 +2127,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2161,7 +2144,7 @@ Module iter. 0 |) in let i := M.copy (| γ0_0 |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2181,7 +2164,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2228,7 +2211,7 @@ Module iter. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), @@ -2283,7 +2266,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2302,7 +2285,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2314,7 +2299,7 @@ Module iter. 0 |) in let i := M.copy (| γ0_0 |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2334,7 +2319,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/iter/adapters/take_while.v b/CoqOfRust/core/iter/adapters/take_while.v index cf2b0f8ab..4e6b8c5f3 100644 --- a/CoqOfRust/core/iter/adapters/take_while.v +++ b/CoqOfRust/core/iter/adapters/take_while.v @@ -237,7 +237,7 @@ Module iter. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let x := + (let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -357,7 +357,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -520,7 +520,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let flag := + (let~ flag := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -528,7 +528,7 @@ Module iter. "flag" |) |) in - let p := + let~ p := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/core/iter/adapters/zip.v b/CoqOfRust/core/iter/adapters/zip.v index aff83f59a..215eaa496 100644 --- a/CoqOfRust/core/iter/adapters/zip.v +++ b/CoqOfRust/core/iter/adapters/zip.v @@ -172,7 +172,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -202,7 +202,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -232,15 +232,14 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -248,7 +247,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -572,7 +571,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -651,7 +650,7 @@ Module iter. ] |) |) in - let y := + let~ y := M.copy (| M.match_operator (| M.alloc (| @@ -801,7 +800,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let a_sz := + let~ a_sz := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -820,7 +819,7 @@ Module iter. ] |) |) in - let b_sz := + let~ b_sz := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -839,7 +838,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -886,11 +885,10 @@ Module iter. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| a_sz |), - M.read (| b_sz |) - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| a_sz |)) + (M.read (| b_sz |))) ] ] |) @@ -901,7 +899,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -920,7 +918,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -933,7 +936,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -980,11 +983,10 @@ Module iter. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| b_sz |), - M.read (| a_sz |) - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| b_sz |)) + (M.read (| a_sz |))) ] ] |) @@ -995,7 +997,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1014,7 +1016,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1027,7 +1034,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1124,6 +1131,8 @@ Module iter. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in + let _ := M.is_struct_tuple (| γ0_1, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic @@ -1218,14 +1227,14 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let b_lower := M.copy (| γ0_0 |) in let b_upper := M.copy (| γ0_1 |) in - let lower := + let~ lower := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), [ M.read (| a_lower |); M.read (| b_lower |) ] |) |) in - let upper := + let~ upper := M.copy (| M.match_operator (| M.alloc (| @@ -1274,6 +1283,11 @@ Module iter. 0 |) in let x := M.copy (| γ1_0 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::option::Option::None" + |) in M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -1283,6 +1297,11 @@ Module iter. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::option::Option::None" + |) in let γ1_0 := M.SubPointer.get_struct_tuple_field (| γ0_1, @@ -1299,6 +1318,16 @@ Module iter. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::option::Option::None" + |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::option::Option::None" + |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) @@ -1467,7 +1496,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -1546,7 +1575,7 @@ Module iter. ] |) |) in - let y := + let~ y := M.copy (| M.match_operator (| M.alloc (| @@ -1696,7 +1725,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let a_sz := + let~ a_sz := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1715,7 +1744,7 @@ Module iter. ] |) |) in - let b_sz := + let~ b_sz := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1734,7 +1763,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1781,11 +1810,10 @@ Module iter. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| a_sz |), - M.read (| b_sz |) - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| a_sz |)) + (M.read (| b_sz |))) ] ] |) @@ -1796,7 +1824,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1815,7 +1843,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1828,7 +1861,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1875,11 +1908,10 @@ Module iter. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| b_sz |), - M.read (| a_sz |) - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| b_sz |)) + (M.read (| a_sz |))) ] ] |) @@ -1890,7 +1922,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1909,7 +1941,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1922,7 +1959,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2019,6 +2056,8 @@ Module iter. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in + let _ := M.is_struct_tuple (| γ0_1, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic @@ -2050,7 +2089,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let size := + let~ size := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -2117,19 +2156,18 @@ Module iter. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let idx := + let~ idx := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |), - M.read (| idx |) - |) + |)) + (M.read (| idx |)) |) in M.alloc (| Value.Tuple @@ -2201,8 +2239,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let len := + let~ accum := M.copy (| init |) in + let~ len := M.copy (| M.SubPointer.get_tuple_field (| M.alloc (| @@ -2220,7 +2258,7 @@ Module iter. 0 |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2245,7 +2283,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2264,7 +2302,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2276,7 +2319,7 @@ Module iter. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -2364,7 +2407,7 @@ Module iter. (let a := M.alloc (| a |) in let b := M.alloc (| b |) in M.read (| - let a_len := + let~ a_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2377,7 +2420,7 @@ Module iter. [ a ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -2471,7 +2514,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let i := + let~ i := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2479,7 +2522,7 @@ Module iter. "index" |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2488,7 +2531,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -2572,7 +2615,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let i := + let~ i := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2580,7 +2623,7 @@ Module iter. "index" |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2589,13 +2632,9 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2604,14 +2643,10 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2657,25 +2692,24 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple @@ -2724,47 +2758,45 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let delta := + let~ delta := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), [ M.read (| n |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |) - |) + |)) ] |) |) in - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "index" |) - |), - M.read (| delta |) - |) + |)) + (M.read (| delta |)) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2790,7 +2822,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let i := + let~ i := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2798,7 +2830,7 @@ Module iter. "index" |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2807,13 +2839,9 @@ Module iter. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2829,7 +2857,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2868,7 +2896,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2897,7 +2925,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2917,7 +2945,7 @@ Module iter. |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| delta |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| delta |)) ] |) |) @@ -2979,7 +3007,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3004,7 +3032,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let sz_a := + let~ sz_a := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3023,7 +3051,7 @@ Module iter. ] |) |) in - let sz_b := + let~ sz_b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3057,7 +3085,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let sz_a := + let~ sz_a := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3076,7 +3104,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3108,7 +3136,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3128,17 +3156,16 @@ Module iter. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| sz_a |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| sz_a |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |) - |)) + |))) ] ] |) @@ -3149,7 +3176,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3169,7 +3196,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -3182,7 +3214,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3191,13 +3223,12 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3223,7 +3254,7 @@ Module iter. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3236,7 +3267,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -3298,7 +3329,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -3352,7 +3383,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let sz_b := + let~ sz_b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3421,17 +3452,16 @@ Module iter. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| sz_b |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| sz_b |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::adapters::zip::Zip", "len" |) - |) - |)) + |))) ] ] |) @@ -3442,7 +3472,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3462,7 +3492,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -3475,7 +3510,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3536,7 +3571,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3545,9 +3580,9 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3556,9 +3591,9 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let i := + let~ i := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4201,8 +4236,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4230,7 +4265,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -4251,7 +4286,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4318,8 +4353,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4374,7 +4409,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let upper := M.copy (| γ0_0 |) in let more := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4404,7 +4439,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4423,7 +4458,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -4436,7 +4476,7 @@ Module iter. "core::option::Option::Some", 0 |) in - let pair_ := + let~ pair_ := M.alloc (| Value.Tuple [ @@ -4498,7 +4538,7 @@ Module iter. |) ] |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| diff --git a/CoqOfRust/core/iter/range.v b/CoqOfRust/core/iter/range.v index c1245dbbf..0224324be 100644 --- a/CoqOfRust/core/iter/range.v +++ b/CoqOfRust/core/iter/range.v @@ -333,7 +333,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -368,11 +368,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -407,7 +406,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -442,11 +441,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.U8, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U8 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -498,11 +496,10 @@ Module iter. "core::option::Option::Some" [ M.rust_cast - (BinOp.Panic.sub (| - Integer.U8, - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) + (BinOp.Wrap.sub + Integer.U8 + (M.read (| M.read (| end_ |) |)) + (M.read (| M.read (| start |) |))) ] |))); fun γ => @@ -708,7 +705,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -743,11 +740,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.I8, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I8 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -782,7 +778,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -817,11 +813,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.I8, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I8 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -946,7 +941,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_add", [] |), @@ -1044,7 +1039,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_sub", [] |), @@ -1167,7 +1162,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1202,11 +1197,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.U16, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U16 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -1241,7 +1235,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1276,11 +1270,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.U16, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U16 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -1332,11 +1325,10 @@ Module iter. "core::option::Option::Some" [ M.rust_cast - (BinOp.Panic.sub (| - Integer.U16, - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) + (BinOp.Wrap.sub + Integer.U16 + (M.read (| M.read (| end_ |) |)) + (M.read (| M.read (| start |) |))) ] |))); fun γ => @@ -1542,7 +1534,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1577,11 +1569,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.I16, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I16 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -1616,7 +1607,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1651,11 +1642,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.I16, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I16 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -1780,7 +1770,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_add", [] |), @@ -1878,7 +1868,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_sub", [] |), @@ -2001,7 +1991,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2036,11 +2026,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -2075,7 +2064,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2110,11 +2099,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -2166,11 +2154,10 @@ Module iter. "core::option::Option::Some" [ M.rust_cast - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.read (| end_ |) |)) + (M.read (| M.read (| start |) |))) ] |))); fun γ => @@ -2376,7 +2363,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2411,11 +2398,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.I32, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -2450,7 +2436,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2485,11 +2471,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I32 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -2614,7 +2599,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_add", [] |), @@ -2712,7 +2697,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_sub", [] |), @@ -2835,7 +2820,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2870,11 +2855,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -2909,7 +2893,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2944,11 +2928,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -3000,11 +2983,10 @@ Module iter. "core::option::Option::Some" [ M.rust_cast - (BinOp.Panic.sub (| - Integer.U64, - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |)) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| M.read (| end_ |) |)) + (M.read (| M.read (| start |) |))) ] |))); fun γ => @@ -3210,7 +3192,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3245,11 +3227,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.I64, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I64 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -3284,7 +3265,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3319,11 +3300,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.I64, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I64 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -3448,7 +3428,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_add", [] |), @@ -3546,7 +3526,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_sub", [] |), @@ -3669,7 +3649,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3704,11 +3684,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -3743,7 +3722,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3778,11 +3757,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -3836,11 +3814,10 @@ Module iter. M.read (| M.use (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.read (| end_ |) |)) + (M.read (| M.read (| start |) |)) |)) |) ] @@ -4048,7 +4025,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4083,11 +4060,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.Isize, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Isize + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -4122,7 +4098,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4157,11 +4133,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.Isize, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Isize + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -4286,7 +4261,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_add", [] |), @@ -4384,7 +4359,7 @@ Module iter. 0 |) in let n := M.copy (| γ0_0 |) in - let wrapped := + let~ wrapped := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), @@ -4507,7 +4482,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4542,11 +4517,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.U128, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U128 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -4581,7 +4555,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4616,11 +4590,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.U128, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U128 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -4685,11 +4658,10 @@ Module iter. [] |), [ - BinOp.Panic.sub (| - Integer.U128, - M.read (| M.read (| end_ |) |), - M.read (| M.read (| start |) |) - |) + BinOp.Wrap.sub + Integer.U128 + (M.read (| M.read (| end_ |) |)) + (M.read (| M.read (| start |) |)) ] |) ] @@ -4816,7 +4788,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4851,11 +4823,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.add (| - Integer.I128, - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I128 + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -4890,7 +4861,7 @@ Module iter. (let start := M.alloc (| start |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4925,11 +4896,10 @@ Module iter. M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.match_operator (| M.alloc (| - BinOp.Panic.sub (| - Integer.I128, - M.read (| M.get_constant (| "core::num::MIN" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I128 + (M.read (| M.get_constant (| "core::num::MIN" |) |)) + (Value.Integer 1) |), [ fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))); @@ -5023,7 +4993,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |))); fun γ => @@ -5128,8 +5099,8 @@ Module iter. (let γ := M.read (| γ |) in let end_ := M.copy (| γ |) in M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in - let end_ := M.alloc (| M.rust_cast (M.read (| end_ |)) |) in + let~ start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let~ end_ := M.alloc (| M.rust_cast (M.read (| end_ |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5145,13 +5116,12 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let count := + let~ count := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| end_ |), - M.read (| start |) - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| end_ |)) + (M.read (| start |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5198,11 +5168,10 @@ Module iter. [] |), [ - BinOp.Panic.sub (| - Integer.U32, - M.read (| count |), - Value.Integer 2048 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| count |)) + (Value.Integer 2048) ] |) ] @@ -5278,8 +5247,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in - let res := + let~ start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let~ res := M.copy (| M.match_operator (| M.alloc (| @@ -5352,7 +5321,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5369,7 +5338,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| res, M.read (| @@ -5511,8 +5480,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in - let res := + let~ start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let~ res := M.copy (| M.match_operator (| M.alloc (| @@ -5585,7 +5554,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5602,7 +5571,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| res, M.read (| @@ -5722,8 +5691,8 @@ Module iter. (let start := M.alloc (| start |) in let count := M.alloc (| count |) in M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in - let res := + let~ start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let~ res := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5736,7 +5705,7 @@ Module iter. [ M.read (| start |); M.read (| count |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5753,7 +5722,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| res, M.call_closure (| @@ -5804,8 +5773,8 @@ Module iter. (let start := M.alloc (| start |) in let count := M.alloc (| count |) in M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in - let res := + let~ start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let~ res := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5818,7 +5787,7 @@ Module iter. [ M.read (| start |); M.read (| count |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5835,7 +5804,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| res, M.call_closure (| @@ -5959,7 +5928,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let end_ := + let~ end_ := M.copy (| M.match_operator (| M.alloc (| @@ -6074,7 +6043,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let end_ := + let~ end_ := M.copy (| M.match_operator (| M.alloc (| @@ -6193,7 +6162,7 @@ Module iter. (let start := M.alloc (| start |) in let count := M.alloc (| count |) in M.read (| - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6247,7 +6216,7 @@ Module iter. (let start := M.alloc (| start |) in let count := M.alloc (| count |) in M.read (| - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6897,7 +6866,7 @@ Module iter. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6988,7 +6957,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7066,7 +7035,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7122,7 +7091,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7170,7 +7139,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let available := + let~ available := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7241,14 +7210,14 @@ Module iter. ] |) |) in - let taken := + let~ taken := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), [ M.read (| available |); M.read (| n |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7313,7 +7282,7 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| taken |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -7367,7 +7336,7 @@ Module iter. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7462,7 +7431,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7540,7 +7509,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7601,7 +7570,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7649,7 +7618,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let available := + let~ available := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7720,14 +7689,14 @@ Module iter. ] |) |) in - let taken := + let~ taken := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), [ M.read (| available |); M.read (| n |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7792,7 +7761,7 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| taken |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -7868,7 +7837,7 @@ Module iter. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let old := + let~ old := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7876,7 +7845,7 @@ Module iter. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7930,7 +7899,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7999,7 +7968,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8031,7 +8000,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8079,7 +8048,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let available := + let~ available := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8150,14 +8119,14 @@ Module iter. ] |) |) in - let taken := + let~ taken := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), [ M.read (| available |); M.read (| n |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8209,7 +8178,7 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| taken |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -8263,7 +8232,7 @@ Module iter. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8336,7 +8305,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8405,7 +8374,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8445,7 +8414,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8490,7 +8459,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let available := + let~ available := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8561,14 +8530,14 @@ Module iter. ] |) |) in - let taken := + let~ taken := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), [ M.read (| available |); M.read (| n |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8620,7 +8589,7 @@ Module iter. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| taken |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| taken |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -8720,7 +8689,7 @@ Module iter. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let hint := + let~ hint := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9610,7 +9579,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::range::Step", A, [], "forward", [] |), @@ -9684,7 +9653,7 @@ Module iter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let plus_n := + let~ plus_n := M.alloc (| M.call_closure (| M.get_trait_method (| "core::iter::range::Step", A, [], "forward", [] |), @@ -9703,7 +9672,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9800,7 +9769,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9830,7 +9799,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_iterating := + let~ is_iterating := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", A, [ A ], "lt", [] |), @@ -9864,7 +9833,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9920,7 +9889,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9997,7 +9966,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10038,8 +10007,8 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -10077,7 +10046,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10118,7 +10087,7 @@ Module iter. ] |) |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_function (| "core::mem::replace", [ A ] |), @@ -10132,7 +10101,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -10211,7 +10180,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -10222,7 +10191,7 @@ Module iter. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10231,7 +10200,7 @@ Module iter. |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10264,7 +10233,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -10402,7 +10371,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10432,7 +10401,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_iterating := + let~ is_iterating := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", A, [ A ], "lt", [] |), @@ -10466,7 +10435,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10522,7 +10491,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10599,7 +10568,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10640,8 +10609,8 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -10679,7 +10648,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10720,7 +10689,7 @@ Module iter. ] |) |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_function (| "core::mem::replace", [ A ] |), @@ -10734,7 +10703,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -10813,7 +10782,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -10824,7 +10793,7 @@ Module iter. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10833,7 +10802,7 @@ Module iter. |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10866,7 +10835,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -11024,7 +10993,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11054,7 +11023,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_iterating := + let~ is_iterating := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", T, [ T ], "lt", [] |), @@ -11088,7 +11057,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11134,7 +11103,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11211,7 +11180,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11252,8 +11221,8 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -11291,7 +11260,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11322,7 +11291,7 @@ Module iter. ] |) |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_function (| "core::mem::replace", [ T ] |), @@ -11336,7 +11305,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -11415,7 +11384,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -11426,7 +11395,7 @@ Module iter. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11435,7 +11404,7 @@ Module iter. |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11468,7 +11437,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -11606,7 +11575,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11636,7 +11605,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_iterating := + let~ is_iterating := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", T, [ T ], "lt", [] |), @@ -11670,7 +11639,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11716,7 +11685,7 @@ Module iter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11793,7 +11762,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11834,8 +11803,8 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -11873,7 +11842,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11904,7 +11873,7 @@ Module iter. ] |) |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_function (| "core::mem::replace", [ T ] |), @@ -11918,7 +11887,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -11997,7 +11966,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -12008,7 +11977,7 @@ Module iter. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12017,7 +11986,7 @@ Module iter. |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12050,7 +12019,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -12230,7 +12199,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12325,7 +12294,8 @@ Module iter. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [ M.read (| M.get_constant (| "core::num::MAX" |) |); @@ -12359,7 +12329,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12498,7 +12468,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12528,7 +12498,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12601,10 +12571,12 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Less" |) in M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12650,10 +12622,12 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12671,7 +12645,7 @@ Module iter. [ plus_n ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12694,7 +12668,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12712,7 +12686,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12993,7 +12967,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13023,7 +12997,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13096,10 +13070,15 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Greater" + |) in M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13145,10 +13124,12 @@ Module iter. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13166,7 +13147,7 @@ Module iter. [ minus_n ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13189,7 +13170,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13207,7 +13188,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/core/iter/sources/once_with.v b/CoqOfRust/core/iter/sources/once_with.v index db766b249..21aa49ba9 100644 --- a/CoqOfRust/core/iter/sources/once_with.v +++ b/CoqOfRust/core/iter/sources/once_with.v @@ -178,7 +178,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let f := + let~ f := M.copy (| M.match_operator (| M.alloc (| diff --git a/CoqOfRust/core/iter/sources/repeat_n.v b/CoqOfRust/core/iter/sources/repeat_n.v index 1ec884a78..a292b6a48 100644 --- a/CoqOfRust/core/iter/sources/repeat_n.v +++ b/CoqOfRust/core/iter/sources/repeat_n.v @@ -25,7 +25,7 @@ Module iter. (let element := M.alloc (| element |) in let count := M.alloc (| count |) in M.read (| - let element := + let~ element := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -36,7 +36,7 @@ Module iter. [ M.read (| element |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -47,7 +47,7 @@ Module iter. (M.alloc (| BinOp.Pure.eq (M.read (| count |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -241,7 +241,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -300,7 +300,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -358,7 +358,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -394,7 +394,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -403,7 +403,7 @@ Module iter. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple @@ -507,7 +507,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -556,7 +556,7 @@ Module iter. (let self := M.alloc (| self |) in let skip := M.alloc (| skip |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -564,7 +564,7 @@ Module iter. "count" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -577,7 +577,7 @@ Module iter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -613,25 +613,24 @@ Module iter. [] |), [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| skip |), - M.read (| len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| skip |)) + (M.read (| len |)) ] |) ] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::iter::sources::repeat_n::RepeatN", "count" |), - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| skip |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| skip |)) |) in M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] diff --git a/CoqOfRust/core/iter/sources/repeat_with.v b/CoqOfRust/core/iter/sources/repeat_with.v index b299b5b5c..d058ffdf2 100644 --- a/CoqOfRust/core/iter/sources/repeat_with.v +++ b/CoqOfRust/core/iter/sources/repeat_with.v @@ -219,7 +219,7 @@ Module iter. M.read (| M.loop (| ltac:(M.monadic - (let item := + (let~ item := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -239,7 +239,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| init, M.read (| diff --git a/CoqOfRust/core/iter/sources/successors.v b/CoqOfRust/core/iter/sources/successors.v index 89759ca8f..9400c91cf 100644 --- a/CoqOfRust/core/iter/sources/successors.v +++ b/CoqOfRust/core/iter/sources/successors.v @@ -115,7 +115,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let item := + let~ item := M.copy (| M.match_operator (| M.alloc (| @@ -190,7 +190,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/core/iter/traits/accum.v b/CoqOfRust/core/iter/traits/accum.v index 5cd5c21a2..e2f20e7cf 100644 --- a/CoqOfRust/core/iter/traits/accum.v +++ b/CoqOfRust/core/iter/traits/accum.v @@ -58,11 +58,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.I8, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.I8 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -130,11 +129,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I8, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.I8 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -360,11 +358,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.I16, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.I16 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -432,11 +429,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I16, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.I16 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -662,11 +658,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.I32, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.I32 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -734,11 +729,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I32, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.I32 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -964,11 +958,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.I64, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.I64 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -1036,11 +1029,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I64, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.I64 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -1266,11 +1258,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.I128, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.I128 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -1338,11 +1329,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I128, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.I128 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -1568,11 +1558,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Isize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.Isize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -1640,11 +1629,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.Isize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.Isize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -1870,11 +1858,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.U8, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.U8 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -1942,11 +1929,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.U8, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.U8 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -2172,11 +2158,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.U16, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.U16 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -2244,11 +2229,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.U16, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.U16 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -2474,11 +2458,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.U32, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.U32 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -2546,11 +2529,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.U32, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.U32 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -2776,11 +2758,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.U64, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.U64 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -2848,11 +2829,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.U64, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.U64 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -3078,11 +3058,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.U128, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.U128 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -3150,11 +3129,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.U128, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.U128 + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -3380,11 +3358,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -3452,11 +3429,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.Usize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.Usize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -8434,11 +8410,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -8506,11 +8481,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.Usize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.Usize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -8736,11 +8710,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] @@ -8808,11 +8781,10 @@ Module iter. fun γ => ltac:(M.monadic (let b := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.Usize, - M.read (| a |), - M.read (| b |) - |))) + BinOp.Wrap.mul + Integer.Usize + (M.read (| a |)) + (M.read (| b |)))) ] |))) ] diff --git a/CoqOfRust/core/iter/traits/collect.v b/CoqOfRust/core/iter/traits/collect.v index bfc4ba075..11a8b60cf 100644 --- a/CoqOfRust/core/iter/traits/collect.v +++ b/CoqOfRust/core/iter/traits/collect.v @@ -57,7 +57,7 @@ Module iter. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -211,7 +211,7 @@ Module iter. let γ1_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.alloc (| γ1_0 |) in let b := M.alloc (| γ1_1 |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -243,7 +243,7 @@ Module iter. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower_bound := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -261,7 +261,7 @@ Module iter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -274,7 +274,7 @@ Module iter. [ M.read (| a |); M.read (| lower_bound |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -291,7 +291,7 @@ Module iter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -334,7 +334,7 @@ Module iter. (let self := M.alloc (| self |) in let item := M.alloc (| item |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -350,7 +350,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -389,7 +389,7 @@ Module iter. (let self := M.alloc (| self |) in let additional := M.alloc (| additional |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -405,7 +405,7 @@ Module iter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/iter/traits/double_ended.v b/CoqOfRust/core/iter/traits/double_ended.v index b855cd671..2a2322e35 100644 --- a/CoqOfRust/core/iter/traits/double_ended.v +++ b/CoqOfRust/core/iter/traits/double_ended.v @@ -15,7 +15,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -40,7 +40,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -59,7 +59,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -123,11 +128,10 @@ Module iter. [] |), [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.read (| i |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (M.read (| i |)) ] |) ] @@ -165,7 +169,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -248,8 +252,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -277,7 +281,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -357,7 +361,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -398,8 +402,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -427,7 +431,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -447,7 +451,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -691,8 +695,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -720,7 +724,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -740,7 +744,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -780,8 +784,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -809,7 +813,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -889,7 +893,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/iter/traits/exact_size.v b/CoqOfRust/core/iter/traits/exact_size.v index 0c03d10a9..413941082 100644 --- a/CoqOfRust/core/iter/traits/exact_size.v +++ b/CoqOfRust/core/iter/traits/exact_size.v @@ -32,7 +32,7 @@ Module iter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lower := M.copy (| γ0_0 |) in let upper := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -87,7 +87,7 @@ Module iter. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" diff --git a/CoqOfRust/core/iter/traits/iterator.v b/CoqOfRust/core/iter/traits/iterator.v index b9e701415..f917b870a 100644 --- a/CoqOfRust/core/iter/traits/iterator.v +++ b/CoqOfRust/core/iter/traits/iterator.v @@ -79,11 +79,10 @@ Module iter. [ fun γ => ltac:(M.monadic - (BinOp.Panic.add (| - Integer.Usize, - M.read (| count |), - Value.Integer 1 - |))) + (BinOp.Wrap.add + Integer.Usize + (M.read (| count |)) + (Value.Integer 1))) ] |))) ] @@ -135,7 +134,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -160,7 +159,7 @@ Module iter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -179,7 +178,12 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -243,11 +247,10 @@ Module iter. [] |), [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.read (| i |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (M.read (| i |)) ] |) ] @@ -282,7 +285,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -533,7 +536,7 @@ Module iter. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -954,7 +957,7 @@ Module iter. (let self := M.alloc (| self |) in let collection := M.alloc (| collection |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -981,21 +984,21 @@ Module iter. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let left := + let~ left := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", B, [], "default", [] |), [] |) |) in - let right := + let~ right := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", B, [], "default", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1035,8 +1038,8 @@ Module iter. ltac:(M.monadic (let predicate := M.alloc (| γ |) in M.read (| - let true_count := M.alloc (| Value.Integer 0 |) in - let _ := + let~ true_count := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1109,22 +1112,21 @@ Module iter. 0 |) in let tail := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", [ T ] |), [ M.read (| head |); M.read (| tail |) ] |) |) in - let _ := + let~ _ := let β := true_count in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1139,7 +1141,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1210,8 +1212,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1239,7 +1241,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -1319,7 +1321,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1385,8 +1387,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1414,7 +1416,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -1434,7 +1436,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1461,7 +1463,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let first := + let~ first := M.copy (| M.match_operator (| M.alloc (| @@ -1566,7 +1568,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let first := + let~ first := M.copy (| M.match_operator (| M.alloc (| @@ -1594,7 +1596,8 @@ Module iter. i)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -2012,7 +2015,7 @@ Module iter. (let self := M.alloc (| self |) in let predicate := M.alloc (| predicate |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2459,7 +2462,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let unzipped := + let~ unzipped := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2472,7 +2475,7 @@ Module iter. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3089,8 +3092,14 @@ Module iter. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -3180,8 +3189,15 @@ Module iter. M.find_or_pattern (| γ0_0, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -3245,7 +3261,7 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let last := + let~ last := M.copy (| M.match_operator (| M.alloc (| @@ -3273,7 +3289,8 @@ Module iter. e)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.Bool true |) |) |) |))) ] @@ -3490,7 +3507,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::cmp::Ordering::Equal" [] |))); fun γ => @@ -3577,7 +3596,9 @@ Module iter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::ops::control_flow::ControlFlow::Break" [ @@ -3854,8 +3875,8 @@ Module iter. let init := M.alloc (| init |) in let f := M.alloc (| f |) in M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3883,7 +3904,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.call_closure (| @@ -3903,7 +3924,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3943,8 +3964,8 @@ Module iter. M.catch_return (| ltac:(M.monadic (M.read (| - let accum := M.copy (| init |) in - let _ := + let~ accum := M.copy (| init |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3972,7 +3993,7 @@ Module iter. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| accum, M.read (| @@ -4052,7 +4073,7 @@ Module iter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/iter/traits/unchecked_iterator.v b/CoqOfRust/core/iter/traits/unchecked_iterator.v index c812d1d73..4a6d4fd83 100644 --- a/CoqOfRust/core/iter/traits/unchecked_iterator.v +++ b/CoqOfRust/core/iter/traits/unchecked_iterator.v @@ -12,7 +12,7 @@ Module iter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let opt := + let~ opt := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/mem/maybe_uninit.v b/CoqOfRust/core/mem/maybe_uninit.v index 952f960a3..b90d738d6 100644 --- a/CoqOfRust/core/mem/maybe_uninit.v +++ b/CoqOfRust/core/mem/maybe_uninit.v @@ -204,7 +204,7 @@ Module mem. | [], [] => ltac:(M.monadic (M.read (| - let u := + let~ u := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -215,7 +215,7 @@ Module mem. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -261,7 +261,7 @@ Module mem. (let self := M.alloc (| self |) in let val := M.alloc (| val |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -348,7 +348,7 @@ Module mem. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assert_inhabited", [ T ] |), @@ -398,7 +398,7 @@ Module mem. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assert_inhabited", [ T ] |), @@ -479,7 +479,7 @@ Module mem. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assert_inhabited", [ T ] |), @@ -521,7 +521,7 @@ Module mem. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assert_inhabited", [ T ] |), @@ -566,7 +566,7 @@ Module mem. ltac:(M.monadic (let array := M.alloc (| array |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -722,7 +722,7 @@ Module mem. (let this := M.alloc (| this |) in let src := M.alloc (| src |) in M.read (| - let uninit_src := + let~ uninit_src := M.alloc (| M.call_closure (| M.get_function (| @@ -741,7 +741,7 @@ Module mem. [ M.read (| src |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -825,7 +825,7 @@ Module mem. (let this := M.alloc (| this |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -882,7 +882,7 @@ Module mem. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -931,7 +931,7 @@ Module mem. |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -944,7 +944,7 @@ Module mem. [ M.read (| this |) ] |) |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -960,13 +960,13 @@ Module mem. ] |) |) in - let guard := + let~ guard := M.alloc (| Value.StructRecord "core::mem::maybe_uninit::write_slice_cloned::Guard" [ ("slice", M.read (| this |)); ("initialized", Value.Integer 0) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -991,7 +991,7 @@ Module mem. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1010,7 +1010,9 @@ Module mem. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1022,7 +1024,7 @@ Module mem. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1061,7 +1063,7 @@ Module mem. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| guard, @@ -1070,11 +1072,10 @@ Module mem. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -1083,7 +1084,7 @@ Module mem. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1210,7 +1211,7 @@ Module mem. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let bytes := + let~ bytes := M.alloc (| M.call_closure (| M.get_function (| @@ -1268,7 +1269,7 @@ Module mem. ltac:(M.monadic (let this := M.alloc (| this |) in M.read (| - let bytes := + let~ bytes := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/mem/mod.v b/CoqOfRust/core/mem/mod.v index 70e4ee100..ef2497765 100644 --- a/CoqOfRust/core/mem/mod.v +++ b/CoqOfRust/core/mem/mod.v @@ -225,7 +225,7 @@ Module mem. | [ T ], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assert_zero_valid", [ T ] |), @@ -279,14 +279,14 @@ Module mem. | [ T ], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assert_mem_uninitialized_valid", [ T ] |), [] |) |) in - let val := + let~ val := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -297,7 +297,7 @@ Module mem. [] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -305,7 +305,7 @@ Module mem. ltac:(M.monadic (let γ := M.use (M.alloc (| UnOp.Pure.not (Value.Bool false) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -385,7 +385,7 @@ Module mem. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -395,17 +395,16 @@ Module mem. M.use (M.alloc (| BinOp.Pure.gt - (BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::mem::align_of", [ T ] |), [] - |) - |)) + |))) (Value.Integer 4) |)) in let _ := @@ -425,7 +424,7 @@ Module mem. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap_simple", [ T ] |), @@ -475,22 +474,22 @@ Module mem. (let x := M.alloc (| x |) in let y := M.alloc (| y |) in M.read (| - let a := + let~ a := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), [ M.read (| x |) ] |) |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), [ M.read (| y |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), [ M.read (| x |); M.read (| b |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -552,14 +551,14 @@ Module mem. (let dest := M.alloc (| dest |) in let src := M.alloc (| src |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), [ M.read (| dest |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::write", [ T ] |), @@ -627,7 +626,7 @@ Module mem. ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -839,7 +838,7 @@ Module mem. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.associated, [], "hash", [ H ] |), diff --git a/CoqOfRust/core/net/display_buffer.v b/CoqOfRust/core/net/display_buffer.v index 658a452db..e5f1461aa 100644 --- a/CoqOfRust/core/net/display_buffer.v +++ b/CoqOfRust/core/net/display_buffer.v @@ -64,7 +64,7 @@ Module net. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -146,7 +146,7 @@ Module net. (let self := M.alloc (| self |) in let s := M.alloc (| s |) in M.read (| - let bytes := + let~ bytes := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes", [] |), @@ -192,24 +192,23 @@ Module net. |) |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::net::display_buffer::DisplayBuffer", "len" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| bytes |) ] - |) - |)) + |))) ] ] |) @@ -221,7 +220,7 @@ Module net. 0 |) in let buf := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -234,7 +233,7 @@ Module net. [ M.read (| buf |); M.read (| bytes |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -243,18 +242,17 @@ Module net. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| bytes |) ] - |) - |) + |)) |) in M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] diff --git a/CoqOfRust/core/net/ip_addr.v b/CoqOfRust/core/net/ip_addr.v index 4ef3f755d..ce6bd5ef6 100644 --- a/CoqOfRust/core/net/ip_addr.v +++ b/CoqOfRust/core/net/ip_addr.v @@ -134,7 +134,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -144,7 +144,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -264,7 +264,7 @@ Module net. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -274,7 +274,7 @@ Module net. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -359,7 +359,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -369,7 +369,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -485,7 +485,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -495,7 +495,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -515,7 +515,8 @@ Module net. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), [ fun γ => @@ -1036,7 +1037,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1046,7 +1047,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1134,7 +1135,7 @@ Module net. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1183,30 +1184,65 @@ Module net. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::net::ip_addr::Ipv6MulticastScope::InterfaceLocal" + |) in M.alloc (| M.read (| Value.String "InterfaceLocal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::net::ip_addr::Ipv6MulticastScope::LinkLocal" + |) in M.alloc (| M.read (| Value.String "LinkLocal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::net::ip_addr::Ipv6MulticastScope::RealmLocal" + |) in M.alloc (| M.read (| Value.String "RealmLocal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::net::ip_addr::Ipv6MulticastScope::AdminLocal" + |) in M.alloc (| M.read (| Value.String "AdminLocal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::net::ip_addr::Ipv6MulticastScope::SiteLocal" + |) in M.alloc (| M.read (| Value.String "SiteLocal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::net::ip_addr::Ipv6MulticastScope::OrganizationLocal" + |) in M.alloc (| M.read (| Value.String "OrganizationLocal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::net::ip_addr::Ipv6MulticastScope::Global" + |) in M.alloc (| M.read (| Value.String "Global" |) |))) ] |) @@ -2954,7 +2990,7 @@ Module net. (let self := M.alloc (| self |) in let fmt := M.alloc (| fmt |) in M.read (| - let octets := + let~ octets := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3109,7 +3145,7 @@ Module net. |))); fun γ => ltac:(M.monadic - (let buf := + (let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3120,7 +3156,7 @@ Module net. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3842,7 +3878,7 @@ Module net. let g := M.alloc (| g |) in let h := M.alloc (| h |) in M.read (| - let addr16 := + let~ addr16 := M.alloc (| Value.Array [ @@ -5513,7 +5549,7 @@ Module net. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5725,7 +5761,7 @@ Module net. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let segments := + let~ segments := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5802,9 +5838,9 @@ Module net. |))); fun γ => ltac:(M.monadic - (let zeroes := + (let~ zeroes := M.copy (| - let longest := + let~ longest := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5817,7 +5853,7 @@ Module net. [] |) |) in - let current := + let~ current := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5830,7 +5866,7 @@ Module net. [] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5882,7 +5918,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5907,7 +5943,12 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -5952,7 +5993,7 @@ Module net. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -5982,7 +6023,7 @@ Module net. Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| current, @@ -6001,7 +6042,7 @@ Module net. |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| current, @@ -6010,11 +6051,10 @@ Module net. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| @@ -6047,7 +6087,7 @@ Module net. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| longest, M.read (| @@ -6066,7 +6106,7 @@ Module net. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| current, M.call_closure (| @@ -6117,7 +6157,7 @@ Module net. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6228,7 +6268,7 @@ Module net. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6336,23 +6376,22 @@ Module net. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| zeroes, "core::net::ip_addr::fmt::Span", "start" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| zeroes, "core::net::ip_addr::fmt::Span", "len" |) - |) - |)) + |))) ] ] |) @@ -6380,7 +6419,7 @@ Module net. |))); fun γ => ltac:(M.monadic - (let buf := + (let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6391,7 +6430,7 @@ Module net. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7104,7 +7143,7 @@ Module net. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7131,7 +7170,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7150,7 +7189,9 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7162,7 +7203,7 @@ Module net. 0 |) in let octet := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| octet |), UnOp.Pure.not (M.read (| M.read (| octet |) |)) @@ -7246,7 +7287,7 @@ Module net. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7273,7 +7314,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7292,7 +7333,9 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7304,7 +7347,7 @@ Module net. 0 |) in let octet := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| octet |), UnOp.Pure.not (M.read (| M.read (| octet |) |)) @@ -7436,7 +7479,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7462,7 +7505,9 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7477,7 +7522,7 @@ Module net. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let lhs := M.copy (| γ1_0 |) in let rhs := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7524,7 +7569,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7570,7 +7615,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7616,7 +7661,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7664,8 +7709,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7712,8 +7757,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7809,7 +7854,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7835,7 +7880,9 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7850,7 +7897,7 @@ Module net. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let lhs := M.copy (| γ1_0 |) in let rhs := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7897,7 +7944,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7943,7 +7990,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7989,7 +8036,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8037,8 +8084,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8085,8 +8132,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8182,7 +8229,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8208,7 +8255,9 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -8223,7 +8272,7 @@ Module net. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let lhs := M.copy (| γ1_0 |) in let rhs := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8270,7 +8319,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8316,7 +8365,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8362,7 +8411,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8410,8 +8459,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8458,8 +8507,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8555,7 +8604,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8581,7 +8630,9 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -8596,7 +8647,7 @@ Module net. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let lhs := M.copy (| γ1_0 |) in let rhs := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8643,7 +8694,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8689,7 +8740,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8735,7 +8786,7 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8783,8 +8834,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8831,8 +8882,8 @@ Module net. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let lhs := M.copy (| M.read (| self |) |) in - let _ := + let~ lhs := M.copy (| M.read (| self |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/net/parser.v b/CoqOfRust/core/net/parser.v index 381937f4b..69ac96995 100644 --- a/CoqOfRust/core/net/parser.v +++ b/CoqOfRust/core/net/parser.v @@ -749,7 +749,7 @@ Module net. (let self := M.alloc (| self |) in let inner := M.alloc (| inner |) in M.read (| - let state := + let~ state := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -757,7 +757,7 @@ Module net. "state" |) |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -773,7 +773,7 @@ Module net. [ M.read (| inner |); Value.Tuple [ M.read (| self |) ] ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -793,7 +793,7 @@ Module net. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -831,7 +831,7 @@ Module net. let inner := M.alloc (| inner |) in let kind := M.alloc (| kind |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1050,7 +1050,7 @@ Module net. let b := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1250,7 +1250,7 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1268,7 +1268,7 @@ Module net. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1446,14 +1446,14 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let result := + let~ result := M.copy (| M.get_constant (| "core::net::parser::ReadNumberHelper::ZERO" |) |) in - let digit_count := M.alloc (| Value.Integer 0 |) in - let has_leading_zero := + let~ digit_count := M.alloc (| Value.Integer 0 |) in + let~ has_leading_zero := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1488,7 +1488,7 @@ Module net. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1658,7 +1658,7 @@ Module net. 0 |) in let digit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| result, M.read (| @@ -1741,7 +1741,7 @@ Module net. |) |) |) in - let _ := + let~ _ := M.write (| result, M.read (| @@ -1824,15 +1824,14 @@ Module net. |) |) |) in - let _ := + let~ _ := let β := digit_count in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1890,7 +1889,7 @@ Module net. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -2029,8 +2028,8 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let groups := M.alloc (| repeat (Value.Integer 0) 4 |) in - let _ := + let~ groups := M.alloc (| repeat (Value.Integer 0) 4 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2080,7 +2079,7 @@ Module net. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2105,7 +2104,12 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -2130,7 +2134,7 @@ Module net. |) in let i := M.copy (| γ1_0 |) in let slot := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.write (| M.read (| slot |), M.read (| @@ -2430,7 +2434,7 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let head := M.alloc (| repeat (Value.Integer 0) 8 |) in + let~ head := M.alloc (| repeat (Value.Integer 0) 8 |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2449,7 +2453,7 @@ Module net. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head_size := M.copy (| γ0_0 |) in let head_ipv4 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2498,7 +2502,7 @@ Module net. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2525,7 +2529,7 @@ Module net. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2602,7 +2606,7 @@ Module net. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2679,18 +2683,16 @@ Module net. val)) ] |) in - let tail := M.alloc (| repeat (Value.Integer 0) 7 |) in - let limit := + let~ tail := M.alloc (| repeat (Value.Integer 0) 7 |) in + let~ limit := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 8, - BinOp.Panic.add (| - Integer.Usize, - M.read (| head_size |), - Value.Integer 1 - |) - |) + BinOp.Wrap.sub + Integer.Usize + (Value.Integer 8) + (BinOp.Wrap.add + Integer.Usize + (M.read (| head_size |)) + (Value.Integer 1)) |) in M.match_operator (| M.alloc (| @@ -2732,7 +2734,7 @@ Module net. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let tail_size := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2764,11 +2766,10 @@ Module net. "core::ops::range::Range" [ ("start", - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 8, - M.read (| tail_size |) - |)); + BinOp.Wrap.sub + Integer.Usize + (Value.Integer 8) + (M.read (| tail_size |))); ("end_", Value.Integer 8) ] ] @@ -2968,7 +2969,7 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3105,7 +3106,7 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3246,7 +3247,7 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let ip := + let~ ip := M.copy (| M.match_operator (| M.alloc (| @@ -3323,7 +3324,7 @@ Module net. ] |) |) in - let port := + let~ port := M.copy (| M.match_operator (| M.alloc (| @@ -3473,7 +3474,7 @@ Module net. ltac:(M.monadic (let p := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3547,7 +3548,7 @@ Module net. val)) ] |) in - let ip := + let~ ip := M.copy (| M.match_operator (| M.alloc (| @@ -3624,7 +3625,7 @@ Module net. ] |) |) in - let scope_id := + let~ scope_id := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3647,7 +3648,7 @@ Module net. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3721,7 +3722,7 @@ Module net. val)) ] |) in - let port := + let~ port := M.copy (| M.match_operator (| M.alloc (| @@ -4686,26 +4687,35 @@ Module net. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ip" |) in M.alloc (| M.read (| Value.String "Ip" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ipv4" |) in M.alloc (| M.read (| Value.String "Ipv4" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ipv6" |) in M.alloc (| M.read (| Value.String "Ipv6" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Socket" |) in M.alloc (| M.read (| Value.String "Socket" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::net::parser::AddrKind::SocketV4" |) in M.alloc (| M.read (| Value.String "SocketV4" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::net::parser::AddrKind::SocketV6" |) in M.alloc (| M.read (| Value.String "SocketV6" |) |))) ] |) @@ -4739,26 +4749,32 @@ Module net. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ip" |) in M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Ip" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ipv4" |) in M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Ipv4" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ipv6" |) in M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Ipv6" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Socket" |) in M.alloc (| Value.StructTuple "core::net::parser::AddrKind::Socket" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::SocketV4" |) in M.alloc (| Value.StructTuple "core::net::parser::AddrKind::SocketV4" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::SocketV6" |) in M.alloc (| Value.StructTuple "core::net::parser::AddrKind::SocketV6" [] |))) ] |) @@ -4796,7 +4812,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -4806,7 +4822,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -5112,26 +5128,32 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid IP address syntax" |) |))); + (let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ip" |) in + M.alloc (| M.read (| Value.String "invalid IP address syntax" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid IPv4 address syntax" |) |))); + (let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ipv4" |) in + M.alloc (| M.read (| Value.String "invalid IPv4 address syntax" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid IPv6 address syntax" |) |))); + (let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Ipv6" |) in + M.alloc (| M.read (| Value.String "invalid IPv6 address syntax" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid socket address syntax" |) |))); + (let _ := M.is_struct_tuple (| γ, "core::net::parser::AddrKind::Socket" |) in + M.alloc (| M.read (| Value.String "invalid socket address syntax" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::net::parser::AddrKind::SocketV4" |) in + M.alloc (| M.read (| Value.String "invalid IPv4 socket address syntax" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| - M.read (| Value.String "invalid IPv6 socket address syntax" |) - |))) + (let _ := + M.is_struct_tuple (| γ, "core::net::parser::AddrKind::SocketV6" |) in + M.alloc (| M.read (| Value.String "invalid IPv6 socket address syntax" |) |))) ] |) |))) diff --git a/CoqOfRust/core/net/socket_addr.v b/CoqOfRust/core/net/socket_addr.v index d909378b6..0779669c4 100644 --- a/CoqOfRust/core/net/socket_addr.v +++ b/CoqOfRust/core/net/socket_addr.v @@ -89,7 +89,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -99,7 +99,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -264,7 +264,7 @@ Module net. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -274,7 +274,7 @@ Module net. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -359,7 +359,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -369,7 +369,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -485,7 +485,7 @@ Module net. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -495,7 +495,7 @@ Module net. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -515,7 +515,8 @@ Module net. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), [ fun γ => @@ -817,7 +818,8 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "u16", [], "cmp", [] |), [ @@ -896,6 +898,7 @@ Module net. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -948,7 +951,7 @@ Module net. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1254,7 +1257,8 @@ Module net. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "u16", [], "cmp", [] |), @@ -1275,7 +1279,8 @@ Module net. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1302,7 +1307,9 @@ Module net. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -1399,6 +1406,7 @@ Module net. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -1432,6 +1440,7 @@ Module net. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -1465,6 +1474,11 @@ Module net. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1529,7 +1543,7 @@ Module net. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1549,7 +1563,7 @@ Module net. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u16", [], "hash", [ __H ] |), @@ -1563,7 +1577,7 @@ Module net. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u32", [], "hash", [ __H ] |), @@ -2112,7 +2126,7 @@ Module net. (let self := M.alloc (| self |) in let new_ip := M.alloc (| new_ip |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2162,7 +2176,7 @@ Module net. (let self := M.alloc (| self |) in let new_port := M.alloc (| new_port |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2240,7 +2254,7 @@ Module net. (let self := M.alloc (| self |) in let new_ip := M.alloc (| new_ip |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2290,7 +2304,7 @@ Module net. (let self := M.alloc (| self |) in let new_port := M.alloc (| new_port |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2340,7 +2354,7 @@ Module net. (let self := M.alloc (| self |) in let new_flowinfo := M.alloc (| new_flowinfo |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2391,7 +2405,7 @@ Module net. (let self := M.alloc (| self |) in let new_scope_id := M.alloc (| new_scope_id |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2774,7 +2788,7 @@ Module net. |))); fun γ => ltac:(M.monadic - (let buf := + (let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2785,7 +2799,7 @@ Module net. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3228,7 +3242,7 @@ Module net. |))); fun γ => ltac:(M.monadic - (let buf := + (let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3239,7 +3253,7 @@ Module net. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/core/num/bignum.v b/CoqOfRust/core/num/bignum.v index c4743687d..53a14e596 100644 --- a/CoqOfRust/core/num/bignum.v +++ b/CoqOfRust/core/num/bignum.v @@ -27,30 +27,26 @@ Module num. let other2 := M.alloc (| other2 |) in let carry := M.alloc (| carry |) in M.read (| - let v := + let~ v := M.alloc (| - BinOp.Panic.add (| - Integer.U16, - BinOp.Panic.add (| - Integer.U16, - BinOp.Panic.mul (| - Integer.U16, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| other |)) - |), - M.rust_cast (M.read (| other2 |)) - |), - M.rust_cast (M.read (| carry |)) - |) + BinOp.Wrap.add + Integer.U16 + (BinOp.Wrap.add + Integer.U16 + (BinOp.Wrap.mul + Integer.U16 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| other |)))) + (M.rust_cast (M.read (| other2 |)))) + (M.rust_cast (M.read (| carry |))) |) in M.alloc (| Value.Tuple [ M.rust_cast - (BinOp.Panic.shr (| - M.read (| v |), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |)); + (BinOp.Wrap.shr + (M.read (| v |)) + (M.read (| M.get_constant (| "core::num::BITS" |) |))); M.rust_cast (M.read (| v |)) ] |) @@ -75,7 +71,7 @@ Module num. let other := M.alloc (| other |) in let borrow := M.alloc (| borrow |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -84,7 +80,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -120,23 +116,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let lhs := + let~ lhs := M.alloc (| BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast (M.read (| borrow |)), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |)) + (BinOp.Wrap.shl + (M.rust_cast (M.read (| borrow |))) + (M.read (| M.get_constant (| "core::num::BITS" |) |))) (M.rust_cast (M.read (| self |))) |) in - let rhs := M.alloc (| M.rust_cast (M.read (| other |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| other |)) |) in M.alloc (| Value.Tuple [ - M.rust_cast - (BinOp.Panic.div (| Integer.U16, M.read (| lhs |), M.read (| rhs |) |)); - M.rust_cast - (BinOp.Panic.rem (| Integer.U16, M.read (| lhs |), M.read (| rhs |) |)) + M.rust_cast (BinOp.Wrap.div Integer.U16 (M.read (| lhs |)) (M.read (| rhs |))); + M.rust_cast (BinOp.Wrap.rem Integer.U16 (M.read (| lhs |)) (M.read (| rhs |))) ] |) |))) @@ -176,30 +169,26 @@ Module num. let other2 := M.alloc (| other2 |) in let carry := M.alloc (| carry |) in M.read (| - let v := + let~ v := M.alloc (| - BinOp.Panic.add (| - Integer.U32, - BinOp.Panic.add (| - Integer.U32, - BinOp.Panic.mul (| - Integer.U32, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| other |)) - |), - M.rust_cast (M.read (| other2 |)) - |), - M.rust_cast (M.read (| carry |)) - |) + BinOp.Wrap.add + Integer.U32 + (BinOp.Wrap.add + Integer.U32 + (BinOp.Wrap.mul + Integer.U32 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| other |)))) + (M.rust_cast (M.read (| other2 |)))) + (M.rust_cast (M.read (| carry |))) |) in M.alloc (| Value.Tuple [ M.rust_cast - (BinOp.Panic.shr (| - M.read (| v |), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |)); + (BinOp.Wrap.shr + (M.read (| v |)) + (M.read (| M.get_constant (| "core::num::BITS" |) |))); M.rust_cast (M.read (| v |)) ] |) @@ -224,7 +213,7 @@ Module num. let other := M.alloc (| other |) in let borrow := M.alloc (| borrow |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -233,7 +222,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -269,23 +258,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let lhs := + let~ lhs := M.alloc (| BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast (M.read (| borrow |)), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |)) + (BinOp.Wrap.shl + (M.rust_cast (M.read (| borrow |))) + (M.read (| M.get_constant (| "core::num::BITS" |) |))) (M.rust_cast (M.read (| self |))) |) in - let rhs := M.alloc (| M.rust_cast (M.read (| other |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| other |)) |) in M.alloc (| Value.Tuple [ - M.rust_cast - (BinOp.Panic.div (| Integer.U32, M.read (| lhs |), M.read (| rhs |) |)); - M.rust_cast - (BinOp.Panic.rem (| Integer.U32, M.read (| lhs |), M.read (| rhs |) |)) + M.rust_cast (BinOp.Wrap.div Integer.U32 (M.read (| lhs |)) (M.read (| rhs |))); + M.rust_cast (BinOp.Wrap.rem Integer.U32 (M.read (| lhs |)) (M.read (| rhs |))) ] |) |))) @@ -325,30 +311,26 @@ Module num. let other2 := M.alloc (| other2 |) in let carry := M.alloc (| carry |) in M.read (| - let v := + let~ v := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.mul (| - Integer.U64, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| other |)) - |), - M.rust_cast (M.read (| other2 |)) - |), - M.rust_cast (M.read (| carry |)) - |) + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.mul + Integer.U64 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| other |)))) + (M.rust_cast (M.read (| other2 |)))) + (M.rust_cast (M.read (| carry |))) |) in M.alloc (| Value.Tuple [ M.rust_cast - (BinOp.Panic.shr (| - M.read (| v |), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |)); + (BinOp.Wrap.shr + (M.read (| v |)) + (M.read (| M.get_constant (| "core::num::BITS" |) |))); M.rust_cast (M.read (| v |)) ] |) @@ -373,7 +355,7 @@ Module num. let other := M.alloc (| other |) in let borrow := M.alloc (| borrow |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -382,7 +364,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -418,23 +400,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let lhs := + let~ lhs := M.alloc (| BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast (M.read (| borrow |)), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |)) + (BinOp.Wrap.shl + (M.rust_cast (M.read (| borrow |))) + (M.read (| M.get_constant (| "core::num::BITS" |) |))) (M.rust_cast (M.read (| self |))) |) in - let rhs := M.alloc (| M.rust_cast (M.read (| other |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| other |)) |) in M.alloc (| Value.Tuple [ - M.rust_cast - (BinOp.Panic.div (| Integer.U64, M.read (| lhs |), M.read (| rhs |) |)); - M.rust_cast - (BinOp.Panic.rem (| Integer.U64, M.read (| lhs |), M.read (| rhs |) |)) + M.rust_cast (BinOp.Wrap.div Integer.U64 (M.read (| lhs |)) (M.read (| rhs |))); + M.rust_cast (BinOp.Wrap.rem Integer.U64 (M.read (| lhs |)) (M.read (| rhs |))) ] |) |))) @@ -491,8 +470,8 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer 0) 40 |) in - let _ := + let~ base := M.alloc (| repeat (Value.Integer 0) 40 |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| base, M.alloc (| Value.Integer 0 |) |), M.read (| v |) @@ -526,9 +505,9 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer 0) 40 |) in - let sz := M.alloc (| Value.Integer 0 |) in - let _ := + let~ base := M.alloc (| repeat (Value.Integer 0) 40 |) in + let~ sz := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -541,25 +520,24 @@ Module num. (M.alloc (| BinOp.Pure.gt (M.read (| v |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| base, sz |), M.rust_cast (M.read (| v |)) |) in - let _ := + let~ _ := let β := v in M.write (| β, - BinOp.Panic.shr (| - M.read (| β |), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |) + BinOp.Wrap.shr + (M.read (| β |)) + (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -567,7 +545,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -645,21 +623,21 @@ Module num. (let self := M.alloc (| self |) in let i := M.alloc (| i |) in M.read (| - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let d := + let~ d := M.alloc (| - BinOp.Panic.div (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + BinOp.Wrap.div Integer.Usize (M.read (| i |)) (M.read (| digitbits |)) |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.rem (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + BinOp.Wrap.rem Integer.Usize (M.read (| i |)) (M.read (| digitbits |)) |) in M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| - M.read (| + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -668,9 +646,8 @@ Module num. |), d |) - |), - M.read (| b |) - |)) + |)) + (M.read (| b |))) (Value.Integer 1)) |) |))) @@ -764,9 +741,9 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let digits := + let~ digits := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -777,7 +754,7 @@ Module num. [ M.read (| self |) ] |) |) in - let msd := + let~ msd := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -835,16 +812,15 @@ Module num. |) in let msd := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - M.read (| msd |), - M.read (| digitbits |) - |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (M.read (| msd |)) + (M.read (| digitbits |))) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u32", "ilog2", [] |), [ @@ -852,10 +828,8 @@ Module num. M.SubPointer.get_array_field (| M.read (| digits |), msd |) |) ] - |)) - |), - Value.Integer 1 - |) + |)))) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) ] @@ -893,7 +867,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), @@ -915,8 +889,8 @@ Module num. ] |) |) in - let carry := M.alloc (| Value.Bool false |) in - let _ := + let~ carry := M.alloc (| Value.Bool false |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1004,7 +978,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1030,7 +1004,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1069,9 +1045,9 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| v |) |) in - let _ := M.write (| carry, M.read (| c |) |) in + let~ _ := M.write (| carry, M.read (| c |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -1081,7 +1057,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1090,7 +1066,7 @@ Module num. (let γ := M.use carry in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1102,17 +1078,17 @@ Module num. |), Value.Integer 1 |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1179,7 +1155,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let carry := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1191,8 +1167,8 @@ Module num. |), M.read (| v |) |) in - let i := M.alloc (| Value.Integer 1 |) in - let _ := + let~ i := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1237,7 +1213,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1249,16 +1225,15 @@ Module num. |), M.read (| v |) |) in - let _ := M.write (| carry, M.read (| c |) |) in - let _ := + let~ _ := M.write (| carry, M.read (| c |) |) in + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -1268,7 +1243,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1279,7 +1254,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1303,7 +1278,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1349,7 +1324,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), @@ -1371,8 +1346,8 @@ Module num. ] |) |) in - let noborrow := M.alloc (| Value.Bool true |) in - let _ := + let~ noborrow := M.alloc (| Value.Bool true |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1460,7 +1435,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1486,7 +1461,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1525,9 +1502,9 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| v |) |) in - let _ := M.write (| noborrow, M.read (| c |) |) in + let~ _ := M.write (| noborrow, M.read (| c |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -1537,7 +1514,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1557,7 +1534,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1597,7 +1574,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1605,8 +1582,8 @@ Module num. "size" |) |) in - let carry := M.alloc (| Value.Integer 0 |) in - let _ := + let~ carry := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1650,7 +1627,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1669,7 +1646,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1705,9 +1684,9 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| v |) |) in - let _ := M.write (| carry, M.read (| c |) |) in + let~ _ := M.write (| carry, M.read (| c |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -1717,7 +1696,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1728,7 +1707,7 @@ Module num. (M.alloc (| BinOp.Pure.gt (M.read (| carry |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1740,17 +1719,17 @@ Module num. |), M.read (| carry |) |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1812,17 +1791,17 @@ Module num. (let self := M.alloc (| self |) in let bits := M.alloc (| bits |) in M.read (| - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let digits := + let~ digits := M.alloc (| - BinOp.Panic.div (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + BinOp.Wrap.div Integer.Usize (M.read (| bits |)) (M.read (| digitbits |)) |) in - let bits := + let~ bits := M.alloc (| - BinOp.Panic.rem (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + BinOp.Wrap.rem Integer.Usize (M.read (| bits |)) (M.read (| digitbits |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1846,7 +1825,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1855,7 +1834,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1915,11 +1894,10 @@ Module num. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 40, - M.read (| digits |) - |)) + BinOp.Wrap.sub + Integer.Usize + (Value.Integer 40) + (M.read (| digits |))) ] ] |) @@ -1973,7 +1951,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1982,7 +1960,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1996,8 +1974,8 @@ Module num. BinOp.Pure.eq (M.read (| bits |)) (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2005,24 +1983,20 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 40, - M.read (| digits |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (Value.Integer 40) + (M.read (| digits |))) + (Value.Integer 1) |) |) - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| digitbits |), - M.read (| bits |) - |) - |)) + |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| digitbits |)) + (M.read (| bits |)))) (Value.Integer 0))) |)) |)) in @@ -2051,7 +2025,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2099,7 +2073,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2122,7 +2096,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2134,7 +2110,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -2143,11 +2119,10 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| digits |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| digits |)) |) |), M.read (| @@ -2168,7 +2143,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2193,7 +2168,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2212,7 +2187,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2224,7 +2201,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -2243,21 +2220,20 @@ Module num. |))) ] |)) in - let sz := + let~ sz := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::Big32x40", "size" |) - |), - M.read (| digits |) - |) + |)) + (M.read (| digits |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2268,11 +2244,11 @@ Module num. (M.alloc (| BinOp.Pure.gt (M.read (| bits |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let last := M.copy (| sz |) in - let overflow := + let~ last := M.copy (| sz |) in + let~ overflow := M.alloc (| - BinOp.Panic.shr (| - M.read (| + BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2280,22 +2256,19 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| last |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| last |)) + (Value.Integer 1) |) |) - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| digitbits |), - M.read (| bits |) - |) - |) + |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| digitbits |)) + (M.read (| bits |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2311,7 +2284,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -2323,21 +2296,20 @@ Module num. |), M.read (| overflow |) |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2371,11 +2343,10 @@ Module num. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| digits |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| digits |)) + (Value.Integer 1)); ("end_", M.read (| last |)) ] ] @@ -2389,7 +2360,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2412,7 +2383,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2424,7 +2400,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -2435,8 +2411,8 @@ Module num. i |), BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.read (| + (BinOp.Wrap.shl + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2445,11 +2421,10 @@ Module num. |), i |) - |), - M.read (| bits |) - |)) - (BinOp.Panic.shr (| - M.read (| + |)) + (M.read (| bits |))) + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2457,20 +2432,17 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| digitbits |), - M.read (| bits |) - |) - |)) + |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| digitbits |)) + (M.read (| bits |)))) |) in M.alloc (| Value.Tuple [] |))) ] @@ -2479,7 +2451,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -2489,15 +2461,12 @@ Module num. |), digits |) in - M.write (| - β, - BinOp.Panic.shl (| M.read (| β |), M.read (| bits |) |) - |) in + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| bits |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2547,7 +2516,7 @@ Module num. (let self := M.alloc (| self |) in let e := M.alloc (| e |) in M.read (| - let table_index := + let~ table_index := M.alloc (| M.rust_cast (M.call_closure (| @@ -2572,8 +2541,8 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let small_power := M.copy (| γ0_0 |) in let small_e := M.copy (| γ0_1 |) in - let small_power := M.alloc (| M.rust_cast (M.read (| small_power |)) |) in - let _ := + let~ small_power := M.alloc (| M.rust_cast (M.read (| small_power |)) |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2591,7 +2560,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2602,15 +2571,14 @@ Module num. [ M.read (| self |); M.read (| small_power |) ] |) |) in - let _ := + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| small_e |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| small_e |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2618,7 +2586,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2629,8 +2597,8 @@ Module num. ] |))) |) in - let rest_power := M.alloc (| Value.Integer 1 |) in - let _ := + let~ rest_power := M.alloc (| Value.Integer 1 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2655,7 +2623,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2674,7 +2642,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2685,15 +2658,14 @@ Module num. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := let β := rest_power in M.write (| β, - BinOp.Panic.mul (| - Integer.U32, - M.read (| β |), - Value.Integer 5 - |) + BinOp.Wrap.mul + Integer.U32 + (M.read (| β |)) + (Value.Integer 5) |) in M.alloc (| Value.Tuple [] |))) ] @@ -2702,7 +2674,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2769,8 +2741,8 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let ret := M.alloc (| repeat (Value.Integer 0) 40 |) in - let retsz := + let~ ret := M.alloc (| repeat (Value.Integer 0) 40 |) in + let~ retsz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2838,7 +2810,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2847,7 +2819,7 @@ Module num. |), M.read (| ret |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2886,7 +2858,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2910,7 +2882,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let sz := + let~ sz := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2918,8 +2890,8 @@ Module num. "size" |) |) in - let borrow := M.alloc (| Value.Integer 0 |) in - let _ := + let~ borrow := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2986,7 +2958,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3009,7 +2981,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3047,9 +3021,9 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let q := M.copy (| γ0_0 |) in let r := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| q |) |) in - let _ := M.write (| borrow, M.read (| r |) |) in + let~ _ := M.write (| borrow, M.read (| r |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -3112,7 +3086,7 @@ Module num. let q := M.alloc (| q |) in let r := M.alloc (| r |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3145,9 +3119,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3188,7 +3162,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3207,7 +3181,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3219,7 +3195,7 @@ Module num. 0 |) in let digit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| digit |), Value.Integer 0 |) in M.alloc (| Value.Tuple [] |))) ] @@ -3228,7 +3204,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3269,7 +3245,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3288,7 +3264,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3300,7 +3278,7 @@ Module num. 0 |) in let digit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| digit |), Value.Integer 0 |) in M.alloc (| Value.Tuple [] |))) ] @@ -3309,7 +3287,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| r |), @@ -3324,7 +3302,7 @@ Module num. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| q |), @@ -3333,8 +3311,8 @@ Module num. |), Value.Integer 1 |) in - let q_is_zero := M.alloc (| Value.Bool true |) in - let end_ := + let~ q_is_zero := M.alloc (| Value.Bool true |) in + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3345,7 +3323,7 @@ Module num. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3383,7 +3361,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3406,7 +3384,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3418,7 +3398,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3429,7 +3409,7 @@ Module num. [ M.read (| r |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -3490,7 +3470,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3501,23 +3481,21 @@ Module num. [ M.read (| r |); M.read (| d |) ] |) |) in - let digit_idx := + let~ digit_idx := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| i |), - M.read (| digitbits |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| i |)) + (M.read (| digitbits |)) |) in - let bit_idx := + let~ bit_idx := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.read (| i |), - M.read (| digitbits |) - |) + BinOp.Wrap.rem + Integer.Usize + (M.read (| i |)) + (M.read (| digitbits |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3529,20 +3507,19 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| q |), "core::num::bignum::Big32x40", "size" |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| digit_idx |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| digit_idx |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| q_is_zero, Value.Bool false @@ -3553,7 +3530,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -3567,10 +3544,9 @@ Module num. β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| - Value.Integer 1, - M.read (| bit_idx |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| bit_idx |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -3582,7 +3558,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3591,7 +3567,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3711,7 +3687,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3720,7 +3696,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3983,7 +3959,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), @@ -4005,7 +3981,7 @@ Module num. ] |) |) in - let lhs := + let~ lhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4064,7 +4040,7 @@ Module num. ] |) |) in - let rhs := + let~ rhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4229,7 +4205,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let sz := + let~ sz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4265,15 +4241,14 @@ Module num. ] |) |) in - let digitlen := + let~ digitlen := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)), - Value.Integer 4 - |) + BinOp.Wrap.div + Integer.Usize + (M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |))) + (Value.Integer 4) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4324,11 +4299,10 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| sz |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| sz |)) + (Value.Integer 1) |) |) ] @@ -4425,7 +4399,7 @@ Module num. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4478,11 +4452,10 @@ Module num. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| sz |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| sz |)) + (Value.Integer 1)) ] ] |) @@ -4499,7 +4472,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4522,7 +4495,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4535,7 +4513,7 @@ Module num. |) in let γ0_0 := M.read (| γ0_0 |) in let v := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4741,8 +4719,8 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer 0) 3 |) in - let _ := + let~ base := M.alloc (| repeat (Value.Integer 0) 3 |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| base, M.alloc (| Value.Integer 0 |) |), M.read (| v |) @@ -4776,9 +4754,9 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let base := M.alloc (| repeat (Value.Integer 0) 3 |) in - let sz := M.alloc (| Value.Integer 0 |) in - let _ := + let~ base := M.alloc (| repeat (Value.Integer 0) 3 |) in + let~ sz := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4796,29 +4774,24 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| base, sz |), M.rust_cast (M.read (| v |)) |) in - let _ := + let~ _ := let β := v in M.write (| β, - BinOp.Panic.shr (| - M.read (| β |), - M.read (| M.get_constant (| "core::num::BITS" |) |) - |) + BinOp.Wrap.shr + (M.read (| β |)) + (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4826,7 +4799,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4906,21 +4879,21 @@ Module num. (let self := M.alloc (| self |) in let i := M.alloc (| i |) in M.read (| - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let d := + let~ d := M.alloc (| - BinOp.Panic.div (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + BinOp.Wrap.div Integer.Usize (M.read (| i |)) (M.read (| digitbits |)) |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.rem (| Integer.Usize, M.read (| i |), M.read (| digitbits |) |) + BinOp.Wrap.rem Integer.Usize (M.read (| i |)) (M.read (| digitbits |)) |) in M.use (M.alloc (| BinOp.Pure.bit_and - (BinOp.Panic.shr (| - M.read (| + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4929,9 +4902,8 @@ Module num. |), d |) - |), - M.read (| b |) - |)) + |)) + (M.read (| b |))) (Value.Integer 1) |)) |))) @@ -5025,9 +4997,9 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let digits := + let~ digits := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5038,7 +5010,7 @@ Module num. [ M.read (| self |) ] |) |) in - let msd := + let~ msd := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5096,16 +5068,15 @@ Module num. |) in let msd := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - M.read (| msd |), - M.read (| digitbits |) - |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (M.read (| msd |)) + (M.read (| digitbits |))) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u8", "ilog2", [] |), [ @@ -5113,10 +5084,8 @@ Module num. M.SubPointer.get_array_field (| M.read (| digits |), msd |) |) ] - |)) - |), - Value.Integer 1 - |) + |)))) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) ] @@ -5154,7 +5123,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), @@ -5176,8 +5145,8 @@ Module num. ] |) |) in - let carry := M.alloc (| Value.Bool false |) in - let _ := + let~ carry := M.alloc (| Value.Bool false |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5265,7 +5234,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5291,7 +5260,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5330,9 +5304,9 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| v |) |) in - let _ := M.write (| carry, M.read (| c |) |) in + let~ _ := M.write (| carry, M.read (| c |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -5342,7 +5316,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5351,7 +5325,7 @@ Module num. (let γ := M.use carry in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -5363,17 +5337,17 @@ Module num. |), Value.Integer 1 |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5440,7 +5414,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let carry := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -5452,8 +5426,8 @@ Module num. |), M.read (| v |) |) in - let i := M.alloc (| Value.Integer 1 |) in - let _ := + let~ i := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5499,7 +5473,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -5511,16 +5485,15 @@ Module num. |), M.read (| v |) |) in - let _ := M.write (| carry, M.read (| c |) |) in - let _ := + let~ _ := M.write (| carry, M.read (| c |) |) in + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -5530,7 +5503,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5541,7 +5514,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5565,7 +5538,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5611,7 +5584,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), @@ -5633,8 +5606,8 @@ Module num. ] |) |) in - let noborrow := M.alloc (| Value.Bool true |) in - let _ := + let~ noborrow := M.alloc (| Value.Bool true |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5722,7 +5695,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5748,7 +5721,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5787,9 +5765,10 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| v |) |) in - let _ := M.write (| noborrow, M.read (| c |) |) in + let~ _ := + M.write (| noborrow, M.read (| c |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -5799,7 +5778,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5819,7 +5798,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5859,7 +5838,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5867,8 +5846,8 @@ Module num. "size" |) |) in - let carry := M.alloc (| Value.Integer 0 |) in - let _ := + let~ carry := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5912,7 +5891,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5931,7 +5910,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5967,9 +5951,9 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let v := M.copy (| γ0_0 |) in let c := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| v |) |) in - let _ := M.write (| carry, M.read (| c |) |) in + let~ _ := M.write (| carry, M.read (| c |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -5979,7 +5963,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5992,7 +5976,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6004,17 +5988,17 @@ Module num. |), M.read (| carry |) |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6076,17 +6060,17 @@ Module num. (let self := M.alloc (| self |) in let bits := M.alloc (| bits |) in M.read (| - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let digits := + let~ digits := M.alloc (| - BinOp.Panic.div (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + BinOp.Wrap.div Integer.Usize (M.read (| bits |)) (M.read (| digitbits |)) |) in - let bits := + let~ bits := M.alloc (| - BinOp.Panic.rem (| Integer.Usize, M.read (| bits |), M.read (| digitbits |) |) + BinOp.Wrap.rem Integer.Usize (M.read (| bits |)) (M.read (| digitbits |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6111,7 +6095,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6120,7 +6104,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6181,11 +6165,10 @@ Module num. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 3, - M.read (| digits |) - |)) + BinOp.Wrap.sub + Integer.Usize + (Value.Integer 3) + (M.read (| digits |))) ] ] |) @@ -6239,7 +6222,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6248,7 +6231,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6262,8 +6245,8 @@ Module num. BinOp.Pure.eq (M.read (| bits |)) (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6271,24 +6254,20 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 3, - M.read (| digits |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (Value.Integer 3) + (M.read (| digits |))) + (Value.Integer 1) |) |) - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| digitbits |), - M.read (| bits |) - |) - |)) + |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| digitbits |)) + (M.read (| bits |)))) (Value.Integer 0))) |)) |)) in @@ -6317,7 +6296,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -6365,7 +6344,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6388,7 +6367,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6400,7 +6384,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6409,11 +6393,10 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| digits |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| digits |)) |) |), M.read (| @@ -6434,7 +6417,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -6459,7 +6442,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6478,7 +6461,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6490,7 +6478,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6509,21 +6497,20 @@ Module num. |))) ] |)) in - let sz := + let~ sz := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::bignum::tests::Big8x3", "size" |) - |), - M.read (| digits |) - |) + |)) + (M.read (| digits |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6534,11 +6521,11 @@ Module num. (M.alloc (| BinOp.Pure.gt (M.read (| bits |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let last := M.copy (| sz |) in - let overflow := + let~ last := M.copy (| sz |) in + let~ overflow := M.alloc (| - BinOp.Panic.shr (| - M.read (| + BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6546,22 +6533,19 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| last |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| last |)) + (Value.Integer 1) |) |) - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| digitbits |), - M.read (| bits |) - |) - |) + |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| digitbits |)) + (M.read (| bits |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6577,7 +6561,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6589,21 +6573,20 @@ Module num. |), M.read (| overflow |) |) in - let _ := + let~ _ := let β := sz in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -6637,11 +6620,10 @@ Module num. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| digits |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| digits |)) + (Value.Integer 1)); ("end_", M.read (| last |)) ] ] @@ -6655,7 +6637,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6678,7 +6660,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6690,7 +6677,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6701,8 +6688,8 @@ Module num. i |), BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.read (| + (BinOp.Wrap.shl + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6711,11 +6698,10 @@ Module num. |), i |) - |), - M.read (| bits |) - |)) - (BinOp.Panic.shr (| - M.read (| + |)) + (M.read (| bits |))) + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6723,20 +6709,17 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| digitbits |), - M.read (| bits |) - |) - |)) + |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| digitbits |)) + (M.read (| bits |)))) |) in M.alloc (| Value.Tuple [] |))) ] @@ -6745,7 +6728,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -6755,15 +6738,12 @@ Module num. |), digits |) in - M.write (| - β, - BinOp.Panic.shl (| M.read (| β |), M.read (| bits |) |) - |) in + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| bits |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6813,7 +6793,7 @@ Module num. (let self := M.alloc (| self |) in let e := M.alloc (| e |) in M.read (| - let table_index := + let~ table_index := M.alloc (| M.rust_cast (M.call_closure (| @@ -6838,8 +6818,8 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let small_power := M.copy (| γ0_0 |) in let small_e := M.copy (| γ0_1 |) in - let small_power := M.alloc (| M.rust_cast (M.read (| small_power |)) |) in - let _ := + let~ small_power := M.alloc (| M.rust_cast (M.read (| small_power |)) |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6857,7 +6837,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6868,15 +6848,14 @@ Module num. [ M.read (| self |); M.read (| small_power |) ] |) |) in - let _ := + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| small_e |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| small_e |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -6884,7 +6863,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6895,8 +6874,8 @@ Module num. ] |))) |) in - let rest_power := M.alloc (| Value.Integer 1 |) in - let _ := + let~ rest_power := M.alloc (| Value.Integer 1 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -6923,7 +6902,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6942,7 +6921,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6953,15 +6937,14 @@ Module num. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := let β := rest_power in M.write (| β, - BinOp.Panic.mul (| - Integer.U8, - M.read (| β |), - Value.Integer 5 - |) + BinOp.Wrap.mul + Integer.U8 + (M.read (| β |)) + (Value.Integer 5) |) in M.alloc (| Value.Tuple [] |))) ] @@ -6970,7 +6953,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7037,8 +7020,8 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let ret := M.alloc (| repeat (Value.Integer 0) 3 |) in - let retsz := + let~ ret := M.alloc (| repeat (Value.Integer 0) 3 |) in + let~ retsz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7106,7 +7089,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7115,7 +7098,7 @@ Module num. |), M.read (| ret |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7154,7 +7137,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7178,7 +7161,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let sz := + let~ sz := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7186,8 +7169,8 @@ Module num. "size" |) |) in - let borrow := M.alloc (| Value.Integer 0 |) in - let _ := + let~ borrow := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7254,7 +7237,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7277,7 +7260,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7315,9 +7303,9 @@ Module num. M.SubPointer.get_tuple_field (| γ, 1 |) in let q := M.copy (| γ0_0 |) in let r := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| a |), M.read (| q |) |) in - let _ := M.write (| borrow, M.read (| r |) |) in + let~ _ := M.write (| borrow, M.read (| r |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -7380,7 +7368,7 @@ Module num. let q := M.alloc (| q |) in let r := M.alloc (| r |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7413,9 +7401,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let digitbits := + let~ digitbits := M.alloc (| M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7456,7 +7444,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7475,7 +7463,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7487,7 +7480,7 @@ Module num. 0 |) in let digit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| digit |), Value.Integer 0 |) in M.alloc (| Value.Tuple [] |))) ] @@ -7496,7 +7489,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7537,7 +7530,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7556,7 +7549,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7568,7 +7566,7 @@ Module num. 0 |) in let digit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| digit |), Value.Integer 0 |) in M.alloc (| Value.Tuple [] |))) ] @@ -7577,7 +7575,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| r |), @@ -7592,7 +7590,7 @@ Module num. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| q |), @@ -7601,8 +7599,8 @@ Module num. |), Value.Integer 1 |) in - let q_is_zero := M.alloc (| Value.Bool true |) in - let end_ := + let~ q_is_zero := M.alloc (| Value.Bool true |) in + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7613,7 +7611,7 @@ Module num. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -7651,7 +7649,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7674,7 +7672,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -7686,7 +7689,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7697,7 +7700,7 @@ Module num. [ M.read (| r |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -7765,7 +7768,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7777,23 +7780,21 @@ Module num. [ M.read (| r |); M.read (| d |) ] |) |) in - let digit_idx := + let~ digit_idx := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| i |), - M.read (| digitbits |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| i |)) + (M.read (| digitbits |)) |) in - let bit_idx := + let~ bit_idx := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.read (| i |), - M.read (| digitbits |) - |) + BinOp.Wrap.rem + Integer.Usize + (M.read (| i |)) + (M.read (| digitbits |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7805,20 +7806,19 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| q |), "core::num::bignum::tests::Big8x3", "size" |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| digit_idx |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| digit_idx |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| q_is_zero, Value.Bool false @@ -7829,7 +7829,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -7843,10 +7843,9 @@ Module num. β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| - Value.Integer 1, - M.read (| bit_idx |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| bit_idx |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -7859,7 +7858,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7868,7 +7867,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7989,7 +7988,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7998,7 +7997,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8262,7 +8261,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let sz := + let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), @@ -8284,7 +8283,7 @@ Module num. ] |) |) in - let lhs := + let~ lhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8343,7 +8342,7 @@ Module num. ] |) |) in - let rhs := + let~ rhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8508,7 +8507,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let sz := + let~ sz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8544,15 +8543,14 @@ Module num. ] |) |) in - let digitlen := + let~ digitlen := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |)), - Value.Integer 4 - |) + BinOp.Wrap.div + Integer.Usize + (M.rust_cast (M.read (| M.get_constant (| "core::num::BITS" |) |))) + (Value.Integer 4) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8605,11 +8603,10 @@ Module num. "base" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| sz |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| sz |)) + (Value.Integer 1) |) |) ] @@ -8708,7 +8705,7 @@ Module num. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -8761,11 +8758,10 @@ Module num. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| sz |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| sz |)) + (Value.Integer 1)) ] ] |) @@ -8782,7 +8778,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -8805,7 +8801,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -8818,7 +8819,7 @@ Module num. |) in let γ0_0 := M.read (| γ0_0 |) in let v := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| diff --git a/CoqOfRust/core/num/dec2flt/common.v b/CoqOfRust/core/num/dec2flt/common.v index ec3971f1a..b2425c435 100644 --- a/CoqOfRust/core/num/dec2flt/common.v +++ b/CoqOfRust/core/num/dec2flt/common.v @@ -23,8 +23,8 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let tmp := M.alloc (| repeat (Value.Integer 0) 8 |) in - let _ := + let~ tmp := M.alloc (| repeat (Value.Integer 0) 8 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -117,9 +117,9 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| - Integer.Isize, - M.rust_cast + BinOp.Wrap.sub + Integer.Isize + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -127,8 +127,8 @@ Module num. [] |), [ M.read (| other |) ] - |)), - M.rust_cast + |))) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -136,8 +136,7 @@ Module num. [] |), [ M.read (| self |) ] - |)) - |))) + |))))) | _, _ => M.impossible end. @@ -167,8 +166,8 @@ Module num. (let self := M.alloc (| self |) in let func := M.alloc (| func |) in M.read (| - let s := M.copy (| self |) in - let _ := + let~ s := M.copy (| self |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -182,7 +181,7 @@ Module num. let γ1_rest := M.SubPointer.get_slice_rest (| γ, 1, 0 |) in let c := M.alloc (| γ1_0 |) in let s_next := M.alloc (| γ1_rest |) in - let c := + let~ c := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -208,7 +207,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -221,7 +220,7 @@ Module num. [ func; Value.Tuple [ M.read (| c |) ] ] |) |) in - let _ := M.write (| s, M.read (| s_next |) |) in + let~ _ := M.write (| s, M.read (| s_next |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -235,7 +234,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -278,14 +277,14 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let a := + let~ a := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ M.read (| v |); Value.Integer 5063812098665367110 ] |) |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_sub", [] |), diff --git a/CoqOfRust/core/num/dec2flt/decimal.v b/CoqOfRust/core/num/dec2flt/decimal.v index cb692b971..3b8e97d34 100644 --- a/CoqOfRust/core/num/dec2flt/decimal.v +++ b/CoqOfRust/core/num/dec2flt/decimal.v @@ -179,7 +179,7 @@ Module num. (let self := M.alloc (| self |) in let digit := M.alloc (| digit |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -202,7 +202,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -222,7 +222,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -231,7 +231,7 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) @@ -262,7 +262,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -271,7 +271,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -350,17 +350,16 @@ Module num. "digits" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) |) |)) @@ -369,7 +368,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -378,7 +377,7 @@ Module num. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -386,7 +385,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -437,7 +436,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -513,7 +512,7 @@ Module num. |))) ] |) in - let dp := + let~ dp := M.alloc (| M.rust_cast (M.read (| @@ -524,8 +523,8 @@ Module num. |) |)) |) in - let n := M.alloc (| Value.Integer 0 |) in - let _ := + let~ n := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -550,7 +549,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -569,7 +568,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -581,15 +585,14 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.mul (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -614,14 +617,14 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -631,8 +634,7 @@ Module num. |), i |) - |)) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -645,8 +647,8 @@ Module num. |))) ] |)) in - let round_up := M.alloc (| Value.Bool false |) in - let _ := + let~ round_up := M.alloc (| Value.Bool false |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -670,7 +672,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| round_up, BinOp.Pure.ge @@ -709,11 +711,10 @@ Module num. (Value.Integer 5), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.Usize, - M.read (| dp |), - Value.Integer 1 - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| dp |)) + (Value.Integer 1)) (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -753,11 +754,10 @@ Module num. "digits" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| dp |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| dp |)) + (Value.Integer 1) |) |) |))) @@ -771,7 +771,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -783,11 +783,11 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U64, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.U64 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -851,7 +851,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -881,7 +881,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let num_new_digits := + let~ num_new_digits := M.alloc (| M.call_closure (| M.get_function (| @@ -891,7 +891,7 @@ Module num. [ M.read (| self |); M.read (| shift |) ] |) |) in - let read_index := + let~ read_index := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -899,22 +899,21 @@ Module num. "num_digits" |) |) in - let write_index := + let~ write_index := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |), - M.read (| num_new_digits |) - |) + |)) + (M.read (| num_new_digits |)) |) in - let n := M.alloc (| Value.Integer 0 |) in - let _ := + let~ n := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -932,35 +931,33 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := read_index in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := write_index in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Panic.shl (| - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.shl + (M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -970,32 +967,24 @@ Module num. |), read_index |) - |)), - M.read (| shift |) - |) - |) + |))) + (M.read (| shift |))) |) in - let quotient := + let~ quotient := M.alloc (| - BinOp.Panic.div (| - Integer.U64, - M.read (| n |), - Value.Integer 10 - |) + BinOp.Wrap.div Integer.U64 (M.read (| n |)) (Value.Integer 10) |) in - let remainder := + let~ remainder := M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| n |), - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 10, - M.read (| quotient |) - |) - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| n |)) + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 10) + (M.read (| quotient |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1017,7 +1006,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1049,7 +1038,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1065,14 +1054,14 @@ Module num. |))) ] |) in - let _ := M.write (| n, M.read (| quotient |) |) in + let~ _ := M.write (| n, M.read (| quotient |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1083,7 +1072,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1101,37 +1090,30 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := write_index in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let quotient := + let~ quotient := M.alloc (| - BinOp.Panic.div (| - Integer.U64, - M.read (| n |), - Value.Integer 10 - |) + BinOp.Wrap.div Integer.U64 (M.read (| n |)) (Value.Integer 10) |) in - let remainder := + let~ remainder := M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| n |), - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 10, - M.read (| quotient |) - |) - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| n |)) + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 10) + (M.read (| quotient |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1153,7 +1135,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1185,7 +1167,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1201,14 +1183,14 @@ Module num. |))) ] |) in - let _ := M.write (| n, M.read (| quotient |) |) in + let~ _ := M.write (| n, M.read (| quotient |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1219,7 +1201,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1228,13 +1210,9 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| num_new_digits |) - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| num_new_digits |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1262,7 +1240,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1277,7 +1255,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1286,13 +1264,12 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| - Integer.I32, - M.read (| β |), - M.rust_cast (M.read (| num_new_digits |)) - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| β |)) + (M.rust_cast (M.read (| num_new_digits |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1369,10 +1346,10 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let read_index := M.alloc (| Value.Integer 0 |) in - let write_index := M.alloc (| Value.Integer 0 |) in - let n := M.alloc (| Value.Integer 0 |) in - let _ := + let~ read_index := M.alloc (| Value.Integer 0 |) in + let~ write_index := M.alloc (| Value.Integer 0 |) in + let~ n := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1384,7 +1361,7 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |)) + (BinOp.Wrap.shr (M.read (| n |)) (M.read (| shift |))) (Value.Integer 0) |)) in let _ := @@ -1415,17 +1392,16 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| n, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 10, - M.read (| n |) - |), - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 10) + (M.read (| n |))) + (M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1435,18 +1411,16 @@ Module num. |), read_index |) - |)) - |) + |))) |) in - let _ := + let~ _ := let β := read_index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1478,7 +1452,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1490,10 +1464,11 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| n |), - M.read (| shift |) - |)) + (BinOp.Wrap.shr + (M.read (| n |)) + (M.read (| + shift + |))) (Value.Integer 0) |)) in let _ := @@ -1501,25 +1476,23 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.mul (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := read_index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] @@ -1529,7 +1502,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| @@ -1559,7 +1532,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1570,7 +1543,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1579,17 +1552,15 @@ Module num. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.I32, - M.read (| β |), - BinOp.Panic.sub (| - Integer.I32, - M.rust_cast (M.read (| read_index |)), - Value.Integer 1 - |) - |) + BinOp.Wrap.sub + Integer.I32 + (M.read (| β |)) + (BinOp.Wrap.sub + Integer.I32 + (M.rust_cast (M.read (| read_index |))) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1623,7 +1594,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1632,7 +1603,7 @@ Module num. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1641,7 +1612,7 @@ Module num. |), Value.Integer 0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1657,15 +1628,14 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let mask := + let~ mask := M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| Value.Integer 1, M.read (| shift |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl (Value.Integer 1) (M.read (| shift |))) + (Value.Integer 1) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1691,22 +1661,21 @@ Module num. M.read (| γ |), Value.Bool true |) in - let new_digit := + let~ new_digit := M.alloc (| M.rust_cast - (BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |)) + (BinOp.Wrap.shr (M.read (| n |)) (M.read (| shift |))) |) in - let _ := + let~ _ := M.write (| n, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 10, - BinOp.Pure.bit_and (M.read (| n |)) (M.read (| mask |)) - |), - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 10) + (BinOp.Pure.bit_and (M.read (| n |)) (M.read (| mask |)))) + (M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1716,20 +1685,18 @@ Module num. |), read_index |) - |)) - |) + |))) |) in - let _ := + let~ _ := let β := read_index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1741,15 +1708,14 @@ Module num. |), M.read (| new_digit |) |) in - let _ := + let~ _ := let β := write_index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1757,7 +1723,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1768,7 +1734,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1786,19 +1752,18 @@ Module num. M.read (| γ |), Value.Bool true |) in - let new_digit := + let~ new_digit := M.alloc (| M.rust_cast - (BinOp.Panic.shr (| M.read (| n |), M.read (| shift |) |)) + (BinOp.Wrap.shr (M.read (| n |)) (M.read (| shift |))) |) in - let _ := + let~ _ := M.write (| n, - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 10, - BinOp.Pure.bit_and (M.read (| n |)) (M.read (| mask |)) - |) + BinOp.Wrap.mul + Integer.U64 + (Value.Integer 10) + (BinOp.Pure.bit_and (M.read (| n |)) (M.read (| mask |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1821,7 +1786,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -1833,15 +1798,14 @@ Module num. |), M.read (| new_digit |) |) in - let _ := + let~ _ := let β := write_index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1863,7 +1827,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1884,7 +1848,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1895,7 +1859,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1904,7 +1868,7 @@ Module num. |), M.read (| write_index |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2008,7 +1972,7 @@ Module num. ltac:(M.monadic (let s := M.alloc (| s |) in M.read (| - let d := + let~ d := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2021,8 +1985,8 @@ Module num. [] |) |) in - let start := M.copy (| s |) in - let _ := + let~ start := M.copy (| s |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2056,14 +2020,14 @@ Module num. Value.Integer 48 |) in let s_next := M.copy (| γ1_1 |) in - let _ := M.write (| s, M.read (| s_next |) |) in + let~ _ := M.write (| s, M.read (| s_next |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -2072,7 +2036,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| s, M.call_closure (| @@ -2111,7 +2075,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2140,9 +2104,9 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 46 |) in let s_next := M.copy (| γ1_1 |) in - let _ := M.write (| s, M.read (| s_next |) |) in - let first := M.copy (| s |) in - let _ := + let~ _ := M.write (| s, M.read (| s_next |) |) in + let~ first := M.copy (| s |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2201,14 +2165,14 @@ Module num. Value.Integer 48 |) in let s_next := M.copy (| γ1_1 |) in - let _ := M.write (| s, M.read (| s_next |) |) in + let~ _ := M.write (| s, M.read (| s_next |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -2224,7 +2188,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2248,17 +2212,16 @@ Module num. (Value.Integer 8), ltac:(M.monadic (BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |), - Value.Integer 8 - |)) + |)) + (Value.Integer 8)) (M.read (| M.get_constant (| "core::num::dec2flt::decimal::MAX_DIGITS" @@ -2271,7 +2234,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2284,7 +2247,7 @@ Module num. [ M.read (| s |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2313,7 +2276,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2356,15 +2319,14 @@ Module num. ] ] |); - BinOp.Panic.sub (| - Integer.U64, - M.read (| v |), - Value.Integer 3472328296227680304 - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| v |)) + (Value.Integer 3472328296227680304) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| d, @@ -2373,13 +2335,12 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 8 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 8) |) in - let _ := + let~ _ := M.write (| s, M.call_closure (| @@ -2408,7 +2369,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2419,7 +2380,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| s, M.call_closure (| @@ -2458,16 +2419,16 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "decimal_point" |), - BinOp.Panic.sub (| - Integer.I32, - M.rust_cast + BinOp.Wrap.sub + Integer.I32 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -2475,8 +2436,8 @@ Module num. [] |), [ M.read (| s |) ] - |)), - M.rust_cast + |))) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -2484,14 +2445,13 @@ Module num. [] |), [ M.read (| first |) ] - |)) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2512,8 +2472,8 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let n_trailing_zeros := M.alloc (| Value.Integer 0 |) in - let _ := + let~ n_trailing_zeros := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2568,9 +2528,9 @@ Module num. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2579,8 +2539,8 @@ Module num. [] |), [ M.read (| start |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -2589,8 +2549,7 @@ Module num. [] |), [ M.read (| s |) ] - |) - |)) + |))) ] ] |) @@ -2607,7 +2566,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2630,7 +2589,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2660,15 +2624,14 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n_trailing_zeros in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2710,7 +2673,7 @@ Module num. |))) ] |)) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| d, @@ -2719,13 +2682,12 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| - Integer.I32, - M.read (| β |), - M.rust_cast (M.read (| n_trailing_zeros |)) - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| β |)) + (M.rust_cast (M.read (| n_trailing_zeros |))) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| d, @@ -2734,13 +2696,12 @@ Module num. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| n_trailing_zeros |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| n_trailing_zeros |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| d, @@ -2749,18 +2710,17 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| - Integer.I32, - M.read (| β |), - M.rust_cast + BinOp.Wrap.add + Integer.I32 + (M.read (| β |)) + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| d, "core::num::dec2flt::decimal::Decimal", "num_digits" |) - |)) - |) + |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2789,7 +2749,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| d, @@ -2798,7 +2758,7 @@ Module num. |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| d, @@ -2816,7 +2776,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2867,9 +2827,9 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| s, M.read (| s_next |) |) in - let neg_exp := M.alloc (| Value.Bool false |) in - let _ := + let~ _ := M.write (| s, M.read (| s_next |) |) in + let~ neg_exp := M.alloc (| Value.Bool false |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2897,7 +2857,7 @@ Module num. let γ1_0 := M.read (| γ1_0 |) in let ch := M.copy (| γ1_0 |) in let s_next := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.write (| neg_exp, BinOp.Pure.eq @@ -2927,7 +2887,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| s, M.read (| s_next |) |) in + let~ _ := M.write (| s, M.read (| s_next |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -2936,8 +2896,8 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let exp_num := M.alloc (| Value.Integer 0 |) in - let _ := + let~ exp_num := M.alloc (| Value.Integer 0 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2978,19 +2938,17 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| exp_num, - BinOp.Panic.add (| - Integer.I32, - BinOp.Panic.mul (| - Integer.I32, - Value.Integer 10, - M.read (| exp_num |) - |), - M.rust_cast - (M.read (| digit |)) - |) + BinOp.Wrap.add + Integer.I32 + (BinOp.Wrap.mul + Integer.I32 + (Value.Integer 10) + (M.read (| exp_num |))) + (M.rust_cast + (M.read (| digit |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3006,7 +2964,7 @@ Module num. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| d, @@ -3015,10 +2973,10 @@ Module num. |) in M.write (| β, - BinOp.Panic.add (| - Integer.I32, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.I32 + (M.read (| β |)) + (M.read (| M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3039,8 +2997,7 @@ Module num. fun γ => ltac:(M.monadic exp_num) ] |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -3049,7 +3006,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3089,7 +3046,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3108,7 +3065,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3120,7 +3079,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.SubPointer.get_struct_record_field (| @@ -3236,10 +3195,10 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := let β := shift in M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (Value.Integer 63) |) in - let x_a := + let~ x_a := M.copy (| M.SubPointer.get_array_field (| M.get_constant (| @@ -3248,30 +3207,30 @@ Module num. shift |) |) in - let x_b := + let~ x_b := M.copy (| M.SubPointer.get_array_field (| M.get_constant (| "core::num::dec2flt::decimal::number_of_digits_decimal_left_shift::TABLE" |), M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| shift |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| shift |)) (Value.Integer 1) |) |) |) in - let num_new_digits := + let~ num_new_digits := M.alloc (| - M.rust_cast (BinOp.Panic.shr (| M.read (| x_a |), Value.Integer 11 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| x_a |)) (Value.Integer 11)) |) in - let pow5_a := + let~ pow5_a := M.alloc (| M.rust_cast (BinOp.Pure.bit_and (Value.Integer 2047) (M.read (| x_a |))) |) in - let pow5_b := + let~ pow5_b := M.alloc (| M.rust_cast (BinOp.Pure.bit_and (Value.Integer 2047) (M.read (| x_b |))) |) in - let pow5 := + let~ pow5 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3291,7 +3250,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3342,11 +3301,10 @@ Module num. |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| pow5_b |), - M.read (| pow5_a |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| pow5_b |)) + (M.read (| pow5_a |)) ] |) ] @@ -3358,7 +3316,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3386,7 +3344,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3431,11 +3394,10 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| num_new_digits |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| num_new_digits |)) + (Value.Integer 1) |) |) |) @@ -3505,13 +3467,12 @@ Module num. M.never_to_any (| M.read (| M.return_ (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| num_new_digits - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) |) |) diff --git a/CoqOfRust/core/num/dec2flt/float.v b/CoqOfRust/core/num/dec2flt/float.v index ef26ff903..74f1e4c85 100644 --- a/CoqOfRust/core/num/dec2flt/float.v +++ b/CoqOfRust/core/num/dec2flt/float.v @@ -104,7 +104,7 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -113,7 +113,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -218,14 +218,14 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| self |) ] |) |) in - let sign := + let~ sign := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -236,7 +236,7 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer 31 |)) + (BinOp.Wrap.shr (M.read (| bits |)) (Value.Integer 31)) (Value.Integer 0) |)) in let _ := @@ -246,14 +246,14 @@ Module num. ] |) |) in - let exponent := + let~ exponent := M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer 23 |)) + (BinOp.Wrap.shr (M.read (| bits |)) (Value.Integer 23)) (Value.Integer 255)) |) in - let mantissa := + let~ mantissa := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -268,10 +268,9 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.shl (| - BinOp.Pure.bit_and (M.read (| bits |)) (Value.Integer 8388607), - Value.Integer 1 - |) + BinOp.Wrap.shl + (BinOp.Pure.bit_and (M.read (| bits |)) (Value.Integer 8388607)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -283,15 +282,14 @@ Module num. ] |) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.sub (| - Integer.I16, - M.read (| β |), - BinOp.Panic.add (| Integer.I16, Value.Integer 127, Value.Integer 23 |) - |) + BinOp.Wrap.sub + Integer.I16 + (M.read (| β |)) + (BinOp.Wrap.add Integer.I16 (Value.Integer 127) (Value.Integer 23)) |) in M.alloc (| Value.Tuple @@ -449,7 +447,7 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -458,7 +456,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -567,14 +565,14 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| self |) ] |) |) in - let sign := + let~ sign := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -585,7 +583,7 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer 63 |)) + (BinOp.Wrap.shr (M.read (| bits |)) (Value.Integer 63)) (Value.Integer 0) |)) in let _ := @@ -595,14 +593,14 @@ Module num. ] |) |) in - let exponent := + let~ exponent := M.alloc (| M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer 52 |)) + (BinOp.Wrap.shr (M.read (| bits |)) (Value.Integer 52)) (Value.Integer 2047)) |) in - let mantissa := + let~ mantissa := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -617,12 +615,11 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.shl (| - BinOp.Pure.bit_and + BinOp.Wrap.shl + (BinOp.Pure.bit_and (M.read (| bits |)) - (Value.Integer 4503599627370495), - Value.Integer 1 - |) + (Value.Integer 4503599627370495)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -636,15 +633,14 @@ Module num. ] |) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.sub (| - Integer.I16, - M.read (| β |), - BinOp.Panic.add (| Integer.I16, Value.Integer 1023, Value.Integer 52 |) - |) + BinOp.Wrap.sub + Integer.I16 + (M.read (| β |)) + (BinOp.Wrap.add Integer.I16 (Value.Integer 1023) (Value.Integer 52)) |) in M.alloc (| Value.Tuple [ M.read (| mantissa |); M.read (| exponent |); M.read (| sign |) ] diff --git a/CoqOfRust/core/num/dec2flt/lemire.v b/CoqOfRust/core/num/dec2flt/lemire.v index b25899775..1ae82ce65 100644 --- a/CoqOfRust/core/num/dec2flt/lemire.v +++ b/CoqOfRust/core/num/dec2flt/lemire.v @@ -104,7 +104,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let fp_zero := + let~ fp_zero := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -115,7 +115,7 @@ Module num. [ Value.Integer 0 ] |) |) in - let fp_inf := + let~ fp_inf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -132,7 +132,7 @@ Module num. ] |) |) in - let fp_error := + let~ fp_error := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -143,7 +143,7 @@ Module num. [ Value.Integer (-1) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -204,16 +204,16 @@ Module num. |))) ] |) in - let lz := + let~ lz := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "leading_zeros", [] |), [ M.read (| w |) ] |) |) in - let _ := + let~ _ := let β := w in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| lz |) |) |) in + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| lz |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -224,15 +224,14 @@ Module num. [ M.read (| q |); M.read (| w |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |), - Value.Integer 3 - |) + |)) + (Value.Integer 3) ] |) |), @@ -243,7 +242,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let lo := M.copy (| γ0_0 |) in let hi := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -261,7 +260,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let inside_safe_exponent := + let~ inside_safe_exponent := M.alloc (| LogicalOp.and (| BinOp.Pure.ge (M.read (| q |)) (Value.Integer (-27)), @@ -295,58 +294,51 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let upperbit := + let~ upperbit := M.alloc (| - M.rust_cast (BinOp.Panic.shr (| M.read (| hi |), Value.Integer 63 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| hi |)) (Value.Integer 63)) |) in - let mantissa := + let~ mantissa := M.alloc (| - BinOp.Panic.shr (| - M.read (| hi |), - BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.add (| - Integer.I32, - M.read (| upperbit |), - Value.Integer 64 - |), - M.rust_cast + BinOp.Wrap.shr + (M.read (| hi |)) + (BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.add + Integer.I32 + (M.read (| upperbit |)) + (Value.Integer 64)) + (M.rust_cast (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |)) - |), - Value.Integer 3 - |) - |) + |)))) + (Value.Integer 3)) |) in - let power2 := + let~ power2 := M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.add (| - Integer.I32, - M.call_closure (| + BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.add + Integer.I32 + (M.call_closure (| M.get_function (| "core::num::dec2flt::lemire::power", [] |), [ M.rust_cast (M.read (| q |)) ] - |), - M.read (| upperbit |) - |), - M.rust_cast (M.read (| lz |)) - |), - M.read (| + |)) + (M.read (| upperbit |))) + (M.rust_cast (M.read (| lz |)))) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -365,7 +357,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -375,14 +367,13 @@ Module num. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.add (| - Integer.I32, - UnOp.Panic.neg (| + (BinOp.Wrap.add + Integer.I32 + (UnOp.Panic.neg (| Integer.I32, M.read (| power2 |) - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) (Value.Integer 64) |)) in let _ := @@ -401,54 +392,50 @@ Module num. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := mantissa in M.write (| β, - BinOp.Panic.shr (| - M.read (| β |), - BinOp.Panic.add (| - Integer.I32, - UnOp.Panic.neg (| + BinOp.Wrap.shr + (M.read (| β |)) + (BinOp.Wrap.add + Integer.I32 + (UnOp.Panic.neg (| Integer.I32, M.read (| power2 |) - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := mantissa in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Pure.bit_and + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Pure.bit_and (M.read (| mantissa |)) - (Value.Integer 1) - |) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := mantissa in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| power2, M.rust_cast (BinOp.Pure.ge (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer 1, - M.read (| + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |) - |))) + |)))) |) in M.return_ (| Value.StructRecord @@ -464,7 +451,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -507,27 +494,23 @@ Module num. |), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.shl (| - M.read (| mantissa |), - BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.add (| - Integer.I32, - M.read (| upperbit |), - Value.Integer 64 - |), - M.rust_cast + (BinOp.Wrap.shl + (M.read (| mantissa |)) + (BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.add + Integer.I32 + (M.read (| upperbit |)) + (Value.Integer 64)) + (M.rust_cast (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |)) - |), - Value.Integer 3 - |) - |)) + |)))) + (Value.Integer 3))) (M.read (| hi |)))) |) |)) in @@ -536,7 +519,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := mantissa in M.write (| β, @@ -548,23 +531,19 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := mantissa in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Pure.bit_and (M.read (| mantissa |)) (Value.Integer 1) - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Pure.bit_and (M.read (| mantissa |)) (Value.Integer 1)) |) in - let _ := + let~ _ := let β := mantissa in - M.write (| - β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) - |) in - let _ := + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -575,63 +554,59 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer 2, - M.read (| + (BinOp.Wrap.shl + (Value.Integer 2) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |) - |)) + |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| mantissa, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| + BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |) - |) + |)) |) in - let _ := + let~ _ := let β := power2 in M.write (| β, - BinOp.Panic.add (| - Integer.I32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := mantissa in M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (UnOp.Pure.not - (BinOp.Panic.shl (| - Value.Integer 1, - M.read (| + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |) - |))) + |)))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -686,20 +661,18 @@ Module num. | [], [ q ] => ltac:(M.monadic (let q := M.alloc (| q |) in - BinOp.Panic.add (| - Integer.I32, - BinOp.Panic.shr (| - M.call_closure (| + BinOp.Wrap.add + Integer.I32 + (BinOp.Wrap.shr + (M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_mul", [] |), [ M.read (| q |); - BinOp.Panic.add (| Integer.I32, Value.Integer 152170, Value.Integer 65536 |) + BinOp.Wrap.add Integer.I32 (Value.Integer 152170) (Value.Integer 65536) ] - |), - Value.Integer 16 - |), - Value.Integer 63 - |))) + |)) + (Value.Integer 16)) + (Value.Integer 63))) | _, _ => M.impossible end. @@ -718,19 +691,18 @@ Module num. (let a := M.alloc (| a |) in let b := M.alloc (| b |) in M.read (| - let r := + let~ r := M.alloc (| - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast (M.read (| a |)), - M.rust_cast (M.read (| b |)) - |) + BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| a |))) + (M.rust_cast (M.read (| b |))) |) in M.alloc (| Value.Tuple [ M.rust_cast (M.read (| r |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| r |), Value.Integer 64 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| r |)) (Value.Integer 64)) ] |) |))) @@ -784,7 +756,7 @@ Module num. let w := M.alloc (| w |) in let precision := M.alloc (| precision |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -793,7 +765,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -837,7 +809,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -846,7 +818,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -890,7 +862,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -899,7 +871,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -937,7 +909,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let mask := + let~ mask := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -952,26 +924,24 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.shr (| - Value.Integer 18446744073709551615, - M.read (| precision |) - |) + BinOp.Wrap.shr + (Value.Integer 18446744073709551615) + (M.read (| precision |)) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 18446744073709551615 |))) ] |) |) in - let index := + let~ index := M.alloc (| M.rust_cast - (BinOp.Panic.sub (| - Integer.I64, - M.read (| q |), - M.rust_cast + (BinOp.Wrap.sub + Integer.I64 + (M.read (| q |)) + (M.rust_cast (M.read (| M.get_constant (| "core::num::dec2flt::table::SMALLEST_POWER_OF_FIVE" |) - |)) - |)) + |)))) |) in M.match_operator (| M.SubPointer.get_array_field (| @@ -1002,7 +972,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let first_lo := M.copy (| γ0_0 |) in let first_hi := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1040,7 +1010,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let second_hi := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| first_lo, M.call_closure (| @@ -1072,15 +1042,14 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := first_hi in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => diff --git a/CoqOfRust/core/num/dec2flt/mod.v b/CoqOfRust/core/num/dec2flt/mod.v index 1190fe422..d5628482b 100644 --- a/CoqOfRust/core/num/dec2flt/mod.v +++ b/CoqOfRust/core/num/dec2flt/mod.v @@ -289,10 +289,20 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::dec2flt::FloatErrorKind::Empty" + |) in M.alloc (| M.read (| Value.String "Empty" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::dec2flt::FloatErrorKind::Invalid" + |) in M.alloc (| M.read (| Value.String "Invalid" |) |))) ] |) @@ -326,12 +336,16 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::dec2flt::FloatErrorKind::Empty" |) in M.alloc (| Value.StructTuple "core::num::dec2flt::FloatErrorKind::Empty" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::dec2flt::FloatErrorKind::Invalid" |) in M.alloc (| Value.StructTuple "core::num::dec2flt::FloatErrorKind::Invalid" [] |))) @@ -371,7 +385,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -381,7 +395,7 @@ Module num. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -463,12 +477,16 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::dec2flt::FloatErrorKind::Empty" |) in + M.alloc (| M.read (| Value.String "cannot parse float from empty string" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid float literal" |) |))) + (let _ := + M.is_struct_tuple (| γ, "core::num::dec2flt::FloatErrorKind::Invalid" |) in + M.alloc (| M.read (| Value.String "invalid float literal" |) |))) ] |) |))) @@ -572,7 +590,7 @@ Module num. ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let word := + let~ word := M.copy (| M.SubPointer.get_struct_record_field (| x, @@ -580,27 +598,26 @@ Module num. "f" |) |) in - let _ := + let~ _ := let β := word in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shl (| - M.rust_cast + (BinOp.Wrap.shl + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| x, "core::num::dec2flt::common::BiasedFp", "e" |) - |)), - M.read (| + |))) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |) - |)) + |))) |) in M.alloc (| M.call_closure (| @@ -676,14 +693,14 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes", [] |), [ M.read (| s |) ] |) |) in - let c := + let~ c := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -731,9 +748,9 @@ Module num. ] |) |) in - let negative := + let~ negative := M.alloc (| BinOp.Pure.eq (M.read (| c |)) (M.read (| UnsupportedLiteral |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -752,7 +769,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| s, M.call_closure (| @@ -779,7 +796,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -818,7 +835,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let num := + let~ num := M.copy (| M.match_operator (| M.alloc (| @@ -840,7 +857,8 @@ Module num. r)); fun γ => ltac:(M.monadic - (let γ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| M.call_closure (| M.get_function (| @@ -870,7 +888,8 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -892,7 +911,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| num, @@ -901,7 +920,7 @@ Module num. |), M.read (| negative |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -939,7 +958,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let fp := + let~ fp := M.alloc (| M.call_closure (| M.get_function (| "core::num::dec2flt::lemire::compute_float", [ F ] |), @@ -961,7 +980,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1015,17 +1034,16 @@ Module num. "exponent" |) |); - BinOp.Panic.add (| - Integer.U64, - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| num, "core::num::dec2flt::number::Number", "mantissa" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) @@ -1035,7 +1053,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| fp, @@ -1048,7 +1066,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1069,7 +1087,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| fp, M.call_closure (| @@ -1084,14 +1102,14 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let float := + let~ float := M.alloc (| M.call_closure (| M.get_function (| "core::num::dec2flt::biased_fp_to_float", [ F ] |), [ M.read (| fp |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1106,7 +1124,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| float, M.call_closure (| diff --git a/CoqOfRust/core/num/dec2flt/number.v b/CoqOfRust/core/num/dec2flt/number.v index 44cdc4a9f..a70d8c87c 100644 --- a/CoqOfRust/core/num/dec2flt/number.v +++ b/CoqOfRust/core/num/dec2flt/number.v @@ -502,7 +502,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _cw := + let~ _cw := M.alloc (| M.call_closure (| M.get_function (| @@ -531,7 +531,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let value := + let~ value := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -560,7 +560,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -679,25 +679,24 @@ Module num. |))); fun γ => ltac:(M.monadic - (let shift := + (let~ shift := M.alloc (| - BinOp.Panic.sub (| - Integer.I64, - M.read (| + BinOp.Wrap.sub + Integer.I64 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::dec2flt::number::Number", "exponent" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MAX_EXPONENT_FAST_PATH" |) - |) - |) + |)) |) in - let mantissa := + let~ mantissa := M.copy (| M.match_operator (| M.alloc (| @@ -791,7 +790,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -871,7 +870,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -889,7 +888,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| value, M.call_closure (| diff --git a/CoqOfRust/core/num/dec2flt/parse.v b/CoqOfRust/core/num/dec2flt/parse.v index 87a97c0fc..c07f11e91 100644 --- a/CoqOfRust/core/num/dec2flt/parse.v +++ b/CoqOfRust/core/num/dec2flt/parse.v @@ -25,26 +25,21 @@ Module num. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let _ := + let~ _ := let β := v in M.write (| β, - BinOp.Panic.sub (| - Integer.U64, - M.read (| β |), - Value.Integer 3472328296227680304 - |) + BinOp.Wrap.sub Integer.U64 (M.read (| β |)) (Value.Integer 3472328296227680304) |) in - let _ := + let~ _ := M.write (| v, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.mul (| Integer.U64, M.read (| v |), Value.Integer 10 |), - BinOp.Panic.shr (| M.read (| v |), Value.Integer 8 |) - |) + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.mul Integer.U64 (M.read (| v |)) (Value.Integer 10)) + (BinOp.Wrap.shr (M.read (| v |)) (Value.Integer 8)) |) in - let v1 := + let~ v1 := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_mul", [] |), @@ -60,13 +55,13 @@ Module num. ] |) |) in - let v2 := + let~ v2 := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_mul", [] |), [ BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| v |), Value.Integer 16 |)) + (BinOp.Wrap.shr (M.read (| v |)) (Value.Integer 16)) (M.read (| M.get_constant (| "core::num::dec2flt::parse::parse_8digits::MASK" |) |)); @@ -79,13 +74,12 @@ Module num. M.alloc (| M.rust_cast (M.rust_cast - (BinOp.Panic.shr (| - M.call_closure (| + (BinOp.Wrap.shr + (M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_add", [] |), [ M.read (| v1 |); M.read (| v2 |) ] - |), - Value.Integer 32 - |))) + |)) + (Value.Integer 32))) |) |))) | _, _ => M.impossible @@ -133,7 +127,7 @@ Module num. (let s := M.alloc (| s |) in let x := M.alloc (| x |) in M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -157,7 +151,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let num := + let~ num := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -191,7 +185,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| x, M.call_closure (| @@ -219,7 +213,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| s, M.call_closure (| @@ -253,7 +247,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -262,7 +256,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| s, M.call_closure (| @@ -287,7 +281,7 @@ Module num. ltac:(M.monadic (let digit := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.write (| x, M.call_closure (| @@ -357,8 +351,8 @@ Module num. (let s_ref := M.alloc (| s_ref |) in let x := M.alloc (| x |) in M.read (| - let s := M.copy (| M.read (| s_ref |) |) in - let _ := + let~ s := M.copy (| M.read (| s_ref |) |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -390,7 +384,7 @@ Module num. let γ1_rest := M.SubPointer.get_slice_rest (| γ, 1, 0 |) in let c := M.alloc (| γ1_0 |) in let s_next := M.alloc (| γ1_rest |) in - let digit := + let~ digit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -421,20 +415,18 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| x |), - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.mul (| - Integer.U64, - M.read (| M.read (| x |) |), - Value.Integer 10 - |), - M.rust_cast (M.read (| digit |)) - |) + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.mul + Integer.U64 + (M.read (| M.read (| x |) |)) + (Value.Integer 10)) + (M.rust_cast (M.read (| digit |))) |) in - let _ := M.write (| s, M.read (| s_next |) |) in + let~ _ := M.write (| s, M.read (| s_next |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -453,7 +445,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -462,7 +454,7 @@ Module num. ] |))) |) in - let _ := M.write (| M.read (| s_ref |), M.read (| s |) |) in + let~ _ := M.write (| M.read (| s_ref |), M.read (| s |) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -505,10 +497,10 @@ Module num. ltac:(M.monadic (let s_ref := M.alloc (| s_ref |) in M.read (| - let exponent := M.alloc (| Value.Integer 0 |) in - let negative := M.alloc (| Value.Bool false |) in - let s := M.copy (| M.read (| s_ref |) |) in - let _ := + let~ exponent := M.alloc (| Value.Integer 0 |) in + let~ negative := M.alloc (| Value.Bool false |) in + let~ s := M.copy (| M.read (| s_ref |) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -536,7 +528,7 @@ Module num. let γ1_0 := M.read (| γ1_0 |) in let c := M.copy (| γ1_0 |) in let s_next := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.write (| negative, BinOp.Pure.eq (M.read (| c |)) (M.read (| UnsupportedLiteral |)) @@ -564,7 +556,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| s, M.read (| s_next |) |) in + let~ _ := M.write (| s, M.read (| s_next |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] @@ -622,7 +614,7 @@ Module num. ] |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| s_ref |), M.call_closure (| @@ -664,18 +656,16 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| exponent, - BinOp.Panic.add (| - Integer.I64, - BinOp.Panic.mul (| - Integer.I64, - Value.Integer 10, - M.read (| exponent |) - |), - M.rust_cast (M.read (| digit |)) - |) + BinOp.Wrap.add + Integer.I64 + (BinOp.Wrap.mul + Integer.I64 + (Value.Integer 10) + (M.read (| exponent |))) + (M.rust_cast (M.read (| digit |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -718,7 +708,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let _ := M.write (| M.read (| s_ref |), M.read (| s |) |) in + (let~ _ := M.write (| M.read (| s_ref |), M.read (| s |) |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) @@ -820,7 +810,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -829,7 +819,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -873,23 +863,23 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let mantissa := M.alloc (| Value.Integer 0 |) in - let start := M.copy (| s |) in - let tmp := + let~ mantissa := M.alloc (| Value.Integer 0 |) in + let~ start := M.copy (| s |) in + let~ tmp := M.alloc (| M.call_closure (| M.get_function (| "core::num::dec2flt::parse::try_parse_digits", [] |), [ M.read (| s |); M.read (| mantissa |) ] |) |) in - let _ := + let~ _ := M.write (| s, M.read (| M.SubPointer.get_tuple_field (| tmp, 0 |) |) |) in - let _ := + let~ _ := M.write (| mantissa, M.read (| M.SubPointer.get_tuple_field (| tmp, 1 |) |) |) in - let n_digits := + let~ n_digits := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -902,10 +892,10 @@ Module num. [ M.read (| s |); M.read (| start |) ] |) |) in - let n_after_dot := M.alloc (| Value.Integer 0 |) in - let exponent := M.alloc (| Value.Integer 0 |) in - let int_end := M.copy (| s |) in - let _ := + let~ n_after_dot := M.alloc (| Value.Integer 0 |) in + let~ exponent := M.alloc (| Value.Integer 0 |) in + let~ int_end := M.copy (| s |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -937,9 +927,9 @@ Module num. Value.Integer 46 |) in let s_next := M.copy (| γ1_1 |) in - let _ := M.write (| s, M.read (| s_next |) |) in - let before := M.copy (| s |) in - let tmp := + let~ _ := M.write (| s, M.read (| s_next |) |) in + let~ before := M.copy (| s |) in + let~ tmp := M.alloc (| M.call_closure (| M.get_function (| @@ -949,17 +939,17 @@ Module num. [ M.read (| s |); M.read (| mantissa |) ] |) |) in - let _ := + let~ _ := M.write (| s, M.read (| M.SubPointer.get_tuple_field (| tmp, 0 |) |) |) in - let _ := + let~ _ := M.write (| mantissa, M.read (| M.SubPointer.get_tuple_field (| tmp, 1 |) |) |) in - let _ := + let~ _ := M.write (| n_after_dot, M.call_closure (| @@ -973,7 +963,7 @@ Module num. [ M.read (| s |); M.read (| before |) ] |) |) in - let _ := + let~ _ := M.write (| exponent, M.rust_cast @@ -983,13 +973,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := n_digits in M.write (| β, - BinOp.Panic.add (| Integer.Isize, M.read (| β |), M.read (| n_after_dot |) |) + BinOp.Wrap.add Integer.Isize (M.read (| β |)) (M.read (| n_after_dot |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1012,8 +1002,8 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let exp_number := M.alloc (| Value.Integer 0 |) in - let _ := + let~ exp_number := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1064,8 +1054,8 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| s, M.read (| s_next |) |) in - let _ := + let~ _ := M.write (| s, M.read (| s_next |) |) in + let~ _ := M.write (| exp_number, M.read (| @@ -1150,15 +1140,14 @@ Module num. |) |) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.I64, - M.read (| β |), - M.read (| exp_number |) - |) + BinOp.Wrap.add + Integer.I64 + (M.read (| β |)) + (M.read (| exp_number |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -1167,7 +1156,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.rust_cast (M.call_closure (| @@ -1181,7 +1170,7 @@ Module num. [ M.read (| s |); M.read (| start |) ] |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1221,15 +1210,15 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := n_digits in M.write (| β, - BinOp.Panic.sub (| Integer.Isize, M.read (| β |), Value.Integer 19 |) + BinOp.Wrap.sub Integer.Isize (M.read (| β |)) (Value.Integer 19) |) in - let many_digits := M.alloc (| Value.Bool false |) in - let p := M.copy (| start |) in - let _ := + let~ many_digits := M.alloc (| Value.Bool false |) in + let~ p := M.copy (| start |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1282,14 +1271,14 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := n_digits in M.write (| β, - BinOp.Panic.sub (| - Integer.Isize, - M.read (| β |), - M.rust_cast + BinOp.Wrap.sub + Integer.Isize + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u8", @@ -1298,16 +1287,14 @@ Module num. |), [ M.read (| c |); - BinOp.Panic.sub (| - Integer.U8, - M.read (| UnsupportedLiteral |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (Value.Integer 1) ] - |)) - |) + |))) |) in - let _ := M.write (| p, M.read (| p_next |) |) in + let~ _ := M.write (| p, M.read (| p_next |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -1321,7 +1308,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1332,7 +1319,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1345,10 +1332,10 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := M.write (| many_digits, Value.Bool true |) in - let _ := M.write (| mantissa, Value.Integer 0 |) in - let s := M.copy (| start |) in - let _ := + let~ _ := M.write (| many_digits, Value.Bool true |) in + let~ _ := M.write (| mantissa, Value.Integer 0 |) in + let~ s := M.copy (| start |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1358,7 +1345,7 @@ Module num. [ s; mantissa ] |) |) in - let _ := + let~ _ := M.write (| exponent, M.rust_cast @@ -1398,7 +1385,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| s, M.call_closure (| @@ -1421,8 +1408,8 @@ Module num. ] |) |) in - let before := M.copy (| s |) in - let _ := + let~ before := M.copy (| s |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1451,15 +1438,14 @@ Module num. |) |)) |) in - let _ := + let~ _ := let β := exponent in M.write (| β, - BinOp.Panic.add (| - Integer.I64, - M.read (| β |), - M.read (| exp_number |) - |) + BinOp.Wrap.add + Integer.I64 + (M.read (| β |)) + (M.read (| exp_number |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -1509,7 +1495,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1640,9 +1626,9 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let register := M.copy (| Value.DeclaredButUndefined |) in - let len := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ register := M.copy (| Value.DeclaredButUndefined |) in + let~ len := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1664,7 +1650,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| register, M.call_closure (| @@ -1678,7 +1664,7 @@ Module num. [ M.read (| s |) ] |) |) in - let _ := M.write (| len, Value.Integer 8 |) in + let~ _ := M.write (| len, Value.Integer 8 |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -1706,7 +1692,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let a := + let~ a := M.alloc (| M.rust_cast (M.read (| @@ -1716,7 +1702,7 @@ Module num. |) |)) |) in - let b := + let~ b := M.alloc (| M.rust_cast (M.read (| @@ -1726,7 +1712,7 @@ Module num. |) |)) |) in - let c := + let~ c := M.alloc (| M.rust_cast (M.read (| @@ -1736,16 +1722,16 @@ Module num. |) |)) |) in - let _ := + let~ _ := M.write (| register, BinOp.Pure.bit_or (BinOp.Pure.bit_or - (BinOp.Panic.shl (| M.read (| c |), Value.Integer 16 |)) - (BinOp.Panic.shl (| M.read (| b |), Value.Integer 8 |))) + (BinOp.Wrap.shl (M.read (| c |)) (Value.Integer 16)) + (BinOp.Wrap.shl (M.read (| b |)) (Value.Integer 8))) (M.read (| a |)) |) in - let _ := M.write (| len, Value.Integer 3 |) in + let~ _ := M.write (| len, Value.Integer 3 |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -1762,13 +1748,13 @@ Module num. |))) ] |) in - let _ := + let~ _ := let β := register in M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (Value.Integer 16131858542891098079) |) in - let float := + let~ float := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [ M.read (| register |); M.read (| len |) ] |), diff --git a/CoqOfRust/core/num/dec2flt/slow.v b/CoqOfRust/core/num/dec2flt/slow.v index 16ee0c9c6..5026c16bf 100644 --- a/CoqOfRust/core/num/dec2flt/slow.v +++ b/CoqOfRust/core/num/dec2flt/slow.v @@ -98,7 +98,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let get_shift := + let~ get_shift := M.alloc (| M.closure (fun γ => @@ -157,7 +157,7 @@ Module num. | _ => M.impossible (||) end)) |) in - let fp_zero := + let~ fp_zero := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -168,7 +168,7 @@ Module num. [ Value.Integer 0 ] |) |) in - let fp_inf := + let~ fp_inf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -185,14 +185,14 @@ Module num. ] |) |) in - let d := + let~ d := M.alloc (| M.call_closure (| M.get_function (| "core::num::dec2flt::decimal::parse_decimal", [] |), [ M.read (| s |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -263,8 +263,8 @@ Module num. |))) ] |) in - let exp2 := M.alloc (| Value.Integer 0 |) in - let _ := + let~ exp2 := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -290,7 +290,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.rust_cast (M.read (| @@ -301,7 +301,7 @@ Module num. |) |)) |) in - let shift := + let~ shift := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -316,7 +316,7 @@ Module num. [ get_shift; Value.Tuple [ M.read (| n |) ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -327,7 +327,7 @@ Module num. [ d; M.read (| shift |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -366,15 +366,14 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp2 in M.write (| β, - BinOp.Panic.add (| - Integer.I32, - M.read (| β |), - M.rust_cast (M.read (| shift |)) - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| β |)) + (M.rust_cast (M.read (| shift |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -382,7 +381,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -393,7 +392,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -419,7 +418,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let shift := + let~ shift := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -540,7 +539,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -551,7 +550,7 @@ Module num. [ d; M.read (| shift |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -587,15 +586,14 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp2 in M.write (| β, - BinOp.Panic.sub (| - Integer.I32, - M.read (| β |), - M.rust_cast (M.read (| shift |)) - |) + BinOp.Wrap.sub + Integer.I32 + (M.read (| β |)) + (M.rust_cast (M.read (| shift |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -603,7 +601,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -614,13 +612,13 @@ Module num. ] |))) |) in - let _ := + let~ _ := let β := exp2 in M.write (| β, - BinOp.Panic.sub (| Integer.I32, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -632,15 +630,14 @@ Module num. M.use (M.alloc (| BinOp.Pure.gt - (BinOp.Panic.add (| - Integer.I32, - M.read (| + (BinOp.Wrap.add + Integer.I32 + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) (M.read (| exp2 |)) |)) in let _ := @@ -648,24 +645,22 @@ Module num. M.read (| γ |), Value.Bool true |) in - let n := + let~ n := M.alloc (| M.rust_cast - (BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.add (| - Integer.I32, - M.read (| + (BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.add + Integer.I32 + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) - |), - Value.Integer 1 - |), - M.read (| exp2 |) - |)) + |)) + (Value.Integer 1)) + (M.read (| exp2 |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -687,7 +682,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| n, M.read (| @@ -700,7 +695,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -711,15 +706,14 @@ Module num. [ d; M.read (| n |) ] |) |) in - let _ := + let~ _ := let β := exp2 in M.write (| β, - BinOp.Panic.add (| - Integer.I32, - M.read (| β |), - M.rust_cast (M.read (| n |)) - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| β |)) + (M.rust_cast (M.read (| n |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -727,7 +721,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -738,7 +732,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -748,15 +742,14 @@ Module num. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.I32, - M.read (| exp2 |), - M.read (| + (BinOp.Wrap.sub + Integer.I32 + (M.read (| exp2 |)) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) - |) - |)) + |))) (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::INFINITE_POWER" @@ -771,7 +764,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -781,19 +774,18 @@ Module num. |), [ d; - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in - let mantissa := + let~ mantissa := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -804,7 +796,7 @@ Module num. [ d ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -815,22 +807,20 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |), - Value.Integer 1 - |) - |)) + |)) + (Value.Integer 1))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -841,13 +831,13 @@ Module num. [ d; Value.Integer 1 ] |) |) in - let _ := + let~ _ := let β := exp2 in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| mantissa, M.call_closure (| @@ -868,15 +858,14 @@ Module num. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.I32, - M.read (| exp2 |), - M.read (| + (BinOp.Wrap.sub + Integer.I32 + (M.read (| exp2 |)) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) - |) - |)) + |))) (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::INFINITE_POWER" @@ -899,19 +888,18 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let power2 := + let~ power2 := M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - M.read (| exp2 |), - M.read (| + BinOp.Wrap.sub + Integer.I32 + (M.read (| exp2 |)) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MINIMUM_EXPONENT" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -922,45 +910,42 @@ Module num. (M.alloc (| BinOp.Pure.lt (M.read (| mantissa |)) - (BinOp.Panic.shl (| - Value.Integer 1, - M.read (| + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |) - |)) + |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := power2 in M.write (| β, - BinOp.Panic.sub (| Integer.I32, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := mantissa in M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| M.get_constant (| "core::num::dec2flt::float::RawFloat::MANTISSA_EXPLICIT_BITS" |) - |) - |), - Value.Integer 1 - |)) + |))) + (Value.Integer 1)) |) in M.alloc (| Value.StructRecord diff --git a/CoqOfRust/core/num/dec2flt/table.v b/CoqOfRust/core/num/dec2flt/table.v index 994fd892c..e2fc88fe8 100644 --- a/CoqOfRust/core/num/dec2flt/table.v +++ b/CoqOfRust/core/num/dec2flt/table.v @@ -15,19 +15,17 @@ Module num. ltac:(M.monadic (M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.I32, - BinOp.Panic.sub (| - Integer.I32, - M.read (| + (BinOp.Wrap.add + Integer.I32 + (BinOp.Wrap.sub + Integer.I32 + (M.read (| M.get_constant (| "core::num::dec2flt::table::LARGEST_POWER_OF_FIVE" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::num::dec2flt::table::SMALLEST_POWER_OF_FIVE" |) - |) - |), - Value.Integer 1 - |)) + |))) + (Value.Integer 1)) |))). Definition value_POWER_OF_FIVE_128 : Value.t := diff --git a/CoqOfRust/core/num/diy_float.v b/CoqOfRust/core/num/diy_float.v index 5f1ab1815..e974e860d 100644 --- a/CoqOfRust/core/num/diy_float.v +++ b/CoqOfRust/core/num/diy_float.v @@ -131,20 +131,19 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let a := + let~ a := M.alloc (| - BinOp.Panic.shr (| - M.read (| + BinOp.Wrap.shr + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "f" |) - |), - Value.Integer 32 - |) + |)) + (Value.Integer 32) |) in - let b := + let~ b := M.alloc (| BinOp.Pure.bit_and (M.read (| @@ -156,20 +155,19 @@ Module num. |)) (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)) |) in - let c := + let~ c := M.alloc (| - BinOp.Panic.shr (| - M.read (| + BinOp.Wrap.shr + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::diy_float::Fp", "f" |) - |), - Value.Integer 32 - |) + |)) + (Value.Integer 32) |) in - let d := + let~ d := M.alloc (| BinOp.Pure.bit_and (M.read (| @@ -181,73 +179,65 @@ Module num. |)) (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)) |) in - let ac := - M.alloc (| BinOp.Panic.mul (| Integer.U64, M.read (| a |), M.read (| c |) |) |) in - let bc := - M.alloc (| BinOp.Panic.mul (| Integer.U64, M.read (| b |), M.read (| c |) |) |) in - let ad := - M.alloc (| BinOp.Panic.mul (| Integer.U64, M.read (| a |), M.read (| d |) |) |) in - let bd := - M.alloc (| BinOp.Panic.mul (| Integer.U64, M.read (| b |), M.read (| d |) |) |) in - let tmp := + let~ ac := + M.alloc (| BinOp.Wrap.mul Integer.U64 (M.read (| a |)) (M.read (| c |)) |) in + let~ bc := + M.alloc (| BinOp.Wrap.mul Integer.U64 (M.read (| b |)) (M.read (| c |)) |) in + let~ ad := + M.alloc (| BinOp.Wrap.mul Integer.U64 (M.read (| a |)) (M.read (| d |)) |) in + let~ bd := + M.alloc (| BinOp.Wrap.mul Integer.U64 (M.read (| b |)) (M.read (| d |)) |) in + let~ tmp := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.shr (| M.read (| bd |), Value.Integer 32 |), - BinOp.Pure.bit_and + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.shr (M.read (| bd |)) (Value.Integer 32)) + (BinOp.Pure.bit_and (M.read (| ad |)) - (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)) - |), - BinOp.Pure.bit_and + (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)))) + (BinOp.Pure.bit_and (M.read (| bc |)) - (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)) - |), - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 31 |) - |) + (M.read (| M.get_constant (| "core::num::diy_float::mul::MASK" |) |)))) + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 31)) |) in - let f := + let~ f := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - M.read (| ac |), - BinOp.Panic.shr (| M.read (| ad |), Value.Integer 32 |) - |), - BinOp.Panic.shr (| M.read (| bc |), Value.Integer 32 |) - |), - BinOp.Panic.shr (| M.read (| tmp |), Value.Integer 32 |) - |) + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (M.read (| ac |)) + (BinOp.Wrap.shr (M.read (| ad |)) (Value.Integer 32))) + (BinOp.Wrap.shr (M.read (| bc |)) (Value.Integer 32))) + (BinOp.Wrap.shr (M.read (| tmp |)) (Value.Integer 32)) |) in - let e := + let~ e := M.alloc (| - BinOp.Panic.add (| - Integer.I16, - BinOp.Panic.add (| - Integer.I16, - M.read (| + BinOp.Wrap.add + Integer.I16 + (BinOp.Wrap.add + Integer.I16 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "e" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| other |), "core::num::diy_float::Fp", "e" |) - |) - |), - Value.Integer 64 - |) + |))) + (Value.Integer 64) |) in M.alloc (| Value.StructRecord @@ -298,7 +288,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let f := + let~ f := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -306,7 +296,7 @@ Module num. "f" |) |) in - let e := + let~ e := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -314,7 +304,7 @@ Module num. "e" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -324,32 +314,30 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| f |), - BinOp.Panic.sub (| - Integer.I32, - Value.Integer 64, - Value.Integer 32 - |) - |)) + (BinOp.Wrap.shr + (M.read (| f |)) + (BinOp.Wrap.sub + Integer.I32 + (Value.Integer 64) + (Value.Integer 32))) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := f in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), Value.Integer 32 |) |) in - let _ := + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (Value.Integer 32) |) in + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| Integer.I16, M.read (| β |), Value.Integer 32 |) + BinOp.Wrap.sub Integer.I16 (M.read (| β |)) (Value.Integer 32) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -359,32 +347,30 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| f |), - BinOp.Panic.sub (| - Integer.I32, - Value.Integer 64, - Value.Integer 16 - |) - |)) + (BinOp.Wrap.shr + (M.read (| f |)) + (BinOp.Wrap.sub + Integer.I32 + (Value.Integer 64) + (Value.Integer 16))) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := f in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), Value.Integer 16 |) |) in - let _ := + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (Value.Integer 16) |) in + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| Integer.I16, M.read (| β |), Value.Integer 16 |) + BinOp.Wrap.sub Integer.I16 (M.read (| β |)) (Value.Integer 16) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -394,32 +380,27 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| f |), - BinOp.Panic.sub (| - Integer.I32, - Value.Integer 64, - Value.Integer 8 - |) - |)) + (BinOp.Wrap.shr + (M.read (| f |)) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 64) (Value.Integer 8))) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := f in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), Value.Integer 8 |) |) in - let _ := + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (Value.Integer 8) |) in + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| Integer.I16, M.read (| β |), Value.Integer 8 |) + BinOp.Wrap.sub Integer.I16 (M.read (| β |)) (Value.Integer 8) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -429,32 +410,27 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| f |), - BinOp.Panic.sub (| - Integer.I32, - Value.Integer 64, - Value.Integer 4 - |) - |)) + (BinOp.Wrap.shr + (M.read (| f |)) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 64) (Value.Integer 4))) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := f in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), Value.Integer 4 |) |) in - let _ := + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (Value.Integer 4) |) in + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| Integer.I16, M.read (| β |), Value.Integer 4 |) + BinOp.Wrap.sub Integer.I16 (M.read (| β |)) (Value.Integer 4) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -464,32 +440,27 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| f |), - BinOp.Panic.sub (| - Integer.I32, - Value.Integer 64, - Value.Integer 2 - |) - |)) + (BinOp.Wrap.shr + (M.read (| f |)) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 64) (Value.Integer 2))) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := f in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), Value.Integer 2 |) |) in - let _ := + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (Value.Integer 2) |) in + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| Integer.I16, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.sub Integer.I16 (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -499,32 +470,27 @@ Module num. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.shr (| - M.read (| f |), - BinOp.Panic.sub (| - Integer.I32, - Value.Integer 64, - Value.Integer 1 - |) - |)) + (BinOp.Wrap.shr + (M.read (| f |)) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 64) (Value.Integer 1))) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := f in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), Value.Integer 1 |) |) in - let _ := + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := let β := e in M.write (| β, - BinOp.Panic.sub (| Integer.I16, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.I16 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -533,7 +499,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -545,10 +511,7 @@ Module num. UnOp.Pure.not (BinOp.Pure.ge (M.read (| f |)) - (BinOp.Panic.shl (| - Value.Integer 1, - Value.Integer 63 - |))) + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 63))) |)) in let _ := M.is_constant_or_break_match (| @@ -601,21 +564,20 @@ Module num. (let self := M.alloc (| self |) in let e := M.alloc (| e |) in M.read (| - let edelta := + let~ edelta := M.alloc (| - BinOp.Panic.sub (| - Integer.I16, - M.read (| + BinOp.Wrap.sub + Integer.I16 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "e" |) - |), - M.read (| e |) - |) + |)) + (M.read (| e |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -639,26 +601,24 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let edelta := M.alloc (| M.rust_cast (M.read (| edelta |)) |) in - let _ := + let~ edelta := M.alloc (| M.rust_cast (M.read (| edelta |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.alloc (| - BinOp.Panic.shr (| - BinOp.Panic.shl (| - M.read (| + BinOp.Wrap.shr + (BinOp.Wrap.shl + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "f" |) - |), - M.read (| edelta |) - |), - M.read (| edelta |) - |) + |)) + (M.read (| edelta |))) + (M.read (| edelta |)) |); M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -695,7 +655,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -726,16 +686,15 @@ Module num. "core::num::diy_float::Fp" [ ("f", - BinOp.Panic.shl (| - M.read (| + BinOp.Wrap.shl + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::num::diy_float::Fp", "f" |) - |), - M.read (| edelta |) - |)); + |)) + (M.read (| edelta |))); ("e", M.read (| e |)) ] |) diff --git a/CoqOfRust/core/num/error.v b/CoqOfRust/core/num/error.v index bcf816c69..4f104f725 100644 --- a/CoqOfRust/core/num/error.v +++ b/CoqOfRust/core/num/error.v @@ -536,22 +536,41 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::Empty" |) in M.alloc (| M.read (| Value.String "Empty" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::error::IntErrorKind::InvalidDigit" + |) in M.alloc (| M.read (| Value.String "InvalidDigit" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::error::IntErrorKind::PosOverflow" + |) in M.alloc (| M.read (| Value.String "PosOverflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::error::IntErrorKind::NegOverflow" + |) in M.alloc (| M.read (| Value.String "NegOverflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::Zero" |) in M.alloc (| M.read (| Value.String "Zero" |) |))) ] |) @@ -585,28 +604,36 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::Empty" |) in M.alloc (| Value.StructTuple "core::num::error::IntErrorKind::Empty" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::InvalidDigit" |) in M.alloc (| Value.StructTuple "core::num::error::IntErrorKind::InvalidDigit" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::PosOverflow" |) in M.alloc (| Value.StructTuple "core::num::error::IntErrorKind::PosOverflow" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::NegOverflow" |) in M.alloc (| Value.StructTuple "core::num::error::IntErrorKind::NegOverflow" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::Zero" |) in M.alloc (| Value.StructTuple "core::num::error::IntErrorKind::Zero" [] |))) ] |) @@ -644,7 +671,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -654,7 +681,7 @@ Module num. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -805,25 +832,34 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::Empty" |) in + M.alloc (| M.read (| Value.String "cannot parse integer from empty string" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "invalid digit found in string" |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::InvalidDigit" |) in + M.alloc (| M.read (| Value.String "invalid digit found in string" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::PosOverflow" |) in + M.alloc (| M.read (| Value.String "number too large to fit in target type" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::NegOverflow" |) in + M.alloc (| M.read (| Value.String "number too small to fit in target type" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::num::error::IntErrorKind::Zero" |) in + M.alloc (| M.read (| Value.String "number would be zero for non-zero type" |) |))) ] diff --git a/CoqOfRust/core/num/f32.v b/CoqOfRust/core/num/f32.v index 8a4b5d3df..9175d5a55 100644 --- a/CoqOfRust/core/num/f32.v +++ b/CoqOfRust/core/num/f32.v @@ -177,11 +177,10 @@ Module f32. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (M.read (| UnsupportedLiteral |)) |))). Axiom AssociatedConstant_value_NAN : M.IsAssociatedConstant Self "value_NAN" value_NAN. @@ -192,11 +191,10 @@ Module f32. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (M.read (| UnsupportedLiteral |)) |))). Axiom AssociatedConstant_value_INFINITY : @@ -208,11 +206,10 @@ Module f32. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (M.read (| UnsupportedLiteral |)) |))). Axiom AssociatedConstant_value_NEG_INFINITY : @@ -331,7 +328,10 @@ Module f32. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Subnormal" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -360,7 +360,10 @@ Module f32. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Normal" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -484,7 +487,7 @@ Module f32. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_function (| @@ -700,14 +703,14 @@ Module f32. M.catch_return (| ltac:(M.monadic (M.read (| - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -742,13 +745,13 @@ Module f32. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let abs := + let~ abs := M.alloc (| BinOp.Pure.bit_and (M.read (| bits |)) (M.read (| M.get_constant (| "core::f32::next_up::CLEAR_SIGN_MASK" |) |)) |) in - let next_bits := + let~ next_bits := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -781,20 +784,18 @@ Module f32. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| bits |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| bits |)) + (Value.Integer 1) |))) ] |))) @@ -845,14 +846,14 @@ Module f32. M.catch_return (| ltac:(M.monadic (M.read (| - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -891,13 +892,13 @@ Module f32. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let abs := + let~ abs := M.alloc (| BinOp.Pure.bit_and (M.read (| bits |)) (M.read (| M.get_constant (| "core::f32::next_down::CLEAR_SIGN_MASK" |) |)) |) in - let next_bits := + let~ next_bits := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -930,20 +931,18 @@ Module f32. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| bits |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| bits |)) + (Value.Integer 1) |))) ] |))) @@ -973,7 +972,7 @@ Module f32. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| Integer.Usize, M.read (| UnsupportedLiteral |), M.read (| self |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| UnsupportedLiteral |)) (M.read (| self |)))) | _, _ => M.impossible end. @@ -991,11 +990,10 @@ Module f32. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.mul (| - Integer.Usize, - M.read (| self |), - M.read (| M.get_constant (| "core::f32::to_degrees::PIS_IN_180" |) |) - |))) + BinOp.Wrap.mul + Integer.Usize + (M.read (| self |)) + (M.read (| M.get_constant (| "core::f32::to_degrees::PIS_IN_180" |) |)))) | _, _ => M.impossible end. @@ -1013,17 +1011,15 @@ Module f32. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let value := M.copy (| M.get_constant (| "core::f32::consts::PI" |) |) in + let~ value := M.copy (| M.get_constant (| "core::f32::consts::PI" |) |) in M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| self |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| value |), - M.read (| UnsupportedLiteral |) - |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| self |)) + (BinOp.Wrap.div + Integer.Usize + (M.read (| value |)) + (M.read (| UnsupportedLiteral |))) |) |))) | _, _ => M.impossible @@ -1173,11 +1169,10 @@ Module f32. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| self |)) + (M.read (| other |)) |))) ] |))) @@ -1294,11 +1289,10 @@ Module f32. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| self |)) + (M.read (| other |)) |))) ] |))) @@ -1352,14 +1346,14 @@ Module f32. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - let abs_a := + let~ abs_a := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f32", "abs_private", [] |), [ M.read (| a |) ] |) |) in - let abs_b := + let~ abs_b := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f32", "abs_private", [] |), @@ -1389,11 +1383,10 @@ Module f32. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| Integer.Usize, M.read (| a |), M.read (| b |) |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add Integer.Usize (M.read (| a |)) (M.read (| b |))) + (M.read (| UnsupportedLiteral |)) |))); fun γ => ltac:(M.monadic @@ -1417,15 +1410,13 @@ Module f32. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| a |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| b |), - M.read (| UnsupportedLiteral |) - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| a |)) + (BinOp.Wrap.div + Integer.Usize + (M.read (| b |)) + (M.read (| UnsupportedLiteral |))) |))); fun γ => ltac:(M.monadic @@ -1449,32 +1440,27 @@ Module f32. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - M.read (| a |), - M.read (| UnsupportedLiteral |) - |), - M.read (| b |) - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (M.read (| a |)) + (M.read (| UnsupportedLiteral |))) + (M.read (| b |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - M.read (| a |), - M.read (| UnsupportedLiteral |) - |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| b |), - M.read (| UnsupportedLiteral |) - |) - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (M.read (| a |)) + (M.read (| UnsupportedLiteral |))) + (BinOp.Wrap.div + Integer.Usize + (M.read (| b |)) + (M.read (| UnsupportedLiteral |))) |))) ] |))) @@ -1864,7 +1850,7 @@ Module f32. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let left := + let~ left := M.alloc (| M.rust_cast (M.call_closure (| @@ -1872,7 +1858,7 @@ Module f32. [ M.read (| M.read (| self |) |) ] |)) |) in - let right := + let~ right := M.alloc (| M.rust_cast (M.call_closure (| @@ -1880,29 +1866,27 @@ Module f32. [ M.read (| M.read (| other |) |) ] |)) |) in - let _ := + let~ _ := let β := left in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.rust_cast - (BinOp.Panic.shr (| - M.rust_cast (BinOp.Panic.shr (| M.read (| left |), Value.Integer 31 |)), - Value.Integer 1 - |))) + (BinOp.Wrap.shr + (M.rust_cast (BinOp.Wrap.shr (M.read (| left |)) (Value.Integer 31))) + (Value.Integer 1))) |) in - let _ := + let~ _ := let β := right in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.rust_cast - (BinOp.Panic.shr (| - M.rust_cast (BinOp.Panic.shr (| M.read (| right |), Value.Integer 31 |)), - Value.Integer 1 - |))) + (BinOp.Wrap.shr + (M.rust_cast (BinOp.Wrap.shr (M.read (| right |)) (Value.Integer 31))) + (Value.Integer 1))) |) in M.alloc (| M.call_closure (| @@ -1936,7 +1920,7 @@ Module f32. let min := M.alloc (| min |) in let max := M.alloc (| max |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2003,7 +1987,7 @@ Module f32. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2013,12 +1997,12 @@ Module f32. M.use (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| min |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := M.write (| self, M.read (| min |) |) in + let~ _ := M.write (| self, M.read (| min |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2028,7 +2012,7 @@ Module f32. M.use (M.alloc (| BinOp.Pure.gt (M.read (| self |)) (M.read (| max |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := M.write (| self, M.read (| max |) |) in + let~ _ := M.write (| self, M.read (| max |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] diff --git a/CoqOfRust/core/num/f64.v b/CoqOfRust/core/num/f64.v index b2db9ac93..184e5b2b3 100644 --- a/CoqOfRust/core/num/f64.v +++ b/CoqOfRust/core/num/f64.v @@ -177,11 +177,10 @@ Module f64. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (M.read (| UnsupportedLiteral |)) |))). Axiom AssociatedConstant_value_NAN : M.IsAssociatedConstant Self "value_NAN" value_NAN. @@ -192,11 +191,10 @@ Module f64. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (M.read (| UnsupportedLiteral |)) |))). Axiom AssociatedConstant_value_INFINITY : @@ -208,11 +206,10 @@ Module f64. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (M.read (| UnsupportedLiteral |)) |))). Axiom AssociatedConstant_value_NEG_INFINITY : @@ -333,7 +330,10 @@ Module f64. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Subnormal" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -362,7 +362,10 @@ Module f64. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Normal" |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -462,7 +465,7 @@ Module f64. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_function (| @@ -728,14 +731,14 @@ Module f64. M.catch_return (| ltac:(M.monadic (M.read (| - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -770,13 +773,13 @@ Module f64. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let abs := + let~ abs := M.alloc (| BinOp.Pure.bit_and (M.read (| bits |)) (M.read (| M.get_constant (| "core::f64::next_up::CLEAR_SIGN_MASK" |) |)) |) in - let next_bits := + let~ next_bits := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -809,20 +812,18 @@ Module f64. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| bits |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| bits |)) + (Value.Integer 1) |))) ] |))) @@ -873,14 +874,14 @@ Module f64. M.catch_return (| ltac:(M.monadic (M.read (| - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -919,13 +920,13 @@ Module f64. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let abs := + let~ abs := M.alloc (| BinOp.Pure.bit_and (M.read (| bits |)) (M.read (| M.get_constant (| "core::f64::next_down::CLEAR_SIGN_MASK" |) |)) |) in - let next_bits := + let~ next_bits := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -958,20 +959,18 @@ Module f64. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| bits |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| bits |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| bits |)) + (Value.Integer 1) |))) ] |))) @@ -1001,7 +1000,7 @@ Module f64. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| Integer.Usize, M.read (| UnsupportedLiteral |), M.read (| self |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| UnsupportedLiteral |)) (M.read (| self |)))) | _, _ => M.impossible end. @@ -1020,15 +1019,13 @@ Module f64. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.mul (| - Integer.Usize, - M.read (| self |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - M.read (| M.get_constant (| "core::f64::consts::PI" |) |) - |) - |))) + BinOp.Wrap.mul + Integer.Usize + (M.read (| self |)) + (BinOp.Wrap.div + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (M.read (| M.get_constant (| "core::f64::consts::PI" |) |))))) | _, _ => M.impossible end. @@ -1046,17 +1043,15 @@ Module f64. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let value := M.copy (| M.get_constant (| "core::f64::consts::PI" |) |) in + let~ value := M.copy (| M.get_constant (| "core::f64::consts::PI" |) |) in M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| self |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| value |), - M.read (| UnsupportedLiteral |) - |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| self |)) + (BinOp.Wrap.div + Integer.Usize + (M.read (| value |)) + (M.read (| UnsupportedLiteral |))) |) |))) | _, _ => M.impossible @@ -1206,11 +1201,10 @@ Module f64. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| self |)) + (M.read (| other |)) |))) ] |))) @@ -1327,11 +1321,10 @@ Module f64. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| self |)) + (M.read (| other |)) |))) ] |))) @@ -1385,14 +1378,14 @@ Module f64. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - let abs_a := + let~ abs_a := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs_private", [] |), [ M.read (| a |) ] |) |) in - let abs_b := + let~ abs_b := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs_private", [] |), @@ -1422,11 +1415,10 @@ Module f64. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| Integer.Usize, M.read (| a |), M.read (| b |) |), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add Integer.Usize (M.read (| a |)) (M.read (| b |))) + (M.read (| UnsupportedLiteral |)) |))); fun γ => ltac:(M.monadic @@ -1450,15 +1442,13 @@ Module f64. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| a |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| b |), - M.read (| UnsupportedLiteral |) - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| a |)) + (BinOp.Wrap.div + Integer.Usize + (M.read (| b |)) + (M.read (| UnsupportedLiteral |))) |))); fun γ => ltac:(M.monadic @@ -1482,32 +1472,27 @@ Module f64. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - M.read (| a |), - M.read (| UnsupportedLiteral |) - |), - M.read (| b |) - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (M.read (| a |)) + (M.read (| UnsupportedLiteral |))) + (M.read (| b |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - M.read (| a |), - M.read (| UnsupportedLiteral |) - |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| b |), - M.read (| UnsupportedLiteral |) - |) - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (M.read (| a |)) + (M.read (| UnsupportedLiteral |))) + (BinOp.Wrap.div + Integer.Usize + (M.read (| b |)) + (M.read (| UnsupportedLiteral |))) |))) ] |))) @@ -1884,7 +1869,7 @@ Module f64. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let left := + let~ left := M.alloc (| M.rust_cast (M.call_closure (| @@ -1892,7 +1877,7 @@ Module f64. [ M.read (| M.read (| self |) |) ] |)) |) in - let right := + let~ right := M.alloc (| M.rust_cast (M.call_closure (| @@ -1900,29 +1885,27 @@ Module f64. [ M.read (| M.read (| other |) |) ] |)) |) in - let _ := + let~ _ := let β := left in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.rust_cast - (BinOp.Panic.shr (| - M.rust_cast (BinOp.Panic.shr (| M.read (| left |), Value.Integer 63 |)), - Value.Integer 1 - |))) + (BinOp.Wrap.shr + (M.rust_cast (BinOp.Wrap.shr (M.read (| left |)) (Value.Integer 63))) + (Value.Integer 1))) |) in - let _ := + let~ _ := let β := right in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.rust_cast - (BinOp.Panic.shr (| - M.rust_cast (BinOp.Panic.shr (| M.read (| right |), Value.Integer 63 |)), - Value.Integer 1 - |))) + (BinOp.Wrap.shr + (M.rust_cast (BinOp.Wrap.shr (M.read (| right |)) (Value.Integer 63))) + (Value.Integer 1))) |) in M.alloc (| M.call_closure (| @@ -1956,7 +1939,7 @@ Module f64. let min := M.alloc (| min |) in let max := M.alloc (| max |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2023,7 +2006,7 @@ Module f64. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2033,12 +2016,12 @@ Module f64. M.use (M.alloc (| BinOp.Pure.lt (M.read (| self |)) (M.read (| min |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := M.write (| self, M.read (| min |) |) in + let~ _ := M.write (| self, M.read (| min |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2048,7 +2031,7 @@ Module f64. M.use (M.alloc (| BinOp.Pure.gt (M.read (| self |)) (M.read (| max |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := M.write (| self, M.read (| max |) |) in + let~ _ := M.write (| self, M.read (| max |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] diff --git a/CoqOfRust/core/num/flt2dec/decoder.v b/CoqOfRust/core/num/flt2dec/decoder.v index 1004b5f4a..72ad7dff4 100644 --- a/CoqOfRust/core/num/flt2dec/decoder.v +++ b/CoqOfRust/core/num/flt2dec/decoder.v @@ -398,6 +398,11 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Nan" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -411,6 +416,11 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Infinite" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -424,6 +434,11 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Zero" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -494,7 +509,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -504,7 +519,7 @@ Module num. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -726,13 +741,13 @@ Module num. let mant := M.copy (| γ0_0 |) in let exp := M.copy (| γ0_1 |) in let sign := M.copy (| γ0_2 |) in - let even := + let~ even := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and (M.read (| mant |)) (Value.Integer 1)) (Value.Integer 0) |) in - let decoded := + let~ decoded := M.copy (| M.match_operator (| M.alloc (| @@ -750,28 +765,36 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::FpCategory::Nan" |) in + M.alloc (| Value.StructTuple "core::num::flt2dec::decoder::FullDecoded::Nan" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::FpCategory::Infinite" |) in + M.alloc (| Value.StructTuple "core::num::flt2dec::decoder::FullDecoded::Infinite" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::FpCategory::Zero" |) in + M.alloc (| Value.StructTuple "core::num::flt2dec::decoder::FullDecoded::Zero" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::num::FpCategory::Subnormal" |) in + M.alloc (| Value.StructTuple "core::num::flt2dec::decoder::FullDecoded::Finite" [ @@ -788,7 +811,9 @@ Module num. |))); fun γ => ltac:(M.monadic - (let minnorm := + (let _ := + M.is_struct_tuple (| γ, "core::num::FpCategory::Normal" |) in + let~ minnorm := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -839,18 +864,16 @@ Module num. "core::num::flt2dec::decoder::Decoded" [ ("mant", - BinOp.Panic.shl (| - M.read (| mant |), - Value.Integer 2 - |)); + BinOp.Wrap.shl + (M.read (| mant |)) + (Value.Integer 2)); ("minus", Value.Integer 1); ("plus", Value.Integer 2); ("exp", - BinOp.Panic.sub (| - Integer.I16, - M.read (| exp |), - Value.Integer 2 - |)); + BinOp.Wrap.sub + Integer.I16 + (M.read (| exp |)) + (Value.Integer 2)); ("inclusive", M.read (| even |)) ] ] @@ -865,18 +888,16 @@ Module num. "core::num::flt2dec::decoder::Decoded" [ ("mant", - BinOp.Panic.shl (| - M.read (| mant |), - Value.Integer 1 - |)); + BinOp.Wrap.shl + (M.read (| mant |)) + (Value.Integer 1)); ("minus", Value.Integer 1); ("plus", Value.Integer 1); ("exp", - BinOp.Panic.sub (| - Integer.I16, - M.read (| exp |), - Value.Integer 1 - |)); + BinOp.Wrap.sub + Integer.I16 + (M.read (| exp |)) + (Value.Integer 1)); ("inclusive", M.read (| even |)) ] ] diff --git a/CoqOfRust/core/num/flt2dec/estimator.v b/CoqOfRust/core/num/flt2dec/estimator.v index 84fed3bc1..40eed32b5 100644 --- a/CoqOfRust/core/num/flt2dec/estimator.v +++ b/CoqOfRust/core/num/flt2dec/estimator.v @@ -20,32 +20,28 @@ Module num. (let mant := M.alloc (| mant |) in let exp := M.alloc (| exp |) in M.read (| - let nbits := + let~ nbits := M.alloc (| - BinOp.Panic.sub (| - Integer.I64, - Value.Integer 64, - M.rust_cast + BinOp.Wrap.sub + Integer.I64 + (Value.Integer 64) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u64", "leading_zeros", [] |), - [ BinOp.Panic.sub (| Integer.U64, M.read (| mant |), Value.Integer 1 |) ] - |)) - |) + [ BinOp.Wrap.sub Integer.U64 (M.read (| mant |)) (Value.Integer 1) ] + |))) |) in M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - BinOp.Panic.mul (| - Integer.I64, - BinOp.Panic.add (| - Integer.I64, - M.read (| nbits |), - M.rust_cast (M.read (| exp |)) - |), - Value.Integer 1292913986 - |), - Value.Integer 32 - |)) + (BinOp.Wrap.shr + (BinOp.Wrap.mul + Integer.I64 + (BinOp.Wrap.add + Integer.I64 + (M.read (| nbits |)) + (M.rust_cast (M.read (| exp |)))) + (Value.Integer 1292913986)) + (Value.Integer 32)) |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/num/flt2dec/mod.v b/CoqOfRust/core/num/flt2dec/mod.v index f696f3f4c..1474ff924 100644 --- a/CoqOfRust/core/num/flt2dec/mod.v +++ b/CoqOfRust/core/num/flt2dec/mod.v @@ -95,13 +95,13 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.read (| d |), i |) in M.write (| β, - BinOp.Panic.add (| Integer.U8, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.U8 (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -118,11 +118,10 @@ Module num. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1)); ("end_", M.call_closure (| M.get_associated_function (| @@ -142,7 +141,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -161,7 +160,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -173,7 +177,7 @@ Module num. 0 |) in let j := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| d |), @@ -191,7 +195,8 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let γ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| BinOp.Pure.gt (M.call_closure (| @@ -205,7 +210,7 @@ Module num. (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| d |), @@ -213,7 +218,7 @@ Module num. |), M.read (| UnsupportedLiteral |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -249,7 +254,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -268,7 +273,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -280,7 +290,7 @@ Module num. 0 |) in let j := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| d |), @@ -302,7 +312,8 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| UnsupportedLiteral |) ] @@ -394,7 +405,7 @@ Module num. let frac_digits := M.alloc (| frac_digits |) in let parts := M.alloc (| parts |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -426,7 +437,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -457,7 +468,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -504,12 +515,12 @@ Module num. (let γ := M.use (M.alloc (| BinOp.Pure.le (M.read (| exp |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let minus_exp := + let~ minus_exp := M.alloc (| M.rust_cast (UnOp.Panic.neg (| Integer.I32, M.rust_cast (M.read (| exp |)) |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -530,7 +541,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -551,7 +562,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -589,24 +600,23 @@ Module num. |)), ltac:(M.monadic (BinOp.Pure.gt - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| frac_digits |), - M.call_closure (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| frac_digits |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |) - |)) + |))) (M.read (| minus_exp |)))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -624,22 +634,20 @@ Module num. Value.StructTuple "core::num::fmt::Part::Zero" [ - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| frac_digits |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| frac_digits |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |) - |), - M.read (| minus_exp |) - |) + |))) + (M.read (| minus_exp |)) ] ] |) @@ -726,7 +734,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let exp := M.alloc (| M.rust_cast (M.read (| exp |)) |) in + (let~ exp := M.alloc (| M.rust_cast (M.read (| exp |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -748,7 +756,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -789,7 +797,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -813,7 +821,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -864,25 +872,24 @@ Module num. (M.alloc (| BinOp.Pure.gt (M.read (| frac_digits |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |), - M.read (| exp |) - |)) + |)) + (M.read (| exp |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -900,22 +907,20 @@ Module num. Value.StructTuple "core::num::fmt::Part::Zero" [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| frac_digits |), - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| frac_digits |)) + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |), - M.read (| exp |) - |) - |) + |)) + (M.read (| exp |))) ] ] |) @@ -1002,7 +1007,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -1023,7 +1028,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -1041,18 +1046,17 @@ Module num. Value.StructTuple "core::num::fmt::Part::Zero" [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| exp |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| exp |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |) - |) + |)) ] ] |) @@ -1072,7 +1076,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -1096,7 +1100,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -1258,7 +1262,7 @@ Module num. let upper := M.alloc (| upper |) in let parts := M.alloc (| parts |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1290,7 +1294,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1321,7 +1325,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1360,8 +1364,8 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let n := M.alloc (| Value.Integer 0 |) in - let _ := + let~ n := M.alloc (| Value.Integer 0 |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), n |), M.call_closure (| @@ -1395,13 +1399,10 @@ Module num. ] |) |) in - let _ := + let~ _ := let β := n in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) - |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1426,7 +1427,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), n |), M.call_closure (| @@ -1445,12 +1446,12 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) |) |), M.call_closure (| @@ -1488,11 +1489,11 @@ Module num. ] |) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 2) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1518,7 +1519,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), n |), M.call_closure (| @@ -1533,31 +1534,26 @@ Module num. Value.StructTuple "core::num::fmt::Part::Zero" [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| min_ndigits |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| min_ndigits |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| buf |) ] - |) - |) + |)) ] ] |) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -1566,11 +1562,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let exp := + let~ exp := M.alloc (| - BinOp.Panic.sub (| Integer.I32, M.rust_cast (M.read (| exp |)), Value.Integer 1 |) + BinOp.Wrap.sub Integer.I32 (M.rust_cast (M.read (| exp |))) (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1579,7 +1575,7 @@ Module num. (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| exp |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), n |), M.call_closure (| @@ -1623,12 +1619,12 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) |) |), M.call_closure (| @@ -1649,7 +1645,7 @@ Module num. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), n |), M.call_closure (| @@ -1693,12 +1689,12 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) |) |), M.call_closure (| @@ -1747,9 +1743,7 @@ Module num. M.read (| parts |); Value.StructRecord "core::ops::range::RangeTo" - [ - ("end_", - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 2 |)) + [ ("end_", BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 2)) ] ] |) @@ -1837,7 +1831,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1847,7 +1841,7 @@ Module num. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1924,10 +1918,13 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::flt2dec::Sign::Minus" |) in M.alloc (| M.read (| Value.String "Minus" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::num::flt2dec::Sign::MinusPlus" |) in M.alloc (| M.read (| Value.String "MinusPlus" |) |))) ] |) @@ -1981,11 +1978,17 @@ Module num. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::num::flt2dec::decoder::FullDecoded::Nan" + |) in Value.String "")); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_1, "core::num::flt2dec::Sign::Minus" |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2002,6 +2005,7 @@ Module num. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_1, "core::num::flt2dec::Sign::MinusPlus" |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2089,7 +2093,7 @@ Module num. let buf := M.alloc (| buf |) in let parts := M.alloc (| parts |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2128,7 +2132,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2187,7 +2191,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let negative := M.copy (| γ0_0 |) in let full_decoded := M.copy (| γ0_1 |) in - let sign := + let~ sign := M.alloc (| M.call_closure (| M.get_function (| "core::num::flt2dec::determine_sign", [] |), @@ -2200,6 +2204,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Nan" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -2270,6 +2279,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Infinite" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -2339,7 +2353,12 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Zero" + |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -2354,7 +2373,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -2378,7 +2397,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -2446,7 +2465,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -2665,7 +2684,7 @@ Module num. let buf := M.alloc (| buf |) in let parts := M.alloc (| parts |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2704,7 +2723,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2749,7 +2768,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2793,7 +2812,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let negative := M.copy (| γ0_0 |) in let full_decoded := M.copy (| γ0_1 |) in - let sign := + let~ sign := M.alloc (| M.call_closure (| M.get_function (| "core::num::flt2dec::determine_sign", [] |), @@ -2806,6 +2825,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Nan" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -2876,6 +2900,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Infinite" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -2946,6 +2975,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Zero" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -3149,15 +3183,14 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let buf := M.copy (| γ0_0 |) in let exp := M.copy (| γ0_1 |) in - let vis_exp := + let~ vis_exp := M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - M.rust_cast (M.read (| exp |)), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I32 + (M.rust_cast (M.read (| exp |))) + (Value.Integer 1) |) in - let parts := + let~ parts := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3257,14 +3290,14 @@ Module num. | [], [ exp ] => ltac:(M.monadic (let exp := M.alloc (| exp |) in - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 21, - BinOp.Panic.shr (| - M.rust_cast - (BinOp.Panic.mul (| - Integer.I32, - M.read (| + BinOp.Wrap.add + Integer.Usize + (Value.Integer 21) + (BinOp.Wrap.shr + (M.rust_cast + (BinOp.Wrap.mul + Integer.I32 + (M.read (| M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3281,12 +3314,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 5 |))) ] |) - |), - M.rust_cast (M.read (| exp |)) - |)), - Value.Integer 4 - |) - |))) + |)) + (M.rust_cast (M.read (| exp |))))) + (Value.Integer 4)))) | _, _ => M.impossible end. @@ -3366,7 +3396,7 @@ Module num. let buf := M.alloc (| buf |) in let parts := M.alloc (| parts |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3405,7 +3435,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3442,7 +3472,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let negative := M.copy (| γ0_0 |) in let full_decoded := M.copy (| γ0_1 |) in - let sign := + let~ sign := M.alloc (| M.call_closure (| M.get_function (| "core::num::flt2dec::determine_sign", [] |), @@ -3455,6 +3485,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Nan" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -3525,6 +3560,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Infinite" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -3594,7 +3634,12 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Zero" + |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -3609,7 +3654,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -3633,7 +3678,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -3651,16 +3696,15 @@ Module num. Value.StructTuple "core::num::fmt::Part::Zero" [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| ndigits |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| ndigits |)) + (Value.Integer 1) ] ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -3756,7 +3800,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -3861,7 +3905,7 @@ Module num. 0 |) in let decoded := M.alloc (| γ0_0 |) in - let maxlen := + let~ maxlen := M.alloc (| M.call_closure (| M.get_function (| @@ -3879,7 +3923,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3948,7 +3992,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let trunc := + let~ trunc := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4173,7 +4217,7 @@ Module num. let buf := M.alloc (| buf |) in let parts := M.alloc (| parts |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4226,7 +4270,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let negative := M.copy (| γ0_0 |) in let full_decoded := M.copy (| γ0_1 |) in - let sign := + let~ sign := M.alloc (| M.call_closure (| M.get_function (| "core::num::flt2dec::determine_sign", [] |), @@ -4239,6 +4283,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Nan" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -4309,6 +4358,11 @@ Module num. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Infinite" + |) in + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -4378,7 +4432,12 @@ Module num. |))); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::num::flt2dec::decoder::FullDecoded::Zero" + |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -4393,7 +4452,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -4417,7 +4476,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -4485,7 +4544,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -4565,7 +4624,7 @@ Module num. 0 |) in let decoded := M.alloc (| γ0_0 |) in - let maxlen := + let~ maxlen := M.alloc (| M.call_closure (| M.get_function (| @@ -4583,7 +4642,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4631,7 +4690,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let limit := + let~ limit := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4749,7 +4808,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4762,7 +4821,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -4827,7 +4886,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -4894,7 +4953,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -4920,7 +4979,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), @@ -4995,7 +5054,7 @@ Module num. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| parts |), diff --git a/CoqOfRust/core/num/flt2dec/strategy/dragon.v b/CoqOfRust/core/num/flt2dec/strategy/dragon.v index ecdd25f31..242d0020b 100644 --- a/CoqOfRust/core/num/flt2dec/strategy/dragon.v +++ b/CoqOfRust/core/num/flt2dec/strategy/dragon.v @@ -184,7 +184,7 @@ Module num. (let x := M.alloc (| x |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -193,7 +193,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -225,7 +225,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -240,7 +240,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -269,7 +269,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -284,7 +284,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -311,7 +311,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -326,7 +326,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -350,7 +350,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -365,7 +365,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -389,7 +389,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -404,7 +404,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -428,7 +428,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -443,7 +443,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -467,7 +467,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -482,7 +482,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -532,11 +532,11 @@ Module num. (let x := M.alloc (| x |) in let n := M.alloc (| n |) in M.read (| - let largest := + let~ largest := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u32" ], "len", @@ -549,11 +549,10 @@ Module num. M.get_constant (| "core::num::flt2dec::strategy::dragon::POW10" |) |)) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -571,7 +570,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -594,15 +593,14 @@ Module num. ] |) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| largest |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| largest |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -610,7 +608,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -621,7 +619,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -689,8 +687,8 @@ Module num. let scale4 := M.alloc (| scale4 |) in let scale8 := M.alloc (| scale8 |) in M.read (| - let d := M.alloc (| Value.Integer 0 |) in - let _ := + let~ d := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -712,7 +710,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -723,17 +721,17 @@ Module num. [ M.read (| x |); M.read (| scale8 |) ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| Integer.U8, M.read (| β |), Value.Integer 8 |) + BinOp.Wrap.add Integer.U8 (M.read (| β |)) (Value.Integer 8) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -755,7 +753,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -766,17 +764,17 @@ Module num. [ M.read (| x |); M.read (| scale4 |) ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| Integer.U8, M.read (| β |), Value.Integer 4 |) + BinOp.Wrap.add Integer.U8 (M.read (| β |)) (Value.Integer 4) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -798,7 +796,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -809,17 +807,17 @@ Module num. [ M.read (| x |); M.read (| scale2 |) ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| Integer.U8, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.add Integer.U8 (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -841,7 +839,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -852,17 +850,17 @@ Module num. [ M.read (| x |); M.read (| scale |) ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| Integer.U8, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.U8 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -871,7 +869,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1091,7 +1089,7 @@ Module num. (let d := M.alloc (| d |) in let buf := M.alloc (| buf |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1124,7 +1122,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1157,7 +1155,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1190,7 +1188,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1253,7 +1251,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1316,7 +1314,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1362,7 +1360,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let rounding := + let~ rounding := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1385,7 +1383,7 @@ Module num. ] |) |) in - let k := + let~ k := M.alloc (| M.call_closure (| M.get_function (| @@ -1393,23 +1391,22 @@ Module num. [] |), [ - BinOp.Panic.add (| - Integer.U64, - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |) - |); + |)); M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), @@ -1420,7 +1417,7 @@ Module num. ] |) |) in - let mant := + let~ mant := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1439,7 +1436,7 @@ Module num. ] |) |) in - let minus := + let~ minus := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1458,7 +1455,7 @@ Module num. ] |) |) in - let plus := + let~ plus := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1477,7 +1474,7 @@ Module num. ] |) |) in - let scale := + let~ scale := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1488,7 +1485,7 @@ Module num. [ Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1509,7 +1506,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1536,7 +1533,7 @@ Module num. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1557,7 +1554,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1578,7 +1575,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1602,7 +1599,7 @@ Module num. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1613,7 +1610,7 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| k |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1626,7 +1623,7 @@ Module num. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1639,7 +1636,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1652,7 +1649,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1668,7 +1665,7 @@ Module num. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1728,16 +1725,16 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := k in M.write (| β, - BinOp.Panic.add (| Integer.I16, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.I16 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1748,7 +1745,7 @@ Module num. [ mant; Value.Integer 10 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1759,7 +1756,7 @@ Module num. [ minus; Value.Integer 10 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1773,7 +1770,7 @@ Module num. M.alloc (| Value.Tuple [] |))) ] |) in - let scale2 := + let~ scale2 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1786,7 +1783,7 @@ Module num. [ scale ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1797,7 +1794,7 @@ Module num. [ scale2; Value.Integer 1 ] |) |) in - let scale4 := + let~ scale4 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1810,7 +1807,7 @@ Module num. [ scale ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1821,7 +1818,7 @@ Module num. [ scale4; Value.Integer 2 ] |) |) in - let scale8 := + let~ scale8 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1834,7 +1831,7 @@ Module num. [ scale ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1845,10 +1842,10 @@ Module num. [ scale8; Value.Integer 3 ] |) |) in - let down := M.copy (| Value.DeclaredButUndefined |) in - let up := M.copy (| Value.DeclaredButUndefined |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ down := M.copy (| Value.DeclaredButUndefined |) in + let~ up := M.copy (| Value.DeclaredButUndefined |) in + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1867,7 +1864,7 @@ Module num. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let d := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1879,7 +1876,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1921,7 +1918,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), i |), M.call_closure (| @@ -1933,25 +1930,20 @@ Module num. [] |), [ - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| d |) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.read (| d |)) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| down, M.call_closure (| @@ -1979,7 +1971,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| up, M.call_closure (| @@ -2031,7 +2023,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2056,7 +2048,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2067,7 +2059,7 @@ Module num. [ mant; Value.Integer 10 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2078,7 +2070,7 @@ Module num. [ minus; Value.Integer 10 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2093,7 +2085,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2190,7 +2182,7 @@ Module num. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), i |), M.call_closure (| @@ -2204,25 +2196,20 @@ Module num. [ M.read (| c |) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := k in M.write (| β, - BinOp.Panic.add (| - Integer.I16, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.I16 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -2417,7 +2404,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2453,7 +2440,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2489,7 +2476,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2525,7 +2512,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2593,7 +2580,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2661,7 +2648,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let k := + let~ k := M.alloc (| M.call_closure (| M.get_function (| @@ -2686,7 +2673,7 @@ Module num. ] |) |) in - let mant := + let~ mant := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2705,7 +2692,7 @@ Module num. ] |) |) in - let scale := + let~ scale := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2716,7 +2703,7 @@ Module num. [ Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2740,7 +2727,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2767,7 +2754,7 @@ Module num. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2791,7 +2778,7 @@ Module num. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2807,7 +2794,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2820,7 +2807,7 @@ Module num. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2836,7 +2823,7 @@ Module num. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2908,16 +2895,16 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := k in M.write (| β, - BinOp.Panic.add (| Integer.I16, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.I16 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2931,7 +2918,7 @@ Module num. M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2961,11 +2948,10 @@ Module num. (M.alloc (| BinOp.Pure.lt (M.rust_cast - (BinOp.Panic.sub (| - Integer.I32, - M.rust_cast (M.read (| k |)), - M.rust_cast (M.read (| limit |)) - |))) + (BinOp.Wrap.sub + Integer.I32 + (M.rust_cast (M.read (| k |))) + (M.rust_cast (M.read (| limit |))))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -2989,11 +2975,10 @@ Module num. |) in M.alloc (| M.rust_cast - (BinOp.Panic.sub (| - Integer.I16, - M.read (| k |), - M.read (| limit |) - |)) + (BinOp.Wrap.sub + Integer.I16 + (M.read (| k |)) + (M.read (| limit |))) |))); fun γ => ltac:(M.monadic @@ -3018,7 +3003,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3034,7 +3019,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let scale2 := + let~ scale2 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3047,7 +3032,7 @@ Module num. [ scale ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3058,7 +3043,7 @@ Module num. [ scale2; Value.Integer 1 ] |) |) in - let scale4 := + let~ scale4 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3071,7 +3056,7 @@ Module num. [ scale ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3082,7 +3067,7 @@ Module num. [ scale4; Value.Integer 2 ] |) |) in - let scale8 := + let~ scale8 := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3095,7 +3080,7 @@ Module num. [ scale ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3132,7 +3117,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3151,7 +3136,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -3165,7 +3155,7 @@ Module num. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3192,7 +3182,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3277,7 +3267,7 @@ Module num. |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3306,7 +3296,13 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let + _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -3327,7 +3323,7 @@ Module num. M.copy (| γ0_0 |) in - let + let~ _ := M.write (| M.read (| @@ -3432,8 +3428,8 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let d := M.alloc (| Value.Integer 0 |) in - let _ := + let~ d := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3462,7 +3458,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3474,15 +3470,14 @@ Module num. [ mant; scale8 ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| - Integer.U8, - M.read (| β |), - Value.Integer 8 - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| β |)) + (Value.Integer 8) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3490,7 +3485,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3519,7 +3514,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3531,15 +3526,14 @@ Module num. [ mant; scale4 ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| - Integer.U8, - M.read (| β |), - Value.Integer 4 - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| β |)) + (Value.Integer 4) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3547,7 +3541,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3576,7 +3570,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3588,15 +3582,14 @@ Module num. [ mant; scale2 ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| - Integer.U8, - M.read (| β |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| β |)) + (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3604,7 +3597,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3633,7 +3626,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3645,15 +3638,14 @@ Module num. [ mant; scale ] |) |) in - let _ := + let~ _ := let β := d in M.write (| β, - BinOp.Panic.add (| - Integer.U8, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3661,7 +3653,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3677,7 +3669,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3736,7 +3728,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3752,7 +3744,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3801,7 +3793,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), @@ -3817,15 +3809,14 @@ Module num. [] |), [ - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.read (| d |) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.read (| d |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3846,7 +3837,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let order := + let~ order := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3869,7 +3860,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3932,11 +3923,10 @@ Module num. M.SubPointer.get_array_field (| M.read (| buf |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (Value.Integer 1) |) |) |) @@ -4009,15 +3999,14 @@ Module num. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := k in M.write (| β, - BinOp.Panic.add (| - Integer.I16, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I16 + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4056,7 +4045,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), @@ -4074,15 +4063,14 @@ Module num. [ M.read (| c |) ] |) |) in - let _ := + let~ _ := let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) diff --git a/CoqOfRust/core/num/flt2dec/strategy/grisu.v b/CoqOfRust/core/num/flt2dec/strategy/grisu.v index b3f2d48b4..6a86d0e0c 100644 --- a/CoqOfRust/core/num/flt2dec/strategy/grisu.v +++ b/CoqOfRust/core/num/flt2dec/strategy/grisu.v @@ -393,7 +393,7 @@ Module num. (let alpha := M.alloc (| alpha |) in let gamma := M.alloc (| gamma |) in M.read (| - let offset := + let~ offset := M.alloc (| M.rust_cast (M.read (| @@ -402,11 +402,11 @@ Module num. |) |)) |) in - let range := + let~ range := M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - M.rust_cast + BinOp.Wrap.sub + Integer.I32 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply @@ -424,42 +424,37 @@ Module num. |) |)) ] - |)), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in - let domain := + let~ domain := M.alloc (| M.rust_cast - (BinOp.Panic.sub (| - Integer.I16, - M.read (| + (BinOp.Wrap.sub + Integer.I16 + (M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::CACHED_POW10_LAST_E" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::CACHED_POW10_FIRST_E" |) - |) - |)) + |))) |) in - let idx := + let~ idx := M.alloc (| - BinOp.Panic.div (| - Integer.I32, - BinOp.Panic.mul (| - Integer.I32, - BinOp.Panic.sub (| - Integer.I32, - M.rust_cast (M.read (| gamma |)), - M.read (| offset |) - |), - M.read (| range |) - |), - M.read (| domain |) - |) + BinOp.Wrap.div + Integer.I32 + (BinOp.Wrap.mul + Integer.I32 + (BinOp.Wrap.sub + Integer.I32 + (M.rust_cast (M.read (| gamma |))) + (M.read (| offset |))) + (M.read (| range |))) + (M.read (| domain |)) |) in M.match_operator (| M.SubPointer.get_array_field (| @@ -477,7 +472,7 @@ Module num. let f := M.copy (| γ0_0 |) in let e := M.copy (| γ0_1 |) in let k := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -489,7 +484,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -589,7 +584,7 @@ Module num. ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -598,7 +593,7 @@ Module num. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1287,7 +1282,7 @@ Module num. ltac:(M.monadic (M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1323,7 +1318,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1359,7 +1354,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1395,7 +1390,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1463,7 +1458,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1531,7 +1526,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1583,7 +1578,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1594,24 +1589,23 @@ Module num. (M.alloc (| UnOp.Pure.not (BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.U64, - M.read (| + (BinOp.Wrap.add + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |) - |)) - (BinOp.Panic.shl (| Value.Integer 1, Value.Integer 61 |))) + |))) + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 61))) |)) in let _ := M.is_constant_or_break_match (| @@ -1634,7 +1628,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let plus := + let~ plus := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1648,23 +1642,22 @@ Module num. "core::num::diy_float::Fp" [ ("f", - BinOp.Panic.add (| - Integer.U64, - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "plus" |) - |) - |)); + |))); ("e", M.read (| M.SubPointer.get_struct_record_field (| @@ -1678,7 +1671,7 @@ Module num. ] |) |) in - let minus := + let~ minus := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1692,23 +1685,22 @@ Module num. "core::num::diy_float::Fp" [ ("f", - BinOp.Panic.sub (| - Integer.U64, - M.read (| + BinOp.Wrap.sub + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "mant" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| d |), "core::num::flt2dec::decoder::Decoded", "minus" |) - |) - |)); + |))); ("e", M.read (| M.SubPointer.get_struct_record_field (| @@ -1729,7 +1721,7 @@ Module num. ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1778,44 +1770,40 @@ Module num. [] |), [ - BinOp.Panic.sub (| - Integer.I16, - BinOp.Panic.sub (| - Integer.I16, - M.read (| + BinOp.Wrap.sub + Integer.I16 + (BinOp.Wrap.sub + Integer.I16 + (M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::ALPHA" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| plus, "core::num::diy_float::Fp", "e" |) - |) - |), - Value.Integer 64 - |); - BinOp.Panic.sub (| - Integer.I16, - BinOp.Panic.sub (| - Integer.I16, - M.read (| + |))) + (Value.Integer 64); + BinOp.Wrap.sub + Integer.I16 + (BinOp.Wrap.sub + Integer.I16 + (M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::GAMMA" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| plus, "core::num::diy_float::Fp", "e" |) - |) - |), - Value.Integer 64 - |) + |))) + (Value.Integer 64) ] |) |), @@ -1826,7 +1814,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let minusk := M.copy (| γ0_0 |) in let cached := M.copy (| γ0_1 |) in - let plus := + let~ plus := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1837,7 +1825,7 @@ Module num. [ plus; cached ] |) |) in - let minus := + let~ minus := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1848,7 +1836,7 @@ Module num. [ minus; cached ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1859,7 +1847,7 @@ Module num. [ v; cached ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1871,7 +1859,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -1922,7 +1910,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -1959,7 +1947,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1971,7 +1959,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -2022,7 +2010,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -2059,35 +2047,33 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let plus1 := + let~ plus1 := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| plus, "core::num::diy_float::Fp", "f" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let minus1 := + let~ minus1 := M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| + BinOp.Wrap.sub + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| minus, "core::num::diy_float::Fp", "f" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let e := + let~ e := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2101,20 +2087,18 @@ Module num. |) |)) |) in - let plus1int := + let~ plus1int := M.alloc (| - M.rust_cast - (BinOp.Panic.shr (| M.read (| plus1 |), M.read (| e |) |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| plus1 |)) (M.read (| e |))) |) in - let plus1frac := + let~ plus1frac := M.alloc (| BinOp.Pure.bit_and (M.read (| plus1 |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| Value.Integer 1, M.read (| e |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl (Value.Integer 1) (M.read (| e |))) + (Value.Integer 1)) |) in M.match_operator (| M.alloc (| @@ -2133,59 +2117,53 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let max_kappa := M.copy (| γ0_0 |) in let max_ten_kappa := M.copy (| γ0_1 |) in - let i := M.alloc (| Value.Integer 0 |) in - let exp := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ exp := M.alloc (| - BinOp.Panic.add (| - Integer.I16, - BinOp.Panic.sub (| - Integer.I16, - M.rust_cast (M.read (| max_kappa |)), - M.read (| minusk |) - |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I16 + (BinOp.Wrap.sub + Integer.I16 + (M.rust_cast (M.read (| max_kappa |))) + (M.read (| minusk |))) + (Value.Integer 1) |) in - let delta1 := + let~ delta1 := M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| plus1 |), - M.read (| minus1 |) - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| plus1 |)) + (M.read (| minus1 |)) |) in - let delta1frac := + let~ delta1frac := M.alloc (| BinOp.Pure.bit_and (M.read (| delta1 |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| Value.Integer 1, M.read (| e |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl (Value.Integer 1) (M.read (| e |))) + (Value.Integer 1)) |) in - let ten_kappa := M.copy (| max_ten_kappa |) in - let remainder := M.copy (| plus1int |) in - let _ := + let~ ten_kappa := M.copy (| max_ten_kappa |) in + let~ remainder := M.copy (| plus1int |) in + let~ _ := M.loop (| ltac:(M.monadic - (let q := + (let~ q := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.read (| remainder |), - M.read (| ten_kappa |) - |) + BinOp.Wrap.div + Integer.U32 + (M.read (| remainder |)) + (M.read (| ten_kappa |)) |) in - let r := + let~ r := M.alloc (| - BinOp.Panic.rem (| - Integer.U32, - M.read (| remainder |), - M.read (| ten_kappa |) - |) + BinOp.Wrap.rem + Integer.U32 + (M.read (| remainder |)) + (M.read (| ten_kappa |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2198,7 +2176,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2243,7 +2221,7 @@ Module num. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), @@ -2259,36 +2237,32 @@ Module num. [] |), [ - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.rust_cast (M.read (| q |))) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let plus1rem := + let~ plus1rem := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.shl (| - M.rust_cast (M.read (| r |)), - M.read (| e |) - |), - M.read (| plus1frac |) - |) + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.shl + (M.rust_cast (M.read (| r |))) + (M.read (| e |))) + (M.read (| plus1frac |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2309,13 +2283,12 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let ten_kappa := + let~ ten_kappa := M.alloc (| - BinOp.Panic.shl (| - M.rust_cast - (M.read (| ten_kappa |)), - M.read (| e |) - |) + BinOp.Wrap.shl + (M.rust_cast + (M.read (| ten_kappa |))) + (M.read (| e |)) |) in M.return_ (| M.call_closure (| @@ -2369,17 +2342,16 @@ Module num. M.read (| exp |); M.read (| plus1rem |); M.read (| delta1 |); - BinOp.Panic.sub (| - Integer.U64, - M.read (| plus1 |), - M.read (| + BinOp.Wrap.sub + Integer.U64 + (M.read (| plus1 |)) + (M.read (| M.SubPointer.get_struct_record_field (| v, "core::num::diy_float::Fp", "f" |) - |) - |); + |)); M.read (| ten_kappa |); Value.Integer 1 ] @@ -2392,7 +2364,7 @@ Module num. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2413,7 +2385,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2429,7 +2401,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -2495,7 +2467,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -2560,79 +2532,72 @@ Module num. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := ten_kappa in M.write (| β, - BinOp.Panic.div (| - Integer.U32, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U32 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := M.write (| remainder, M.read (| r |) |) in + let~ _ := M.write (| remainder, M.read (| r |) |) in M.alloc (| Value.Tuple [] |))) |) in - let remainder := M.copy (| plus1frac |) in - let threshold := M.copy (| delta1frac |) in - let ulp := M.alloc (| Value.Integer 1 |) in - let _ := + let~ remainder := M.copy (| plus1frac |) in + let~ threshold := M.copy (| delta1frac |) in + let~ ulp := M.alloc (| Value.Integer 1 |) in + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := let β := remainder in M.write (| β, - BinOp.Panic.mul (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := threshold in M.write (| β, - BinOp.Panic.mul (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := ulp in M.write (| β, - BinOp.Panic.mul (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let q := + let~ q := M.alloc (| - BinOp.Panic.shr (| - M.read (| remainder |), - M.read (| e |) - |) + BinOp.Wrap.shr + (M.read (| remainder |)) + (M.read (| e |)) |) in - let r := + let~ r := M.alloc (| BinOp.Pure.bit_and (M.read (| remainder |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| e |) - |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| e |))) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2646,7 +2611,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2694,7 +2659,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), @@ -2710,25 +2675,23 @@ Module num. [] |), [ - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.rust_cast (M.read (| q |))) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2749,12 +2712,11 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let ten_kappa := + let~ ten_kappa := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| e |) - |) + BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| e |)) |) in M.return_ (| M.call_closure (| @@ -2814,21 +2776,19 @@ Module num. M.read (| exp |); M.read (| r |); M.read (| threshold |); - BinOp.Panic.mul (| - Integer.U64, - BinOp.Panic.sub (| - Integer.U64, - M.read (| plus1 |), - M.read (| + BinOp.Wrap.mul + Integer.U64 + (BinOp.Wrap.sub + Integer.U64 + (M.read (| plus1 |)) + (M.read (| M.SubPointer.get_struct_record_field (| v, "core::num::diy_float::Fp", "f" |) - |) - |), - M.read (| ulp |) - |); + |))) + (M.read (| ulp |)); M.read (| ten_kappa |); M.read (| ulp |) ] @@ -2842,7 +2802,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| remainder, M.read (| r |) |) in M.alloc (| Value.Tuple [] |))) |) @@ -2974,7 +2934,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3014,17 +2974,17 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let plus1v_down := + let~ plus1v_down := M.alloc (| - BinOp.Panic.add (| Integer.U64, M.read (| plus1v |), M.read (| ulp |) |) + BinOp.Wrap.add Integer.U64 (M.read (| plus1v |)) (M.read (| ulp |)) |) in - let plus1v_up := + let~ plus1v_up := M.alloc (| - BinOp.Panic.sub (| Integer.U64, M.read (| plus1v |), M.read (| ulp |) |) + BinOp.Wrap.sub Integer.U64 (M.read (| plus1v |)) (M.read (| ulp |)) |) in - let plus1w := M.copy (| remainder |) in - let _ := - let last := + let~ plus1w := M.copy (| remainder |) in + let~ _ := + let~ last := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3063,38 +3023,33 @@ Module num. (M.read (| plus1v_up |)), ltac:(M.monadic (BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.U64, - M.read (| threshold |), - M.read (| plus1w |) - |)) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| threshold |)) + (M.read (| plus1w |))) (M.read (| ten_kappa |)))) |), ltac:(M.monadic (LogicalOp.or (| BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.U64, - M.read (| plus1w |), - M.read (| ten_kappa |) - |)) + (BinOp.Wrap.add + Integer.U64 + (M.read (| plus1w |)) + (M.read (| ten_kappa |))) (M.read (| plus1v_up |)), ltac:(M.monadic (BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.U64, - M.read (| plus1v_up |), - M.read (| plus1w |) - |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - M.read (| plus1w |), - M.read (| ten_kappa |) - |), - M.read (| plus1v_up |) - |)))) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| plus1v_up |)) + (M.read (| plus1w |))) + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (M.read (| plus1w |)) + (M.read (| ten_kappa |))) + (M.read (| plus1v_up |))))) |))) |) |)) in @@ -3103,17 +3058,13 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := M.read (| last |) in M.write (| β, - BinOp.Panic.sub (| - Integer.U8, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.U8 (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3125,7 +3076,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3169,15 +3120,14 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := plus1w in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| ten_kappa |) - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| ten_kappa |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3185,7 +3135,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3196,7 +3146,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3212,38 +3162,33 @@ Module num. (M.read (| plus1v_down |)), ltac:(M.monadic (BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.U64, - M.read (| threshold |), - M.read (| plus1w |) - |)) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| threshold |)) + (M.read (| plus1w |))) (M.read (| ten_kappa |)))) |), ltac:(M.monadic (LogicalOp.or (| BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.U64, - M.read (| plus1w |), - M.read (| ten_kappa |) - |)) + (BinOp.Wrap.add + Integer.U64 + (M.read (| plus1w |)) + (M.read (| ten_kappa |))) (M.read (| plus1v_down |)), ltac:(M.monadic (BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.U64, - M.read (| plus1v_down |), - M.read (| plus1w |) - |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - M.read (| plus1w |), - M.read (| ten_kappa |) - |), - M.read (| plus1v_down |) - |)))) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| plus1v_down |)) + (M.read (| plus1w |))) + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (M.read (| plus1w |)) + (M.read (| ten_kappa |))) + (M.read (| plus1v_down |))))) |))) |) |)) in @@ -3274,24 +3219,21 @@ Module num. (M.alloc (| LogicalOp.and (| BinOp.Pure.le - (BinOp.Panic.mul (| - Integer.U64, - Value.Integer 2, - M.read (| ulp |) - |)) + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 2) + (M.read (| ulp |))) (M.read (| plus1w |)), ltac:(M.monadic (BinOp.Pure.le (M.read (| plus1w |)) - (BinOp.Panic.sub (| - Integer.U64, - M.read (| threshold |), - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 4, - M.read (| ulp |) - |) - |)))) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| threshold |)) + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 4) + (M.read (| ulp |)))))) |) |)) in let _ := @@ -3365,7 +3307,8 @@ Module num. ret)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::num::flt2dec::strategy::dragon::format_shortest", @@ -3684,7 +3627,7 @@ Module num. ltac:(M.monadic (M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3720,7 +3663,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3738,7 +3681,7 @@ Module num. "mant" |) |)) - (BinOp.Panic.shl (| Value.Integer 1, Value.Integer 61 |))) + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 61))) |)) in let _ := M.is_constant_or_break_match (| @@ -3760,7 +3703,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3806,7 +3749,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3848,44 +3791,40 @@ Module num. [] |), [ - BinOp.Panic.sub (| - Integer.I16, - BinOp.Panic.sub (| - Integer.I16, - M.read (| + BinOp.Wrap.sub + Integer.I16 + (BinOp.Wrap.sub + Integer.I16 + (M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::ALPHA" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| v, "core::num::diy_float::Fp", "e" |) - |) - |), - Value.Integer 64 - |); - BinOp.Panic.sub (| - Integer.I16, - BinOp.Panic.sub (| - Integer.I16, - M.read (| + |))) + (Value.Integer 64); + BinOp.Wrap.sub + Integer.I16 + (BinOp.Wrap.sub + Integer.I16 + (M.read (| M.get_constant (| "core::num::flt2dec::strategy::grisu::GAMMA" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| v, "core::num::diy_float::Fp", "e" |) - |) - |), - Value.Integer 64 - |) + |))) + (Value.Integer 64) ] |) |), @@ -3896,7 +3835,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let minusk := M.copy (| γ0_0 |) in let cached := M.copy (| γ0_1 |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3907,7 +3846,7 @@ Module num. [ v; cached ] |) |) in - let e := + let~ e := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -3921,21 +3860,20 @@ Module num. |) |)) |) in - let vint := + let~ vint := M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_struct_record_field (| v, "core::num::diy_float::Fp", "f" |) - |), - M.read (| e |) - |)) + |)) + (M.read (| e |))) |) in - let vfrac := + let~ vfrac := M.alloc (| BinOp.Pure.bit_and (M.read (| @@ -3945,13 +3883,12 @@ Module num. "f" |) |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| Value.Integer 1, M.read (| e |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl (Value.Integer 1) (M.read (| e |))) + (Value.Integer 1)) |) in - let requested_digits := + let~ requested_digits := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3968,7 +3905,7 @@ Module num. [ M.read (| buf |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3995,11 +3932,10 @@ Module num. "core::num::flt2dec::strategy::grisu::format_exact_opt::POW10_UP_TO_9" |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| requested_digits |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| requested_digits |)) + (Value.Integer 1) |) |) |)))) @@ -4023,7 +3959,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let err := M.alloc (| Value.Integer 1 |) in + let~ err := M.alloc (| Value.Integer 1 |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -4041,20 +3977,18 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let max_kappa := M.copy (| γ0_0 |) in let max_ten_kappa := M.copy (| γ0_1 |) in - let i := M.alloc (| Value.Integer 0 |) in - let exp := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ exp := M.alloc (| - BinOp.Panic.add (| - Integer.I16, - BinOp.Panic.sub (| - Integer.I16, - M.rust_cast (M.read (| max_kappa |)), - M.read (| minusk |) - |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I16 + (BinOp.Wrap.sub + Integer.I16 + (M.rust_cast (M.read (| max_kappa |))) + (M.read (| minusk |))) + (Value.Integer 1) |) in - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4087,26 +4021,23 @@ Module num. Value.Integer 0; M.read (| exp |); M.read (| limit |); - BinOp.Panic.div (| - Integer.U64, - M.read (| + BinOp.Wrap.div + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| v, "core::num::diy_float::Fp", "f" |) - |), - Value.Integer 10 - |); - BinOp.Panic.shl (| - M.rust_cast - (M.read (| max_ten_kappa |)), - M.read (| e |) - |); - BinOp.Panic.shl (| - M.read (| err |), - M.read (| e |) - |) + |)) + (Value.Integer 10); + BinOp.Wrap.shl + (M.rust_cast + (M.read (| max_ten_kappa |))) + (M.read (| e |)); + BinOp.Wrap.shl + (M.read (| err |)) + (M.read (| e |)) ] |) |) @@ -4125,13 +4056,12 @@ Module num. (M.alloc (| BinOp.Pure.lt (M.rust_cast - (BinOp.Panic.sub (| - Integer.I32, - M.rust_cast - (M.read (| exp |)), - M.rust_cast - (M.read (| limit |)) - |))) + (BinOp.Wrap.sub + Integer.I32 + (M.rust_cast + (M.read (| exp |))) + (M.rust_cast + (M.read (| limit |))))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -4155,11 +4085,10 @@ Module num. |) in M.alloc (| M.rust_cast - (BinOp.Panic.sub (| - Integer.I16, - M.read (| exp |), - M.read (| limit |) - |)) + (BinOp.Wrap.sub + Integer.I16 + (M.read (| exp |)) + (M.read (| limit |))) |))); fun γ => ltac:(M.monadic @@ -4185,7 +4114,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4197,7 +4126,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4241,30 +4170,28 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let kappa := + let~ kappa := M.alloc (| M.rust_cast (M.read (| max_kappa |)) |) in - let ten_kappa := M.copy (| max_ten_kappa |) in - let remainder := M.copy (| vint |) in - let _ := + let~ ten_kappa := M.copy (| max_ten_kappa |) in + let~ remainder := M.copy (| vint |) in + let~ _ := M.loop (| ltac:(M.monadic - (let q := + (let~ q := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.read (| remainder |), - M.read (| ten_kappa |) - |) + BinOp.Wrap.div + Integer.U32 + (M.read (| remainder |)) + (M.read (| ten_kappa |)) |) in - let r := + let~ r := M.alloc (| - BinOp.Panic.rem (| - Integer.U32, - M.read (| remainder |), - M.read (| ten_kappa |) - |) + BinOp.Wrap.rem + Integer.U32 + (M.read (| remainder |)) + (M.read (| ten_kappa |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4277,7 +4204,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4322,7 +4249,7 @@ Module num. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), @@ -4338,25 +4265,23 @@ Module num. [] |), [ - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.rust_cast (M.read (| q |))) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4377,16 +4302,14 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let vrem := + let~ vrem := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.shl (| - M.rust_cast (M.read (| r |)), - M.read (| e |) - |), - M.read (| vfrac |) - |) + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.shl + (M.rust_cast (M.read (| r |))) + (M.read (| e |))) + (M.read (| vfrac |)) |) in M.return_ (| M.call_closure (| @@ -4400,15 +4323,13 @@ Module num. M.read (| exp |); M.read (| limit |); M.read (| vrem |); - BinOp.Panic.shl (| - M.rust_cast - (M.read (| ten_kappa |)), - M.read (| e |) - |); - BinOp.Panic.shl (| - M.read (| err |), - M.read (| e |) - |) + BinOp.Wrap.shl + (M.rust_cast + (M.read (| ten_kappa |))) + (M.read (| e |)); + BinOp.Wrap.shl + (M.read (| err |)) + (M.read (| e |)) ] |) |) @@ -4419,7 +4340,7 @@ Module num. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4440,7 +4361,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4456,7 +4377,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -4522,7 +4443,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -4579,7 +4500,7 @@ Module num. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4595,7 +4516,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -4661,7 +4582,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let + let~ kind := M.alloc (| Value.StructTuple @@ -4726,42 +4647,38 @@ Module num. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := kappa in M.write (| β, - BinOp.Panic.sub (| - Integer.I16, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I16 + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := let β := ten_kappa in M.write (| β, - BinOp.Panic.div (| - Integer.U32, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U32 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := M.write (| remainder, M.read (| r |) |) in + let~ _ := M.write (| remainder, M.read (| r |) |) in M.alloc (| Value.Tuple [] |))) |) in - let remainder := M.copy (| vfrac |) in - let maxerr := + let~ remainder := M.copy (| vfrac |) in + let~ maxerr := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| e |), - Value.Integer 1 - |) - |) + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| e |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4781,47 +4698,42 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := remainder in M.write (| β, - BinOp.Panic.mul (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let _ := + let~ _ := let β := err in M.write (| β, - BinOp.Panic.mul (| - Integer.U64, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| β |)) + (Value.Integer 10) |) in - let q := + let~ q := M.alloc (| - BinOp.Panic.shr (| - M.read (| remainder |), - M.read (| e |) - |) + BinOp.Wrap.shr + (M.read (| remainder |)) + (M.read (| e |)) |) in - let r := + let~ r := M.alloc (| BinOp.Pure.bit_and (M.read (| remainder |)) - (BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| e |) - |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| e |))) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4835,7 +4747,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4884,7 +4796,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), @@ -4900,25 +4812,23 @@ Module num. [] |), [ - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.rust_cast (M.read (| q |)) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.rust_cast (M.read (| q |))) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4951,10 +4861,9 @@ Module num. M.read (| exp |); M.read (| limit |); M.read (| r |); - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| e |) - |); + BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| e |)); M.read (| err |) ] |) @@ -4967,7 +4876,7 @@ Module num. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| remainder, M.read (| r |) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4975,7 +4884,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -5150,7 +5059,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5162,7 +5071,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5201,7 +5110,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5229,7 +5138,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5239,11 +5148,10 @@ Module num. M.use (M.alloc (| BinOp.Pure.le - (BinOp.Panic.sub (| - Integer.U64, - M.read (| ten_kappa |), - M.read (| ulp |) - |)) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| ten_kappa |)) + (M.read (| ulp |))) (M.read (| ulp |)) |)) in let _ := @@ -5263,7 +5171,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5274,28 +5182,24 @@ Module num. (M.alloc (| LogicalOp.and (| BinOp.Pure.gt - (BinOp.Panic.sub (| - Integer.U64, - M.read (| ten_kappa |), - M.read (| remainder |) - |)) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| ten_kappa |)) + (M.read (| remainder |))) (M.read (| remainder |)), ltac:(M.monadic (BinOp.Pure.ge - (BinOp.Panic.sub (| - Integer.U64, - M.read (| ten_kappa |), - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 2, - M.read (| remainder |) - |) - |)) - (BinOp.Panic.mul (| - Integer.U64, - Value.Integer 2, - M.read (| ulp |) - |)))) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| ten_kappa |)) + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 2) + (M.read (| remainder |)))) + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 2) + (M.read (| ulp |))))) |) |)) in let _ := @@ -5360,7 +5264,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5373,20 +5277,17 @@ Module num. BinOp.Pure.gt (M.read (| remainder |)) (M.read (| ulp |)), ltac:(M.monadic (BinOp.Pure.le - (BinOp.Panic.sub (| - Integer.U64, - M.read (| ten_kappa |), - BinOp.Panic.sub (| - Integer.U64, - M.read (| remainder |), - M.read (| ulp |) - |) - |)) - (BinOp.Panic.sub (| - Integer.U64, - M.read (| remainder |), - M.read (| ulp |) - |)))) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| ten_kappa |)) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| remainder |)) + (M.read (| ulp |)))) + (BinOp.Wrap.sub + Integer.U64 + (M.read (| remainder |)) + (M.read (| ulp |))))) |) |)) in let _ := @@ -5397,7 +5298,7 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5460,15 +5361,14 @@ Module num. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.add (| - Integer.I16, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I16 + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5507,7 +5407,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| buf |), @@ -5525,15 +5425,14 @@ Module num. [ M.read (| c |) ] |) |) in - let _ := + let~ _ := let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -5661,7 +5560,8 @@ Module num. ret)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::num::flt2dec::strategy::dragon::format_exact", diff --git a/CoqOfRust/core/num/fmt.v b/CoqOfRust/core/num/fmt.v index 299a8e2df..cacee742c 100644 --- a/CoqOfRust/core/num/fmt.v +++ b/CoqOfRust/core/num/fmt.v @@ -103,7 +103,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -113,7 +113,7 @@ Module num. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -589,7 +589,7 @@ Module num. (let self := M.alloc (| self |) in let out := M.alloc (| out |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::num::fmt::Part", "len", [] |), @@ -616,7 +616,7 @@ Module num. (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.read (| self |), [ @@ -671,7 +671,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -690,7 +690,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -704,7 +709,7 @@ Module num. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| c |), M.read (| UnsupportedLiteral |) @@ -793,7 +798,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -816,7 +821,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -830,29 +840,26 @@ Module num. 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| c |), - BinOp.Panic.add (| - Integer.U8, - M.read (| UnsupportedLiteral |), - M.rust_cast - (BinOp.Panic.rem (| - Integer.U16, - M.read (| v |), - Value.Integer 10 - |)) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| UnsupportedLiteral |)) + (M.rust_cast + (BinOp.Wrap.rem + Integer.U16 + (M.read (| v |)) + (Value.Integer 10))) |) in - let _ := + let~ _ := let β := v in M.write (| β, - BinOp.Panic.div (| - Integer.U16, - M.read (| β |), - Value.Integer 10 - |) + BinOp.Wrap.div + Integer.U16 + (M.read (| β |)) + (Value.Integer 10) |) in M.alloc (| Value.Tuple [] |))) ] @@ -870,7 +877,7 @@ Module num. 0 |) in let buf := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1022,7 +1029,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), @@ -1037,7 +1044,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1068,7 +1075,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1087,7 +1094,9 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1099,22 +1108,21 @@ Module num. 0 |) in let part := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::fmt::Part", "len", [] |), [ M.read (| part |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))) ] @@ -1154,7 +1162,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1197,7 +1205,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1251,7 +1259,7 @@ Module num. ] |) |) in - let written := + let~ written := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), @@ -1266,7 +1274,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1297,7 +1305,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1316,7 +1324,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1328,7 +1341,7 @@ Module num. 0 |) in let part := M.copy (| γ0_0 |) in - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| @@ -1431,15 +1444,14 @@ Module num. ] |) |) in - let _ := + let~ _ := let β := written in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| len |)) |) in M.alloc (| Value.Tuple [] |))) ] diff --git a/CoqOfRust/core/num/int_log10.v b/CoqOfRust/core/num/int_log10.v index 31d9b49c3..b15ebe804 100644 --- a/CoqOfRust/core/num/int_log10.v +++ b/CoqOfRust/core/num/int_log10.v @@ -29,22 +29,19 @@ Module num. ltac:(M.monadic (let val := M.alloc (| val |) in M.read (| - let val := M.alloc (| M.rust_cast (M.read (| val |)) |) in + let~ val := M.alloc (| M.rust_cast (M.read (| val |)) |) in M.alloc (| - BinOp.Panic.shr (| - BinOp.Pure.bit_and - (BinOp.Panic.add (| - Integer.U32, - M.read (| val |), - M.read (| M.get_constant (| "core::num::int_log10::u8::C1" |) |) - |)) - (BinOp.Panic.add (| - Integer.U32, - M.read (| val |), - M.read (| M.get_constant (| "core::num::int_log10::u8::C2" |) |) - |)), - Value.Integer 8 - |) + BinOp.Wrap.shr + (BinOp.Pure.bit_and + (BinOp.Wrap.add + Integer.U32 + (M.read (| val |)) + (M.read (| M.get_constant (| "core::num::int_log10::u8::C1" |) |))) + (BinOp.Wrap.add + Integer.U32 + (M.read (| val |)) + (M.read (| M.get_constant (| "core::num::int_log10::u8::C2" |) |)))) + (Value.Integer 8) |) |))) | _, _ => M.impossible @@ -56,14 +53,12 @@ Module num. Definition value_C1 : Value.t := M.run ltac:(M.monadic - (M.alloc (| BinOp.Panic.sub (| Integer.U32, Value.Integer 768, Value.Integer 10 |) |))). + (M.alloc (| BinOp.Wrap.sub Integer.U32 (Value.Integer 768) (Value.Integer 10) |))). Definition value_C2 : Value.t := M.run ltac:(M.monadic - (M.alloc (| - BinOp.Panic.sub (| Integer.U32, Value.Integer 512, Value.Integer 100 |) - |))). + (M.alloc (| BinOp.Wrap.sub Integer.U32 (Value.Integer 512) (Value.Integer 100) |))). End u8. (* @@ -91,32 +86,27 @@ Module num. | [], [ val ] => ltac:(M.monadic (let val := M.alloc (| val |) in - BinOp.Panic.shr (| - BinOp.Pure.bit_xor + BinOp.Wrap.shr + (BinOp.Pure.bit_xor (BinOp.Pure.bit_and - (BinOp.Panic.add (| - Integer.U32, - M.read (| val |), - M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C1" |) |) - |)) - (BinOp.Panic.add (| - Integer.U32, - M.read (| val |), - M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C2" |) |) - |))) + (BinOp.Wrap.add + Integer.U32 + (M.read (| val |)) + (M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C1" |) |))) + (BinOp.Wrap.add + Integer.U32 + (M.read (| val |)) + (M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C2" |) |)))) (BinOp.Pure.bit_and - (BinOp.Panic.add (| - Integer.U32, - M.read (| val |), - M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C3" |) |) - |)) - (BinOp.Panic.add (| - Integer.U32, - M.read (| val |), - M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C4" |) |) - |))), - Value.Integer 17 - |))) + (BinOp.Wrap.add + Integer.U32 + (M.read (| val |)) + (M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C3" |) |))) + (BinOp.Wrap.add + Integer.U32 + (M.read (| val |)) + (M.read (| M.get_constant (| "core::num::int_log10::less_than_5::C4" |) |))))) + (Value.Integer 17))) | _, _ => M.impossible end. @@ -126,29 +116,23 @@ Module num. Definition value_C1 : Value.t := M.run ltac:(M.monadic - (M.alloc (| - BinOp.Panic.sub (| Integer.U32, Value.Integer 393216, Value.Integer 10 |) - |))). + (M.alloc (| BinOp.Wrap.sub Integer.U32 (Value.Integer 393216) (Value.Integer 10) |))). Definition value_C2 : Value.t := M.run ltac:(M.monadic - (M.alloc (| - BinOp.Panic.sub (| Integer.U32, Value.Integer 524288, Value.Integer 100 |) - |))). + (M.alloc (| BinOp.Wrap.sub Integer.U32 (Value.Integer 524288) (Value.Integer 100) |))). Definition value_C3 : Value.t := M.run ltac:(M.monadic - (M.alloc (| - BinOp.Panic.sub (| Integer.U32, Value.Integer 917504, Value.Integer 1000 |) - |))). + (M.alloc (| BinOp.Wrap.sub Integer.U32 (Value.Integer 917504) (Value.Integer 1000) |))). Definition value_C4 : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| Integer.U32, Value.Integer 524288, Value.Integer 10000 |) + BinOp.Wrap.sub Integer.U32 (Value.Integer 524288) (Value.Integer 10000) |))). End less_than_5. @@ -187,8 +171,8 @@ Module num. ltac:(M.monadic (let val := M.alloc (| val |) in M.read (| - let log := M.alloc (| Value.Integer 0 |) in - let _ := + let~ log := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -198,31 +182,30 @@ Module num. M.use (M.alloc (| BinOp.Pure.ge (M.read (| val |)) (Value.Integer 100000) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := val in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 100000 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 100000) |) in - let _ := + let~ _ := let β := log in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 5 |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 5) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| log |), - M.call_closure (| + BinOp.Wrap.add + Integer.U32 + (M.read (| log |)) + (M.call_closure (| M.get_function (| "core::num::int_log10::less_than_5", [] |), [ M.read (| val |) ] - |) - |) + |)) |) |))) | _, _ => M.impossible @@ -250,8 +233,8 @@ Module num. ltac:(M.monadic (let val := M.alloc (| val |) in M.read (| - let log := M.alloc (| Value.Integer 0 |) in - let _ := + let~ log := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -263,27 +246,23 @@ Module num. BinOp.Pure.ge (M.read (| val |)) (Value.Integer 10000000000) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := val in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - Value.Integer 10000000000 - |) + BinOp.Wrap.div Integer.U64 (M.read (| β |)) (Value.Integer 10000000000) |) in - let _ := + let~ _ := let β := log in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 10 |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 10) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -293,31 +272,30 @@ Module num. M.use (M.alloc (| BinOp.Pure.ge (M.read (| val |)) (Value.Integer 100000) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := val in M.write (| β, - BinOp.Panic.div (| Integer.U64, M.read (| β |), Value.Integer 100000 |) + BinOp.Wrap.div Integer.U64 (M.read (| β |)) (Value.Integer 100000) |) in - let _ := + let~ _ := let β := log in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 5 |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 5) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| log |), - M.call_closure (| + BinOp.Wrap.add + Integer.U32 + (M.read (| log |)) + (M.call_closure (| M.get_function (| "core::num::int_log10::less_than_5", [] |), [ M.rust_cast (M.read (| val |)) ] - |) - |) + |)) |) |))) | _, _ => M.impossible @@ -348,8 +326,8 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let log := M.alloc (| Value.Integer 0 |) in - let _ := + let~ log := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -367,35 +345,29 @@ Module num. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := val in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - Value.Integer 100000000000000000000000000000000 - |) + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (Value.Integer 100000000000000000000000000000000) |) in - let _ := + let~ _ := let β := log in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 32 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 32) |) in M.return_ (| - BinOp.Panic.add (| - Integer.U32, - M.read (| log |), - M.call_closure (| + BinOp.Wrap.add + Integer.U32 + (M.read (| log |)) + (M.call_closure (| M.get_function (| "core::num::int_log10::u32", [] |), [ M.rust_cast (M.read (| val |)) ] - |) - |) + |)) |) |) |) @@ -403,7 +375,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -416,35 +388,33 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := val in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - Value.Integer 10000000000000000 - |) + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (Value.Integer 10000000000000000) |) in - let _ := + let~ _ := let β := log in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 16 |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 16) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| log |), - M.call_closure (| + BinOp.Wrap.add + Integer.U32 + (M.read (| log |)) + (M.call_closure (| M.get_function (| "core::num::int_log10::u64", [] |), [ M.rust_cast (M.read (| val |)) ] - |) - |) + |)) |) |))) |))) diff --git a/CoqOfRust/core/num/mod.v b/CoqOfRust/core/num/mod.v index 5e97df551..81d0c35c8 100644 --- a/CoqOfRust/core/num/mod.v +++ b/CoqOfRust/core/num/mod.v @@ -21,10 +21,9 @@ Module num. ltac:(M.monadic (M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1)) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. @@ -1127,7 +1126,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1142,7 +1141,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -1245,7 +1244,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1260,7 +1259,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -1365,7 +1364,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1388,9 +1387,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1408,7 +1407,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1428,7 +1427,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -1456,7 +1455,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1475,13 +1479,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -1509,7 +1513,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1530,7 +1539,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1656,7 +1665,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -1722,7 +1734,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MIN" |))) ] |) |))) @@ -1836,7 +1851,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -1947,17 +1963,21 @@ Module num. x)); fun γ => ltac:(M.monadic - (let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| exp |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| exp |)) (Value.Integer 2)) (Value.Integer 1) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -2219,11 +2239,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -2252,11 +2271,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -2360,7 +2378,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2377,9 +2395,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2397,7 +2415,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2417,7 +2435,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -2433,13 +2451,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -2457,7 +2475,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2591,7 +2609,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2735,7 +2753,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2848,7 +2866,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.div (| Integer.I8, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.div Integer.I8 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -2964,7 +2982,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.rem Integer.I8 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -3204,7 +3222,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3225,11 +3243,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3247,7 +3265,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3267,7 +3285,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -3279,12 +3297,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -3296,13 +3314,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -3314,12 +3332,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -3333,7 +3351,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3344,7 +3362,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -3352,7 +3370,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -3396,7 +3414,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3413,9 +3431,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3433,7 +3451,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3453,33 +3471,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.I8, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.I8 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.I8, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.I8 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -3487,7 +3500,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3498,7 +3511,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.I8, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.I8 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -3545,7 +3558,8 @@ Module num. sqrt)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -3600,11 +3614,9 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := - M.alloc (| - BinOp.Panic.div (| Integer.I8, M.read (| self |), M.read (| rhs |) |) - |) in - let _ := + let~ q := + M.alloc (| BinOp.Wrap.div Integer.I8 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3614,11 +3626,7 @@ Module num. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.rem (| - Integer.I8, - M.read (| self |), - M.read (| rhs |) - |)) + (BinOp.Wrap.rem Integer.I8 (M.read (| self |)) (M.read (| rhs |))) (Value.Integer 0) |)) in let _ := @@ -3644,20 +3652,18 @@ Module num. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.I8, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I8 + (M.read (| q |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I8, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I8 + (M.read (| q |)) + (Value.Integer 1) |))) ] |) @@ -3702,8 +3708,8 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := - M.alloc (| BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| rhs |) |) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I8 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3751,10 +3757,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| BinOp.Panic.div (| Integer.I8, M.read (| self |), M.read (| rhs |) |) |) in - let r := - M.alloc (| BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| rhs |) |) |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I8 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I8 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3777,9 +3783,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.sub (| Integer.I8, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.sub Integer.I8 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -3807,10 +3811,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| BinOp.Panic.div (| Integer.I8, M.read (| self |), M.read (| rhs |) |) |) in - let r := - M.alloc (| BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| rhs |) |) |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I8 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I8 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3833,9 +3837,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.I8, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.I8 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -3875,7 +3877,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3894,11 +3896,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| rhs |) |) - |) in - let m := + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I8 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3925,7 +3925,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I8, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I8 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -3944,11 +3944,10 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I8, - M.read (| self |), - BinOp.Panic.sub (| Integer.I8, M.read (| rhs |), M.read (| m |) |) - |) + BinOp.Wrap.add + Integer.I8 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.I8 (M.read (| rhs |)) (M.read (| m |))) |))) ] |) @@ -3992,7 +3991,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4019,7 +4018,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.copy (| M.match_operator (| M.alloc (| @@ -4041,7 +4040,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -4051,7 +4051,7 @@ Module num. ] |) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4078,7 +4078,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I8, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I8 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -4103,7 +4103,7 @@ Module num. M.get_associated_function (| Ty.path "i8", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.I8, M.read (| rhs |), M.read (| m |) |) + BinOp.Wrap.sub Integer.I8 (M.read (| rhs |)) (M.read (| m |)) ] |) |))) @@ -4182,7 +4182,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4426,9 +4426,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4446,48 +4446,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i8", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i8", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I8, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.I8 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "i8", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4505,25 +4502,17 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I8, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div Integer.I8 (M.read (| β |)) (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4531,7 +4520,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4581,24 +4570,22 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let log := + (let~ log := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |), - M.rust_cast + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) + (M.rust_cast (M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "i8" ] |), [ M.read (| self |) ] - |)) - |) + |))) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| log |) ] @@ -5028,10 +5015,9 @@ Module num. ltac:(M.monadic (M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1)) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. @@ -6134,7 +6120,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6149,7 +6135,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -6252,7 +6238,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6267,7 +6253,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -6372,7 +6358,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6395,9 +6381,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6415,7 +6401,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6435,7 +6421,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -6463,7 +6449,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -6482,13 +6473,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -6516,7 +6507,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -6537,7 +6533,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6663,7 +6659,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -6729,7 +6728,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MIN" |))) ] |) |))) @@ -6843,7 +6845,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -6954,17 +6957,21 @@ Module num. x)); fun γ => ltac:(M.monadic - (let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| exp |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| exp |)) (Value.Integer 2)) (Value.Integer 1) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -7226,11 +7233,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -7259,11 +7265,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -7367,7 +7372,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7384,9 +7389,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7404,7 +7409,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7424,7 +7429,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -7440,13 +7445,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -7464,7 +7469,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7598,7 +7603,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -7742,7 +7747,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -7855,7 +7860,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.div (| Integer.I16, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.div Integer.I16 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -7971,7 +7976,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.rem Integer.I16 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -8211,7 +8216,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8232,11 +8237,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -8254,7 +8259,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8274,7 +8279,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -8286,12 +8291,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -8303,13 +8308,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -8321,12 +8326,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -8340,7 +8345,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -8351,7 +8356,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -8359,7 +8364,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -8403,7 +8408,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8420,9 +8425,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -8440,7 +8445,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8460,33 +8465,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.I16, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.I16 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.I16, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.I16 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -8494,7 +8494,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -8505,7 +8505,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.I16, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.I16 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -8552,7 +8552,8 @@ Module num. sqrt)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -8607,11 +8608,9 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := - M.alloc (| - BinOp.Panic.div (| Integer.I16, M.read (| self |), M.read (| rhs |) |) - |) in - let _ := + let~ q := + M.alloc (| BinOp.Wrap.div Integer.I16 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8621,11 +8620,10 @@ Module num. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.rem (| - Integer.I16, - M.read (| self |), - M.read (| rhs |) - |)) + (BinOp.Wrap.rem + Integer.I16 + (M.read (| self |)) + (M.read (| rhs |))) (Value.Integer 0) |)) in let _ := @@ -8651,20 +8649,18 @@ Module num. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.I16, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I16 + (M.read (| q |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I16, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I16 + (M.read (| q |)) + (Value.Integer 1) |))) ] |) @@ -8709,10 +8705,8 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| rhs |) |) - |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I16 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8760,14 +8754,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I16, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I16 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I16 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8790,9 +8780,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.sub (| Integer.I16, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.sub Integer.I16 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -8820,14 +8808,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I16, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I16 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I16 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8850,9 +8834,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.I16, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.I16 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -8892,7 +8874,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8911,11 +8893,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| rhs |) |) - |) in - let m := + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I16 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8942,7 +8922,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I16, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I16 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -8961,11 +8941,10 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I16, - M.read (| self |), - BinOp.Panic.sub (| Integer.I16, M.read (| rhs |), M.read (| m |) |) - |) + BinOp.Wrap.add + Integer.I16 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.I16 (M.read (| rhs |)) (M.read (| m |))) |))) ] |) @@ -9009,7 +8988,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9036,7 +9015,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.copy (| M.match_operator (| M.alloc (| @@ -9058,7 +9037,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -9068,7 +9048,7 @@ Module num. ] |) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9095,7 +9075,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I16, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I16 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -9120,7 +9100,7 @@ Module num. M.get_associated_function (| Ty.path "i16", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.I16, M.read (| rhs |), M.read (| m |) |) + BinOp.Wrap.sub Integer.I16 (M.read (| rhs |)) (M.read (| m |)) ] |) |))) @@ -9199,7 +9179,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9443,9 +9423,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9463,48 +9443,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i16", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i16", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I16, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.I16 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "i16", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -9522,25 +9499,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I16, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.I16 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -9548,7 +9520,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -9598,24 +9570,22 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let log := + (let~ log := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |), - M.rust_cast + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) + (M.rust_cast (M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "i16" ] |), [ M.read (| self |) ] - |)) - |) + |))) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| log |) ] @@ -10045,10 +10015,9 @@ Module num. ltac:(M.monadic (M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1)) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. @@ -11151,7 +11120,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11166,7 +11135,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -11269,7 +11238,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11284,7 +11253,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -11389,7 +11358,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11412,9 +11381,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -11432,7 +11401,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11452,7 +11421,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -11480,7 +11449,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -11499,13 +11473,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -11533,7 +11507,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -11554,7 +11533,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -11680,7 +11659,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -11746,7 +11728,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MIN" |))) ] |) |))) @@ -11860,7 +11845,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -11971,17 +11957,21 @@ Module num. x)); fun γ => ltac:(M.monadic - (let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| exp |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| exp |)) (Value.Integer 2)) (Value.Integer 1) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -12243,11 +12233,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -12276,11 +12265,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -12384,7 +12372,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12401,9 +12389,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -12421,7 +12409,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12441,7 +12429,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -12457,13 +12445,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -12481,7 +12469,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -12615,7 +12603,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12759,7 +12747,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12872,7 +12860,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.div (| Integer.I32, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.div Integer.I32 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -12988,7 +12976,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.rem Integer.I32 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -13228,7 +13216,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13249,11 +13237,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -13271,7 +13259,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13291,7 +13279,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -13303,12 +13291,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -13320,13 +13308,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -13338,12 +13326,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -13357,7 +13345,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -13368,7 +13356,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -13376,7 +13364,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -13420,7 +13408,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13437,9 +13425,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -13457,7 +13445,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13477,33 +13465,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.I32, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.I32 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.I32, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.I32 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -13511,7 +13494,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -13522,7 +13505,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.I32, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.I32 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -13569,7 +13552,8 @@ Module num. sqrt)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -13624,11 +13608,9 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := - M.alloc (| - BinOp.Panic.div (| Integer.I32, M.read (| self |), M.read (| rhs |) |) - |) in - let _ := + let~ q := + M.alloc (| BinOp.Wrap.div Integer.I32 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13638,11 +13620,10 @@ Module num. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.rem (| - Integer.I32, - M.read (| self |), - M.read (| rhs |) - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| self |)) + (M.read (| rhs |))) (Value.Integer 0) |)) in let _ := @@ -13668,20 +13649,18 @@ Module num. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I32 + (M.read (| q |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I32, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| q |)) + (Value.Integer 1) |))) ] |) @@ -13726,10 +13705,8 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| rhs |) |) - |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I32 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13777,14 +13754,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I32, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I32 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I32 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13807,9 +13780,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.sub (| Integer.I32, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.sub Integer.I32 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -13837,14 +13808,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I32, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I32 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I32 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13867,9 +13834,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.I32, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.I32 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -13909,7 +13874,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13928,11 +13893,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| rhs |) |) - |) in - let m := + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I32 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -13959,7 +13922,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I32, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I32 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -13978,11 +13941,10 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I32, - M.read (| self |), - BinOp.Panic.sub (| Integer.I32, M.read (| rhs |), M.read (| m |) |) - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.I32 (M.read (| rhs |)) (M.read (| m |))) |))) ] |) @@ -14026,7 +13988,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14053,7 +14015,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.copy (| M.match_operator (| M.alloc (| @@ -14075,7 +14037,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -14085,7 +14048,7 @@ Module num. ] |) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -14112,7 +14075,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I32, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I32 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -14137,7 +14100,7 @@ Module num. M.get_associated_function (| Ty.path "i32", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.I32, M.read (| rhs |), M.read (| m |) |) + BinOp.Wrap.sub Integer.I32 (M.read (| rhs |)) (M.read (| m |)) ] |) |))) @@ -14216,7 +14179,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14460,9 +14423,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14480,48 +14443,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i32", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i32", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I32, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.I32 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "i32", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -14539,25 +14499,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I32, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.I32 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -14565,7 +14520,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -14615,24 +14570,22 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let log := + (let~ log := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |), - M.rust_cast + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) + (M.rust_cast (M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "i32" ] |), [ M.read (| self |) ] - |)) - |) + |))) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| log |) ] @@ -15062,10 +15015,9 @@ Module num. ltac:(M.monadic (M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1)) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. @@ -16168,7 +16120,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16183,7 +16135,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -16286,7 +16238,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16301,7 +16253,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -16406,7 +16358,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16429,9 +16381,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -16449,7 +16401,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16469,7 +16421,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -16497,7 +16449,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -16516,13 +16473,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -16550,7 +16507,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -16571,7 +16533,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -16697,7 +16659,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -16763,7 +16728,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MIN" |))) ] |) |))) @@ -16877,7 +16845,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -16988,17 +16957,21 @@ Module num. x)); fun γ => ltac:(M.monadic - (let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| exp |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| exp |)) (Value.Integer 2)) (Value.Integer 1) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -17260,11 +17233,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -17293,11 +17265,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -17401,7 +17372,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17418,9 +17389,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -17438,7 +17409,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17458,7 +17429,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -17474,13 +17445,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -17498,7 +17469,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -17632,7 +17603,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -17776,7 +17747,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -17889,7 +17860,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.div (| Integer.I64, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.div Integer.I64 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -18005,7 +17976,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.rem Integer.I64 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -18245,7 +18216,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18266,11 +18237,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -18288,7 +18259,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18308,7 +18279,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -18320,12 +18291,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -18337,13 +18308,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -18355,12 +18326,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -18374,7 +18345,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -18385,7 +18356,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -18393,7 +18364,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -18437,7 +18408,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18454,9 +18425,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -18474,7 +18445,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18494,33 +18465,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.I64, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.I64 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.I64, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.I64 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -18528,7 +18494,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -18539,7 +18505,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.I64, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.I64 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -18586,7 +18552,8 @@ Module num. sqrt)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -18641,11 +18608,9 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := - M.alloc (| - BinOp.Panic.div (| Integer.I64, M.read (| self |), M.read (| rhs |) |) - |) in - let _ := + let~ q := + M.alloc (| BinOp.Wrap.div Integer.I64 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18655,11 +18620,10 @@ Module num. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.rem (| - Integer.I64, - M.read (| self |), - M.read (| rhs |) - |)) + (BinOp.Wrap.rem + Integer.I64 + (M.read (| self |)) + (M.read (| rhs |))) (Value.Integer 0) |)) in let _ := @@ -18685,20 +18649,18 @@ Module num. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.I64, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I64 + (M.read (| q |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I64, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I64 + (M.read (| q |)) + (Value.Integer 1) |))) ] |) @@ -18743,10 +18705,8 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| rhs |) |) - |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I64 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18794,14 +18754,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I64, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I64 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I64 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18824,9 +18780,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.sub (| Integer.I64, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.sub Integer.I64 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -18854,14 +18808,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I64, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I64 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I64 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18884,9 +18834,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.I64, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.I64 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -18926,7 +18874,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18945,11 +18893,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| rhs |) |) - |) in - let m := + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I64 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -18976,7 +18922,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I64, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I64 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -18995,11 +18941,10 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I64, - M.read (| self |), - BinOp.Panic.sub (| Integer.I64, M.read (| rhs |), M.read (| m |) |) - |) + BinOp.Wrap.add + Integer.I64 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.I64 (M.read (| rhs |)) (M.read (| m |))) |))) ] |) @@ -19043,7 +18988,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -19070,7 +19015,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.copy (| M.match_operator (| M.alloc (| @@ -19092,7 +19037,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -19102,7 +19048,7 @@ Module num. ] |) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -19129,7 +19075,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I64, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I64 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -19154,7 +19100,7 @@ Module num. M.get_associated_function (| Ty.path "i64", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.I64, M.read (| rhs |), M.read (| m |) |) + BinOp.Wrap.sub Integer.I64 (M.read (| rhs |)) (M.read (| m |)) ] |) |))) @@ -19233,7 +19179,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -19477,9 +19423,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -19497,48 +19443,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i64", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i64", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I64, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.I64 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "i64", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -19556,25 +19499,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I64, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.I64 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -19582,7 +19520,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -19632,24 +19570,22 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let log := + (let~ log := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |), - M.rust_cast + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) + (M.rust_cast (M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "i64" ] |), [ M.read (| self |) ] - |)) - |) + |))) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| log |) ] @@ -20079,10 +20015,9 @@ Module num. ltac:(M.monadic (M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1)) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. @@ -21185,7 +21120,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -21200,7 +21135,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -21303,7 +21238,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -21318,7 +21253,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -21423,7 +21358,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -21446,9 +21381,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -21466,7 +21401,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -21486,7 +21421,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -21514,7 +21449,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -21533,13 +21473,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -21567,7 +21507,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -21588,7 +21533,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -21714,7 +21659,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -21780,7 +21728,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MIN" |))) ] |) |))) @@ -21894,7 +21845,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -22005,17 +21957,21 @@ Module num. x)); fun γ => ltac:(M.monadic - (let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| exp |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| exp |)) (Value.Integer 2)) (Value.Integer 1) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -22277,11 +22233,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -22310,11 +22265,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -22418,7 +22372,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -22435,9 +22389,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -22455,7 +22409,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -22475,7 +22429,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -22491,13 +22445,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -22515,7 +22469,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -22649,7 +22603,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -22793,7 +22747,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -22906,7 +22860,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.div (| Integer.I128, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.div Integer.I128 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -23022,7 +22976,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.rem Integer.I128 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -23262,7 +23216,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23283,11 +23237,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -23305,7 +23259,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23325,7 +23279,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -23337,12 +23291,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -23354,13 +23308,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -23372,12 +23326,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -23391,7 +23345,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -23402,7 +23356,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -23410,7 +23364,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -23454,7 +23408,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23471,9 +23425,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -23491,7 +23445,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23511,33 +23465,31 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.I128, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.I128 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.I128, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.I128 + (M.read (| base |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -23545,7 +23497,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -23556,9 +23508,7 @@ Module num. ] |))) |) in - M.alloc (| - BinOp.Panic.mul (| Integer.I128, M.read (| acc |), M.read (| base |) |) - |) + M.alloc (| BinOp.Wrap.mul Integer.I128 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -23605,7 +23555,8 @@ Module num. sqrt)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -23660,11 +23611,11 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := + let~ q := M.alloc (| - BinOp.Panic.div (| Integer.I128, M.read (| self |), M.read (| rhs |) |) + BinOp.Wrap.div Integer.I128 (M.read (| self |)) (M.read (| rhs |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23674,11 +23625,10 @@ Module num. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.rem (| - Integer.I128, - M.read (| self |), - M.read (| rhs |) - |)) + (BinOp.Wrap.rem + Integer.I128 + (M.read (| self |)) + (M.read (| rhs |))) (Value.Integer 0) |)) in let _ := @@ -23704,20 +23654,18 @@ Module num. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.I128, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I128 + (M.read (| q |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I128, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I128 + (M.read (| q |)) + (Value.Integer 1) |))) ] |) @@ -23762,10 +23710,8 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| rhs |) |) - |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I128 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23813,14 +23759,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I128, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I128 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I128 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23843,9 +23785,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.sub (| Integer.I128, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.sub Integer.I128 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -23873,14 +23813,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.I128, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.I128 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.I128 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23903,9 +23839,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.I128, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.I128 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -23945,7 +23879,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -23964,11 +23898,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.alloc (| - BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| rhs |) |) + BinOp.Wrap.rem Integer.I128 (M.read (| self |)) (M.read (| rhs |)) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -23995,7 +23929,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I128, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I128 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -24014,11 +23948,10 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.I128, - M.read (| self |), - BinOp.Panic.sub (| Integer.I128, M.read (| rhs |), M.read (| m |) |) - |) + BinOp.Wrap.add + Integer.I128 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.I128 (M.read (| rhs |)) (M.read (| m |))) |))) ] |) @@ -24062,7 +23995,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -24089,7 +24022,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.copy (| M.match_operator (| M.alloc (| @@ -24111,7 +24044,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -24121,7 +24055,7 @@ Module num. ] |) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -24148,7 +24082,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.I128, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.I128 (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -24173,7 +24107,7 @@ Module num. M.get_associated_function (| Ty.path "i128", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.I128, M.read (| rhs |), M.read (| m |) |) + BinOp.Wrap.sub Integer.I128 (M.read (| rhs |)) (M.read (| m |)) ] |) |))) @@ -24252,7 +24186,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -24496,9 +24430,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -24516,48 +24450,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i128", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "i128", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I128, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.I128 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "i128", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -24575,25 +24506,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.I128, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.I128 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -24601,7 +24527,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -24651,24 +24577,22 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let log := + (let~ log := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |), - M.rust_cast + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) + (M.rust_cast (M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "i128" ] |), [ M.read (| self |) ] - |)) - |) + |))) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| log |) ] @@ -25098,10 +25022,9 @@ Module num. ltac:(M.monadic (M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (Value.Integer 1)) |))). Axiom AssociatedConstant_value_MAX : M.IsAssociatedConstant Self "value_MAX" value_MAX. @@ -26204,7 +26127,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -26219,7 +26142,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -26322,7 +26245,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -26337,7 +26260,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -26442,7 +26365,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -26465,9 +26388,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -26485,7 +26408,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -26505,7 +26428,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -26533,7 +26456,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -26552,13 +26480,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -26586,7 +26514,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -26607,7 +26540,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -26733,7 +26666,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -26799,7 +26735,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MIN" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MIN" |))) ] |) |))) @@ -26913,7 +26852,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -27024,17 +26964,21 @@ Module num. x)); fun γ => ltac:(M.monadic - (let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let γ := M.alloc (| BinOp.Pure.lt (M.read (| self |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in let γ := M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| exp |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| exp |)) (Value.Integer 2)) (Value.Integer 1) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.get_constant (| "core::num::MIN" |))); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -27296,11 +27240,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -27329,11 +27272,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -27437,7 +27379,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -27454,9 +27396,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -27474,7 +27416,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -27494,7 +27436,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -27510,13 +27452,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -27534,7 +27476,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -27668,7 +27610,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -27812,7 +27754,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in + let~ rhs := M.alloc (| M.rust_cast (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -27925,7 +27867,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.div (| Integer.Isize, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.div Integer.Isize (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -28041,7 +27983,7 @@ Module num. (M.alloc (| Value.Tuple [ - BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| rhs |) |); + BinOp.Wrap.rem Integer.Isize (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ] |))) @@ -28281,7 +28223,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28302,11 +28244,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -28324,7 +28266,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28344,7 +28286,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -28356,12 +28298,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -28373,13 +28315,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -28391,12 +28333,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -28410,7 +28352,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -28421,7 +28363,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -28429,7 +28371,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -28473,7 +28415,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28490,9 +28432,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -28510,7 +28452,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28530,33 +28472,31 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.Isize, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.Isize + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.Isize, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.Isize + (M.read (| base |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -28564,7 +28504,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -28575,9 +28515,7 @@ Module num. ] |))) |) in - M.alloc (| - BinOp.Panic.mul (| Integer.Isize, M.read (| acc |), M.read (| base |) |) - |) + M.alloc (| BinOp.Wrap.mul Integer.Isize (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -28624,7 +28562,8 @@ Module num. sqrt)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -28679,11 +28618,11 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let q := + let~ q := M.alloc (| - BinOp.Panic.div (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) + BinOp.Wrap.div Integer.Isize (M.read (| self |)) (M.read (| rhs |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28693,11 +28632,10 @@ Module num. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.rem (| - Integer.Isize, - M.read (| self |), - M.read (| rhs |) - |)) + (BinOp.Wrap.rem + Integer.Isize + (M.read (| self |)) + (M.read (| rhs |))) (Value.Integer 0) |)) in let _ := @@ -28723,20 +28661,18 @@ Module num. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.Isize, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Isize + (M.read (| q |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Isize, - M.read (| q |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Isize + (M.read (| q |)) + (Value.Integer 1) |))) ] |) @@ -28781,10 +28717,8 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) - |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.Isize (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28832,14 +28766,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.Isize (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.Isize (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28862,9 +28792,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.sub (| Integer.Isize, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.sub Integer.Isize (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -28892,14 +28820,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.Isize (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.Isize (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28922,9 +28846,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.Isize, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.Isize (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -28964,7 +28886,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -28983,11 +28905,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.alloc (| - BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| rhs |) |) + BinOp.Wrap.rem Integer.Isize (M.read (| self |)) (M.read (| rhs |)) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -29014,7 +28936,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.Isize, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.Isize (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -29033,11 +28955,10 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.add (| - Integer.Isize, - M.read (| self |), - BinOp.Panic.sub (| Integer.Isize, M.read (| rhs |), M.read (| m |) |) - |) + BinOp.Wrap.add + Integer.Isize + (M.read (| self |)) + (BinOp.Wrap.sub Integer.Isize (M.read (| rhs |)) (M.read (| m |))) |))) ] |) @@ -29081,7 +29002,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -29108,7 +29029,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.copy (| M.match_operator (| M.alloc (| @@ -29130,7 +29051,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -29140,7 +29062,7 @@ Module num. ] |) |) in - let m := + let~ m := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -29167,7 +29089,7 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| Integer.Isize, M.read (| r |), M.read (| rhs |) |) + BinOp.Wrap.add Integer.Isize (M.read (| r |)) (M.read (| rhs |)) |))); fun γ => ltac:(M.monadic r) ] @@ -29192,7 +29114,7 @@ Module num. M.get_associated_function (| Ty.path "isize", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.Isize, M.read (| rhs |), M.read (| m |) |) + BinOp.Wrap.sub Integer.Isize (M.read (| rhs |)) (M.read (| m |)) ] |) |))) @@ -29271,7 +29193,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -29515,9 +29437,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -29535,52 +29457,49 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "isize", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "isize", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.Isize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.Isize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "isize", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -29598,25 +29517,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.Isize, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.Isize + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -29624,7 +29538,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -29674,24 +29588,22 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let log := + (let~ log := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |), - M.rust_cast + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) + (M.rust_cast (M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "isize" ] |), [ M.read (| self |) ] - |)) - |) + |))) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| log |) ] @@ -30997,7 +30909,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -31241,9 +31153,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -31261,48 +31173,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u8", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u8", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U8, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.U8 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "u8", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -31320,25 +31229,17 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U8, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div Integer.U8 (M.read (| β |)) (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -31346,7 +31247,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -31628,7 +31529,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -31643,7 +31544,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -31746,7 +31647,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -31761,7 +31662,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -31820,7 +31721,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -31843,9 +31744,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -31863,7 +31764,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -31883,7 +31784,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -31911,7 +31812,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -31930,13 +31836,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -31964,7 +31870,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -31985,7 +31896,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -32160,7 +32071,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -32225,7 +32139,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -32327,7 +32244,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -32344,7 +32261,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -32362,7 +32279,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -32379,7 +32296,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -32426,11 +32343,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -32459,11 +32375,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -32503,7 +32418,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -32520,9 +32435,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -32540,7 +32455,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -32560,7 +32475,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -32576,13 +32491,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -32600,7 +32515,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -32939,20 +32854,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U8, - M.read (| other |), - M.read (| self |) - |) + BinOp.Wrap.sub Integer.U8 (M.read (| other |)) (M.read (| self |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U8, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.sub Integer.U8 (M.read (| self |)) (M.read (| other |)) |))) ] |))) @@ -33013,10 +32920,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ])) + [ BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -33035,10 +32939,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ])) + [ BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -33057,10 +32958,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ])) + [ BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -33079,10 +32977,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |); - Value.Bool false - ])) + [ BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -33205,7 +33100,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33226,11 +33121,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -33248,7 +33143,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33268,7 +33163,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -33280,12 +33175,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -33297,13 +33192,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -33315,12 +33210,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -33334,7 +33229,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -33345,7 +33240,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -33353,7 +33248,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -33397,7 +33292,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33414,9 +33309,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -33434,7 +33329,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33454,33 +33349,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.U8, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.U8 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.U8, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.U8 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -33488,7 +33378,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -33499,7 +33389,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.U8, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.U8 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -33550,7 +33440,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33567,21 +33457,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer 0 |) in - let one := + let~ op := M.copy (| self |) in + let~ res := M.alloc (| Value.Integer 0 |) in + let~ one := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Pure.bit_and + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Pure.bit_and (M.call_closure (| M.get_associated_function (| Ty.path "u8", "ilog2", [] |), [ M.read (| self |) ] |)) - (UnOp.Pure.not (Value.Integer 1)) - |) + (UnOp.Pure.not (Value.Integer 1))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -33599,7 +33488,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33610,60 +33499,53 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| op |)) - (BinOp.Panic.add (| - Integer.U8, - M.read (| res |), - M.read (| one |) - |)) + (BinOp.Wrap.add + Integer.U8 + (M.read (| res |)) + (M.read (| one |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := op in M.write (| β, - BinOp.Panic.sub (| - Integer.U8, - M.read (| β |), - BinOp.Panic.add (| - Integer.U8, - M.read (| res |), - M.read (| one |) - |) - |) + BinOp.Wrap.sub + Integer.U8 + (M.read (| β |)) + (BinOp.Wrap.add + Integer.U8 + (M.read (| res |)) + (M.read (| one |))) |) in - let _ := + let~ _ := M.write (| res, - BinOp.Panic.add (| - Integer.U8, - BinOp.Panic.shr (| - M.read (| res |), - Value.Integer 1 - |), - M.read (| one |) - |) + BinOp.Wrap.add + Integer.U8 + (BinOp.Wrap.shr (M.read (| res |)) (Value.Integer 1)) + (M.read (| one |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := res in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -33671,7 +33553,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -33682,29 +33564,27 @@ Module num. ] |))) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (Value.Integer 0) (M.read (| res |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 2 - |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 2))) ] |) |) in @@ -33728,7 +33608,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -33745,7 +33625,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -33762,7 +33642,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -33786,10 +33666,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| rhs |) |) |) in - let r := - M.alloc (| BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |) |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33804,9 +33684,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.U8, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.U8 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -33832,7 +33710,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| rhs |)) |), [ fun γ => ltac:(M.monadic @@ -33842,11 +33720,10 @@ Module num. ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U8, - M.read (| self |), - BinOp.Panic.sub (| Integer.U8, M.read (| rhs |), M.read (| r |) |) - |) + BinOp.Wrap.add + Integer.U8 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.U8 (M.read (| rhs |)) (M.read (| r |))) |))) ] |) @@ -33896,7 +33773,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -33921,7 +33799,7 @@ Module num. M.get_associated_function (| Ty.path "u8", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.U8, M.read (| rhs |), M.read (| r |) |) + BinOp.Wrap.sub Integer.U8 (M.read (| rhs |)) (M.read (| r |)) ] |) |))) @@ -33978,7 +33856,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -33995,11 +33873,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let p := - M.alloc (| - BinOp.Panic.sub (| Integer.U8, M.read (| self |), Value.Integer 1 |) - |) in - let z := + let~ p := + M.alloc (| BinOp.Wrap.sub Integer.U8 (M.read (| self |)) (Value.Integer 1) |) in + let~ z := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u8" ] |), @@ -34007,10 +33883,9 @@ Module num. |) |) in M.alloc (| - BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| z |) - |) + BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| z |)) |) |))) |))) @@ -34030,14 +33905,13 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U8, - M.call_closure (| + BinOp.Wrap.add + Integer.U8 + (M.call_closure (| M.get_associated_function (| Ty.path "u8", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -34276,7 +34150,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "unchecked_mul", [] |), @@ -34287,7 +34161,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 8 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 8)) ] |) |))) @@ -34315,7 +34189,7 @@ Module num. let rhs := M.alloc (| rhs |) in let carry := M.alloc (| carry |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u16", "unchecked_add", [] |), @@ -34332,7 +34206,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 8 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 8)) ] |) |))) @@ -34353,15 +34227,13 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.rust_cast - (BinOp.Panic.div (| - Integer.U16, - BinOp.Panic.add (| - Integer.U16, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| rhs |)) - |), - Value.Integer 2 - |)))) + (BinOp.Wrap.div + Integer.U16 + (BinOp.Wrap.add + Integer.U16 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| rhs |)))) + (Value.Integer 2)))) | _, _ => M.impossible end. @@ -34419,15 +34291,14 @@ Module num. (let self := M.alloc (| self |) in BinOp.Pure.bit_xor (M.read (| M.read (| self |) |)) - (BinOp.Panic.mul (| - Integer.U8, - M.rust_cast + (BinOp.Wrap.mul + Integer.U8 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u8", "is_ascii_lowercase", [] |), [ M.read (| self |) ] - |)), - M.read (| M.get_constant (| "core::num::ASCII_CASE_MASK" |) |) - |)))) + |))) + (M.read (| M.get_constant (| "core::num::ASCII_CASE_MASK" |) |))))) | _, _ => M.impossible end. @@ -34447,15 +34318,14 @@ Module num. (let self := M.alloc (| self |) in BinOp.Pure.bit_or (M.read (| M.read (| self |) |)) - (BinOp.Panic.mul (| - Integer.U8, - M.rust_cast + (BinOp.Wrap.mul + Integer.U8 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u8", "is_ascii_uppercase", [] |), [ M.read (| self |) ] - |)), - M.read (| M.get_constant (| "core::num::ASCII_CASE_MASK" |) |) - |)))) + |))) + (M.read (| M.get_constant (| "core::num::ASCII_CASE_MASK" |) |))))) | _, _ => M.impossible end. @@ -34518,7 +34388,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -34545,7 +34415,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -35914,7 +35784,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -36158,9 +36028,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -36178,48 +36048,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u16", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u16", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U16, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.U16 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "u16", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -36237,25 +36104,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U16, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.U16 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -36263,7 +36125,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -36545,7 +36407,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -36560,7 +36422,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -36663,7 +36525,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -36678,7 +36540,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -36737,7 +36599,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -36760,9 +36622,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -36780,7 +36642,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -36800,7 +36662,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -36828,7 +36690,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -36847,13 +36714,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -36881,7 +36748,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -36902,7 +36774,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -37077,7 +36949,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -37142,7 +37017,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -37244,7 +37122,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -37261,7 +37139,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -37279,7 +37157,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -37296,7 +37174,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -37343,11 +37221,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -37376,11 +37253,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -37420,7 +37296,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -37437,9 +37313,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -37457,7 +37333,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -37477,7 +37353,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -37493,13 +37369,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -37517,7 +37393,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -37856,20 +37732,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U16, - M.read (| other |), - M.read (| self |) - |) + BinOp.Wrap.sub Integer.U16 (M.read (| other |)) (M.read (| self |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U16, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.sub Integer.U16 (M.read (| self |)) (M.read (| other |)) |))) ] |))) @@ -37930,9 +37798,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -37952,9 +37818,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -37974,9 +37838,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -37996,9 +37858,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -38122,7 +37982,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38143,11 +38003,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -38165,7 +38025,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38185,7 +38045,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -38197,12 +38057,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -38214,13 +38074,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -38232,12 +38092,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -38251,7 +38111,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -38262,7 +38122,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -38270,7 +38130,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -38314,7 +38174,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38331,9 +38191,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -38351,7 +38211,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38371,33 +38231,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.U16, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.U16 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.U16, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.U16 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -38405,7 +38260,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -38416,7 +38271,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.U16, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.U16 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -38467,7 +38322,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38484,21 +38339,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer 0 |) in - let one := + let~ op := M.copy (| self |) in + let~ res := M.alloc (| Value.Integer 0 |) in + let~ one := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Pure.bit_and + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Pure.bit_and (M.call_closure (| M.get_associated_function (| Ty.path "u16", "ilog2", [] |), [ M.read (| self |) ] |)) - (UnOp.Pure.not (Value.Integer 1)) - |) + (UnOp.Pure.not (Value.Integer 1))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -38516,7 +38370,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38527,60 +38381,53 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| op |)) - (BinOp.Panic.add (| - Integer.U16, - M.read (| res |), - M.read (| one |) - |)) + (BinOp.Wrap.add + Integer.U16 + (M.read (| res |)) + (M.read (| one |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := op in M.write (| β, - BinOp.Panic.sub (| - Integer.U16, - M.read (| β |), - BinOp.Panic.add (| - Integer.U16, - M.read (| res |), - M.read (| one |) - |) - |) + BinOp.Wrap.sub + Integer.U16 + (M.read (| β |)) + (BinOp.Wrap.add + Integer.U16 + (M.read (| res |)) + (M.read (| one |))) |) in - let _ := + let~ _ := M.write (| res, - BinOp.Panic.add (| - Integer.U16, - BinOp.Panic.shr (| - M.read (| res |), - Value.Integer 1 - |), - M.read (| one |) - |) + BinOp.Wrap.add + Integer.U16 + (BinOp.Wrap.shr (M.read (| res |)) (Value.Integer 1)) + (M.read (| one |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := res in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -38588,7 +38435,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -38599,29 +38446,27 @@ Module num. ] |))) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (Value.Integer 0) (M.read (| res |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 2 - |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 2))) ] |) |) in @@ -38645,7 +38490,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -38662,7 +38507,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -38679,7 +38524,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -38703,14 +38548,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38725,9 +38566,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.U16, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.U16 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -38753,7 +38592,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| rhs |)) |), [ fun γ => ltac:(M.monadic @@ -38763,11 +38602,10 @@ Module num. ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U16, - M.read (| self |), - BinOp.Panic.sub (| Integer.U16, M.read (| rhs |), M.read (| r |) |) - |) + BinOp.Wrap.add + Integer.U16 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.U16 (M.read (| rhs |)) (M.read (| r |))) |))) ] |) @@ -38817,7 +38655,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -38842,7 +38681,7 @@ Module num. M.get_associated_function (| Ty.path "u16", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.U16, M.read (| rhs |), M.read (| r |) |) + BinOp.Wrap.sub Integer.U16 (M.read (| rhs |)) (M.read (| r |)) ] |) |))) @@ -38899,7 +38738,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38916,11 +38755,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let p := - M.alloc (| - BinOp.Panic.sub (| Integer.U16, M.read (| self |), Value.Integer 1 |) - |) in - let z := + let~ p := + M.alloc (| BinOp.Wrap.sub Integer.U16 (M.read (| self |)) (Value.Integer 1) |) in + let~ z := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u16" ] |), @@ -38928,10 +38765,9 @@ Module num. |) |) in M.alloc (| - BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| z |) - |) + BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| z |)) |) |))) |))) @@ -38951,14 +38787,13 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U16, - M.call_closure (| + BinOp.Wrap.add + Integer.U16 + (M.call_closure (| M.get_associated_function (| Ty.path "u16", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -39205,7 +39040,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "unchecked_mul", [] |), @@ -39216,7 +39051,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 16 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 16)) ] |) |))) @@ -39244,7 +39079,7 @@ Module num. let rhs := M.alloc (| rhs |) in let carry := M.alloc (| carry |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "unchecked_add", [] |), @@ -39261,7 +39096,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 16 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 16)) ] |) |))) @@ -39282,15 +39117,13 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.rust_cast - (BinOp.Panic.div (| - Integer.U32, - BinOp.Panic.add (| - Integer.U32, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| rhs |)) - |), - Value.Integer 2 - |)))) + (BinOp.Wrap.div + Integer.U32 + (BinOp.Wrap.add + Integer.U32 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| rhs |)))) + (Value.Integer 2)))) | _, _ => M.impossible end. @@ -40226,7 +40059,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -40470,9 +40303,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -40490,48 +40323,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u32", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u32", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U32, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "u32", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -40549,25 +40379,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U32, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.U32 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -40575,7 +40400,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -40857,7 +40682,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -40872,7 +40697,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -40974,7 +40799,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -40989,7 +40814,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -41047,7 +40872,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -41070,9 +40895,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -41090,7 +40915,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -41110,7 +40935,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -41138,7 +40963,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -41157,13 +40987,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -41191,7 +41021,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -41212,7 +41047,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -41387,7 +41222,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -41452,7 +41290,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -41554,7 +41395,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -41571,7 +41412,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -41589,7 +41430,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -41606,7 +41447,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -41653,11 +41494,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -41686,11 +41526,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -41730,7 +41569,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -41747,9 +41586,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -41767,7 +41606,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -41787,7 +41626,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -41803,13 +41642,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -41827,7 +41666,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -42166,20 +42005,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| other |), - M.read (| self |) - |) + BinOp.Wrap.sub Integer.U32 (M.read (| other |)) (M.read (| self |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.sub Integer.U32 (M.read (| self |)) (M.read (| other |)) |))) ] |))) @@ -42240,9 +42071,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -42262,9 +42091,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -42284,9 +42111,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -42306,9 +42131,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -42432,7 +42255,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -42453,11 +42276,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -42475,7 +42298,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -42495,7 +42318,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -42507,12 +42330,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -42524,13 +42347,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -42542,12 +42365,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -42561,7 +42384,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -42572,7 +42395,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -42580,7 +42403,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -42624,7 +42447,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -42641,9 +42464,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -42661,7 +42484,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -42681,33 +42504,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.U32, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.U32 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.U32, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.U32 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -42715,7 +42533,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -42726,7 +42544,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.U32, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.U32 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -42777,7 +42595,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -42794,21 +42612,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer 0 |) in - let one := + let~ op := M.copy (| self |) in + let~ res := M.alloc (| Value.Integer 0 |) in + let~ one := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Pure.bit_and + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Pure.bit_and (M.call_closure (| M.get_associated_function (| Ty.path "u32", "ilog2", [] |), [ M.read (| self |) ] |)) - (UnOp.Pure.not (Value.Integer 1)) - |) + (UnOp.Pure.not (Value.Integer 1))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -42826,7 +42643,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -42837,60 +42654,53 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| op |)) - (BinOp.Panic.add (| - Integer.U32, - M.read (| res |), - M.read (| one |) - |)) + (BinOp.Wrap.add + Integer.U32 + (M.read (| res |)) + (M.read (| one |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := op in M.write (| β, - BinOp.Panic.sub (| - Integer.U32, - M.read (| β |), - BinOp.Panic.add (| - Integer.U32, - M.read (| res |), - M.read (| one |) - |) - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| β |)) + (BinOp.Wrap.add + Integer.U32 + (M.read (| res |)) + (M.read (| one |))) |) in - let _ := + let~ _ := M.write (| res, - BinOp.Panic.add (| - Integer.U32, - BinOp.Panic.shr (| - M.read (| res |), - Value.Integer 1 - |), - M.read (| one |) - |) + BinOp.Wrap.add + Integer.U32 + (BinOp.Wrap.shr (M.read (| res |)) (Value.Integer 1)) + (M.read (| one |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := res in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -42898,7 +42708,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -42909,29 +42719,27 @@ Module num. ] |))) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (Value.Integer 0) (M.read (| res |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 2 - |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 2))) ] |) |) in @@ -42955,7 +42763,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -42972,7 +42780,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -42989,7 +42797,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -43013,14 +42821,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -43035,9 +42839,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.U32, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.U32 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -43063,7 +42865,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| rhs |)) |), [ fun γ => ltac:(M.monadic @@ -43073,11 +42875,10 @@ Module num. ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| self |), - BinOp.Panic.sub (| Integer.U32, M.read (| rhs |), M.read (| r |) |) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.U32 (M.read (| rhs |)) (M.read (| r |))) |))) ] |) @@ -43127,7 +42928,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -43152,7 +42954,7 @@ Module num. M.get_associated_function (| Ty.path "u32", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.U32, M.read (| rhs |), M.read (| r |) |) + BinOp.Wrap.sub Integer.U32 (M.read (| rhs |)) (M.read (| r |)) ] |) |))) @@ -43209,7 +43011,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -43226,11 +43028,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let p := - M.alloc (| - BinOp.Panic.sub (| Integer.U32, M.read (| self |), Value.Integer 1 |) - |) in - let z := + let~ p := + M.alloc (| BinOp.Wrap.sub Integer.U32 (M.read (| self |)) (Value.Integer 1) |) in + let~ z := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u32" ] |), @@ -43238,10 +43038,9 @@ Module num. |) |) in M.alloc (| - BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| z |) - |) + BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| z |)) |) |))) |))) @@ -43261,14 +43060,13 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u32", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -43515,7 +43313,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "unchecked_mul", [] |), @@ -43526,7 +43324,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 32 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 32)) ] |) |))) @@ -43554,7 +43352,7 @@ Module num. let rhs := M.alloc (| rhs |) in let carry := M.alloc (| carry |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "unchecked_add", [] |), @@ -43571,7 +43369,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 32 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 32)) ] |) |))) @@ -43592,15 +43390,13 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.rust_cast - (BinOp.Panic.div (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| rhs |)) - |), - Value.Integer 2 - |)))) + (BinOp.Wrap.div + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| rhs |)))) + (Value.Integer 2)))) | _, _ => M.impossible end. @@ -44499,7 +44295,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -44743,9 +44539,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -44763,48 +44559,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u64", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u64", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "u64", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -44822,25 +44615,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U64, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -44848,7 +44636,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -45130,7 +44918,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -45145,7 +44933,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -45248,7 +45036,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -45263,7 +45051,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -45322,7 +45110,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -45345,9 +45133,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -45365,7 +45153,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -45385,7 +45173,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -45413,7 +45201,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -45432,13 +45225,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -45466,7 +45259,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -45487,7 +45285,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -45662,7 +45460,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -45727,7 +45528,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -45829,7 +45633,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -45846,7 +45650,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -45864,7 +45668,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -45881,7 +45685,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -45928,11 +45732,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -45961,11 +45764,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -46005,7 +45807,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -46022,9 +45824,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -46042,7 +45844,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -46062,7 +45864,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -46078,13 +45880,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -46102,7 +45904,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -46441,20 +46243,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| other |), - M.read (| self |) - |) + BinOp.Wrap.sub Integer.U64 (M.read (| other |)) (M.read (| self |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.sub Integer.U64 (M.read (| self |)) (M.read (| other |)) |))) ] |))) @@ -46515,9 +46309,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -46537,9 +46329,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -46559,9 +46349,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -46581,9 +46369,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -46707,7 +46493,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -46728,11 +46514,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -46750,7 +46536,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -46770,7 +46556,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -46782,12 +46568,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -46799,13 +46585,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -46817,12 +46603,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -46836,7 +46622,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -46847,7 +46633,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -46855,7 +46641,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -46899,7 +46685,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -46916,9 +46702,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -46936,7 +46722,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -46956,33 +46742,28 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.U64, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.U64, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul Integer.U64 (M.read (| base |)) (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -46990,7 +46771,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -47001,7 +46782,7 @@ Module num. ] |))) |) in - M.alloc (| BinOp.Panic.mul (| Integer.U64, M.read (| acc |), M.read (| base |) |) |) + M.alloc (| BinOp.Wrap.mul Integer.U64 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -47052,7 +46833,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -47069,21 +46850,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer 0 |) in - let one := + let~ op := M.copy (| self |) in + let~ res := M.alloc (| Value.Integer 0 |) in + let~ one := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Pure.bit_and + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Pure.bit_and (M.call_closure (| M.get_associated_function (| Ty.path "u64", "ilog2", [] |), [ M.read (| self |) ] |)) - (UnOp.Pure.not (Value.Integer 1)) - |) + (UnOp.Pure.not (Value.Integer 1))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -47101,7 +46881,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -47112,60 +46892,53 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| op |)) - (BinOp.Panic.add (| - Integer.U64, - M.read (| res |), - M.read (| one |) - |)) + (BinOp.Wrap.add + Integer.U64 + (M.read (| res |)) + (M.read (| one |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := op in M.write (| β, - BinOp.Panic.sub (| - Integer.U64, - M.read (| β |), - BinOp.Panic.add (| - Integer.U64, - M.read (| res |), - M.read (| one |) - |) - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.add + Integer.U64 + (M.read (| res |)) + (M.read (| one |))) |) in - let _ := + let~ _ := M.write (| res, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.shr (| - M.read (| res |), - Value.Integer 1 - |), - M.read (| one |) - |) + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.shr (M.read (| res |)) (Value.Integer 1)) + (M.read (| one |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := res in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -47173,7 +46946,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -47184,29 +46957,27 @@ Module num. ] |))) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (Value.Integer 0) (M.read (| res |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 2 - |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 2))) ] |) |) in @@ -47230,7 +47001,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -47247,7 +47018,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -47264,7 +47035,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -47288,14 +47059,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -47310,9 +47077,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.U64, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.U64 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -47338,7 +47103,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| rhs |)) |), [ fun γ => ltac:(M.monadic @@ -47348,11 +47113,10 @@ Module num. ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| self |), - BinOp.Panic.sub (| Integer.U64, M.read (| rhs |), M.read (| r |) |) - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.U64 (M.read (| rhs |)) (M.read (| r |))) |))) ] |) @@ -47402,7 +47166,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -47427,7 +47192,7 @@ Module num. M.get_associated_function (| Ty.path "u64", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.U64, M.read (| rhs |), M.read (| r |) |) + BinOp.Wrap.sub Integer.U64 (M.read (| rhs |)) (M.read (| r |)) ] |) |))) @@ -47484,7 +47249,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -47501,11 +47266,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let p := - M.alloc (| - BinOp.Panic.sub (| Integer.U64, M.read (| self |), Value.Integer 1 |) - |) in - let z := + let~ p := + M.alloc (| BinOp.Wrap.sub Integer.U64 (M.read (| self |)) (Value.Integer 1) |) in + let~ z := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u64" ] |), @@ -47513,10 +47276,9 @@ Module num. |) |) in M.alloc (| - BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| z |) - |) + BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| z |)) |) |))) |))) @@ -47536,14 +47298,13 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U64, - M.call_closure (| + BinOp.Wrap.add + Integer.U64 + (M.call_closure (| M.get_associated_function (| Ty.path "u64", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -47790,7 +47551,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_mul", [] |), @@ -47801,7 +47562,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 64 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 64)) ] |) |))) @@ -47829,7 +47590,7 @@ Module num. let rhs := M.alloc (| rhs |) in let carry := M.alloc (| carry |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_add", [] |), @@ -47846,7 +47607,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 64 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 64)) ] |) |))) @@ -47867,15 +47628,13 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.rust_cast - (BinOp.Panic.div (| - Integer.U128, - BinOp.Panic.add (| - Integer.U128, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| rhs |)) - |), - Value.Integer 2 - |)))) + (BinOp.Wrap.div + Integer.U128 + (BinOp.Wrap.add + Integer.U128 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| rhs |)))) + (Value.Integer 2)))) | _, _ => M.impossible end. @@ -48774,7 +48533,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49018,9 +48777,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49038,48 +48797,45 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u128", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "u128", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "u128", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -49097,25 +48853,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.U128, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.U128 + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -49123,7 +48874,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -49405,7 +49156,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49420,7 +49171,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -49523,7 +49274,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49538,7 +49289,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -49597,7 +49348,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49620,9 +49371,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -49640,7 +49391,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49660,7 +49411,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -49688,7 +49439,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -49707,13 +49463,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -49741,7 +49497,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -49762,7 +49523,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -49937,7 +49698,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -50002,7 +49766,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -50104,7 +49871,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -50121,7 +49888,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -50139,7 +49906,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -50156,7 +49923,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -50203,11 +49970,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -50236,11 +50002,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -50280,7 +50045,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -50297,9 +50062,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -50317,7 +50082,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -50337,7 +50102,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -50353,13 +50118,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -50377,7 +50142,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -50716,20 +50481,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U128, - M.read (| other |), - M.read (| self |) - |) + BinOp.Wrap.sub Integer.U128 (M.read (| other |)) (M.read (| self |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U128, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.sub Integer.U128 (M.read (| self |)) (M.read (| other |)) |))) ] |))) @@ -50790,9 +50547,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -50812,9 +50567,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -50834,9 +50587,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -50856,9 +50607,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -50982,7 +50731,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51003,11 +50752,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -51025,7 +50774,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51045,7 +50794,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -51057,12 +50806,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -51074,13 +50823,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -51092,12 +50841,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -51111,7 +50860,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -51122,7 +50871,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -51130,7 +50879,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -51174,7 +50923,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51191,9 +50940,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -51211,7 +50960,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51231,33 +50980,31 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.U128, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.U128 + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.U128, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.U128 + (M.read (| base |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -51265,7 +51012,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -51276,9 +51023,7 @@ Module num. ] |))) |) in - M.alloc (| - BinOp.Panic.mul (| Integer.U128, M.read (| acc |), M.read (| base |) |) - |) + M.alloc (| BinOp.Wrap.mul Integer.U128 (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -51329,7 +51074,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51346,21 +51091,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer 0 |) in - let one := + let~ op := M.copy (| self |) in + let~ res := M.alloc (| Value.Integer 0 |) in + let~ one := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Pure.bit_and + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Pure.bit_and (M.call_closure (| M.get_associated_function (| Ty.path "u128", "ilog2", [] |), [ M.read (| self |) ] |)) - (UnOp.Pure.not (Value.Integer 1)) - |) + (UnOp.Pure.not (Value.Integer 1))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -51378,7 +51122,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51389,60 +51133,53 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| op |)) - (BinOp.Panic.add (| - Integer.U128, - M.read (| res |), - M.read (| one |) - |)) + (BinOp.Wrap.add + Integer.U128 + (M.read (| res |)) + (M.read (| one |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := op in M.write (| β, - BinOp.Panic.sub (| - Integer.U128, - M.read (| β |), - BinOp.Panic.add (| - Integer.U128, - M.read (| res |), - M.read (| one |) - |) - |) + BinOp.Wrap.sub + Integer.U128 + (M.read (| β |)) + (BinOp.Wrap.add + Integer.U128 + (M.read (| res |)) + (M.read (| one |))) |) in - let _ := + let~ _ := M.write (| res, - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.shr (| - M.read (| res |), - Value.Integer 1 - |), - M.read (| one |) - |) + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.shr (M.read (| res |)) (Value.Integer 1)) + (M.read (| one |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := res in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -51450,7 +51187,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -51461,29 +51198,27 @@ Module num. ] |))) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (Value.Integer 0) (M.read (| res |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 2 - |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 2))) ] |) |) in @@ -51507,7 +51242,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -51524,7 +51259,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -51541,7 +51276,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -51565,14 +51300,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51587,9 +51318,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.U128, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.U128 (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -51615,7 +51344,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| rhs |) |) |), + M.alloc (| BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| rhs |)) |), [ fun γ => ltac:(M.monadic @@ -51625,11 +51354,10 @@ Module num. ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.U128, - M.read (| self |), - BinOp.Panic.sub (| Integer.U128, M.read (| rhs |), M.read (| r |) |) - |) + BinOp.Wrap.add + Integer.U128 + (M.read (| self |)) + (BinOp.Wrap.sub Integer.U128 (M.read (| rhs |)) (M.read (| r |))) |))) ] |) @@ -51679,7 +51407,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -51704,7 +51433,7 @@ Module num. M.get_associated_function (| Ty.path "u128", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.U128, M.read (| rhs |), M.read (| r |) |) + BinOp.Wrap.sub Integer.U128 (M.read (| rhs |)) (M.read (| r |)) ] |) |))) @@ -51761,7 +51490,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51778,11 +51507,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let p := - M.alloc (| - BinOp.Panic.sub (| Integer.U128, M.read (| self |), Value.Integer 1 |) - |) in - let z := + let~ p := + M.alloc (| BinOp.Wrap.sub Integer.U128 (M.read (| self |)) (Value.Integer 1) |) in + let~ z := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "u128" ] |), @@ -51790,10 +51517,9 @@ Module num. |) |) in M.alloc (| - BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| z |) - |) + BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| z |)) |) |))) |))) @@ -51813,14 +51539,13 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U128, - M.call_closure (| + BinOp.Wrap.add + Integer.U128 + (M.call_closure (| M.get_associated_function (| Ty.path "u128", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -52064,14 +51789,12 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.shr (| - BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| rhs |)), - Value.Integer 1 - |), - BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |)) - |))) + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.shr + (BinOp.Pure.bit_xor (M.read (| self |)) (M.read (| rhs |))) + (Value.Integer 1)) + (BinOp.Pure.bit_and (M.read (| self |)) (M.read (| rhs |))))) | _, _ => M.impossible end. @@ -52962,7 +52685,7 @@ Module num. (let self := M.alloc (| self |) in let base := M.alloc (| base |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -53206,9 +52929,9 @@ Module num. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let n := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| self |) in - let _ := + (let~ n := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -53226,52 +52949,49 @@ Module num. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.div (| - Integer.U32, - M.call_closure (| + BinOp.Wrap.div + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "ilog2", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.add (| - Integer.U32, - M.call_closure (| + |)) + (BinOp.Wrap.add + Integer.U32 + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "ilog2", [] |), [ M.read (| base |) ] - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| b |) |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| b |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "pow", [] |), [ M.read (| base |); M.read (| M.use b |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -53289,25 +53009,20 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.div (| - Integer.Usize, - M.read (| β |), - M.read (| base |) - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| β |)) + (M.read (| base |)) |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -53315,7 +53030,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -53597,7 +53312,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -53612,7 +53327,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -53715,7 +53430,7 @@ Module num. [ M.read (| self |); M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -53730,7 +53445,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -53789,7 +53504,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -53812,9 +53527,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -53832,7 +53547,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -53852,7 +53567,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.read (| @@ -53880,7 +53595,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -53899,13 +53619,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.read (| @@ -53933,7 +53653,12 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -53954,7 +53679,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -54129,7 +53854,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -54194,7 +53922,10 @@ Module num. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::num::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::num::MAX" |))) ] |) |))) @@ -54296,7 +54027,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -54313,7 +54044,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -54331,7 +54062,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -54348,7 +54079,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -54395,11 +54126,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -54428,11 +54158,10 @@ Module num. M.read (| self |); BinOp.Pure.bit_and (M.read (| rhs |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 1)) ] |))) | _, _ => M.impossible @@ -54472,7 +54201,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -54489,9 +54218,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -54509,7 +54238,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -54529,7 +54258,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, M.call_closure (| @@ -54545,13 +54274,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, M.call_closure (| @@ -54569,7 +54298,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -54908,20 +54637,12 @@ Module num. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| other |), - M.read (| self |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| other |)) (M.read (| self |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| self |), - M.read (| other |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| self |)) (M.read (| other |)) |))) ] |))) @@ -54982,9 +54703,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -55004,9 +54723,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -55026,9 +54743,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -55048,9 +54763,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in Value.Tuple - [ - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |); - Value.Bool false + [ BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| rhs |)); Value.Bool false ])) | _, _ => M.impossible end. @@ -55174,7 +54887,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55195,11 +54908,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let overflown := M.alloc (| Value.Bool false |) in - let r := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ overflown := M.alloc (| Value.Bool false |) in + let~ r := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -55217,7 +54930,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55237,7 +54950,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -55249,12 +54962,12 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| acc, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -55266,13 +54979,13 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -55284,12 +54997,12 @@ Module num. [ M.read (| base |); M.read (| base |) ] |) |) in - let _ := + let~ _ := M.write (| base, M.read (| M.SubPointer.get_tuple_field (| r, 0 |) |) |) in - let _ := + let~ _ := let β := overflown in M.write (| β, @@ -55303,7 +55016,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -55314,7 +55027,7 @@ Module num. ] |))) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -55322,7 +55035,7 @@ Module num. [ M.read (| acc |); M.read (| base |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_tuple_field (| r, 1 |) in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) (M.read (| overflown |)) |) in r @@ -55366,7 +55079,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55383,9 +55096,9 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let base := M.copy (| self |) in - let acc := M.alloc (| Value.Integer 1 |) in - let _ := + let~ base := M.copy (| self |) in + let~ acc := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -55403,7 +55116,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55423,33 +55136,31 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| acc, - BinOp.Panic.mul (| - Integer.Usize, - M.read (| acc |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| acc |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := exp in M.write (| β, - BinOp.Panic.div (| Integer.U32, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.div Integer.U32 (M.read (| β |)) (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| base, - BinOp.Panic.mul (| - Integer.Usize, - M.read (| base |), - M.read (| base |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| base |)) + (M.read (| base |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -55457,7 +55168,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -55468,9 +55179,7 @@ Module num. ] |))) |) in - M.alloc (| - BinOp.Panic.mul (| Integer.Usize, M.read (| acc |), M.read (| base |) |) - |) + M.alloc (| BinOp.Wrap.mul Integer.Usize (M.read (| acc |)) (M.read (| base |)) |) |))) |))) | _, _ => M.impossible @@ -55521,7 +55230,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55538,21 +55247,20 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op := M.copy (| self |) in - let res := M.alloc (| Value.Integer 0 |) in - let one := + let~ op := M.copy (| self |) in + let~ res := M.alloc (| Value.Integer 0 |) in + let~ one := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Pure.bit_and + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Pure.bit_and (M.call_closure (| M.get_associated_function (| Ty.path "usize", "ilog2", [] |), [ M.read (| self |) ] |)) - (UnOp.Pure.not (Value.Integer 1)) - |) + (UnOp.Pure.not (Value.Integer 1))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -55570,7 +55278,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55581,60 +55289,53 @@ Module num. (M.alloc (| BinOp.Pure.ge (M.read (| op |)) - (BinOp.Panic.add (| - Integer.Usize, - M.read (| res |), - M.read (| one |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| res |)) + (M.read (| one |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := op in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| res |), - M.read (| one |) - |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| res |)) + (M.read (| one |))) |) in - let _ := + let~ _ := M.write (| res, - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.shr (| - M.read (| res |), - Value.Integer 1 - |), - M.read (| one |) - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.shr (M.read (| res |)) (Value.Integer 1)) + (M.read (| one |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := res in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := one in M.write (| β, - BinOp.Panic.shr (| M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.shr (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -55642,7 +55343,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -55653,29 +55354,27 @@ Module num. ] |))) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (Value.Integer 0) (M.read (| res |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (M.read (| res |)) - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - Value.Integer 2 - |) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (Value.Integer 2))) ] |) |) in @@ -55699,7 +55398,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -55716,7 +55415,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -55733,7 +55432,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| rhs |)))) | _, _ => M.impossible end. @@ -55757,14 +55456,10 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let d := - M.alloc (| - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| rhs |) |) - |) in - let r := - M.alloc (| - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |) - |) in + let~ d := + M.alloc (| BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| rhs |)) |) in + let~ r := + M.alloc (| BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| rhs |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55779,9 +55474,7 @@ Module num. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| d |), Value.Integer 1 |) - |))); + M.alloc (| BinOp.Wrap.add Integer.Usize (M.read (| d |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic d) ] |) @@ -55807,9 +55500,7 @@ Module num. let rhs := M.alloc (| rhs |) in M.read (| M.match_operator (| - M.alloc (| - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| rhs |) |) - |), + M.alloc (| BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| rhs |)) |), [ fun γ => ltac:(M.monadic @@ -55819,11 +55510,10 @@ Module num. ltac:(M.monadic (let r := M.copy (| γ |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| self |), - BinOp.Panic.sub (| Integer.Usize, M.read (| rhs |), M.read (| r |) |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| self |)) + (BinOp.Wrap.sub Integer.Usize (M.read (| rhs |)) (M.read (| r |))) |))) ] |) @@ -55873,7 +55563,8 @@ Module num. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -55898,7 +55589,7 @@ Module num. M.get_associated_function (| Ty.path "usize", "checked_add", [] |), [ M.read (| self |); - BinOp.Panic.sub (| Integer.Usize, M.read (| rhs |), M.read (| r |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| rhs |)) (M.read (| r |)) ] |) |))) @@ -55955,7 +55646,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55972,11 +55663,11 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let p := + let~ p := M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| self |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| self |)) (Value.Integer 1) |) in - let z := + let~ z := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::ctlz_nonzero", [ Ty.path "usize" ] |), @@ -55984,10 +55675,9 @@ Module num. |) |) in M.alloc (| - BinOp.Panic.shr (| - M.read (| M.get_constant (| "core::num::MAX" |) |), - M.read (| z |) - |) + BinOp.Wrap.shr + (M.read (| M.get_constant (| "core::num::MAX" |) |)) + (M.read (| z |)) |) |))) |))) @@ -56007,18 +55697,17 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "one_less_than_next_power_of_two", [] |), [ M.read (| self |) ] - |), - Value.Integer 1 - |))) + |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -56265,7 +55954,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_mul", [] |), @@ -56276,7 +55965,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 64 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 64)) ] |) |))) @@ -56304,7 +55993,7 @@ Module num. let rhs := M.alloc (| rhs |) in let carry := M.alloc (| carry |) in M.read (| - let wide := + let~ wide := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u128", "unchecked_add", [] |), @@ -56321,7 +56010,7 @@ Module num. Value.Tuple [ M.rust_cast (M.read (| wide |)); - M.rust_cast (BinOp.Panic.shr (| M.read (| wide |), Value.Integer 64 |)) + M.rust_cast (BinOp.Wrap.shr (M.read (| wide |)) (Value.Integer 64)) ] |) |))) @@ -56342,15 +56031,13 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.rust_cast - (BinOp.Panic.div (| - Integer.U128, - BinOp.Panic.add (| - Integer.U128, - M.rust_cast (M.read (| self |)), - M.rust_cast (M.read (| rhs |)) - |), - Value.Integer 2 - |)))) + (BinOp.Wrap.div + Integer.U128 + (BinOp.Wrap.add + Integer.U128 + (M.rust_cast (M.read (| self |))) + (M.rust_cast (M.read (| rhs |)))) + (Value.Integer 2)))) | _, _ => M.impossible end. @@ -56392,9 +56079,9 @@ Module num. ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let r := M.alloc (| Value.Integer 0 |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ r := M.alloc (| Value.Integer 0 |) in + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -56414,7 +56101,7 @@ Module num. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, BinOp.Pure.bit_or @@ -56428,11 +56115,11 @@ Module num. |)) (M.rust_cast (M.read (| x |))) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 2 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -56440,7 +56127,7 @@ Module num. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -56547,7 +56234,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -56557,7 +56244,7 @@ Module num. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -56634,22 +56321,27 @@ Module num. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Nan" |) in M.alloc (| M.read (| Value.String "Nan" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Infinite" |) in M.alloc (| M.read (| Value.String "Infinite" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Zero" |) in M.alloc (| M.read (| Value.String "Zero" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Subnormal" |) in M.alloc (| M.read (| Value.String "Subnormal" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::num::FpCategory::Normal" |) in M.alloc (| M.read (| Value.String "Normal" |) |))) ] |) @@ -58122,15 +57814,13 @@ Module num. |), [ M.read (| digits |) ] |)) - (BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |), - Value.Integer 2 - |), - M.rust_cast (M.read (| is_signed_ty |)) - |)))) + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |)) + (Value.Integer 2)) + (M.rust_cast (M.read (| is_signed_ty |)))))) |))) | _, _ => M.impossible end. @@ -58233,7 +57923,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -58317,7 +58007,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -58356,7 +58046,7 @@ Module num. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_signed_ty := + let~ is_signed_ty := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", T, [ T ], "gt", [] |), @@ -58377,7 +58067,7 @@ Module num. ] |) |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes", [] |), @@ -58550,7 +58240,7 @@ Module num. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let is_positive := M.copy (| γ0_0 |) in let digits := M.copy (| γ0_1 |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -58563,7 +58253,7 @@ Module num. [ Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -58586,7 +58276,7 @@ Module num. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -58621,7 +58311,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -58641,7 +58331,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -58656,7 +58351,7 @@ Module num. |) in let γ0_0 := M.read (| γ0_0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| result, M.call_closure (| @@ -58682,7 +58377,7 @@ Module num. ] |) |) in - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -58810,7 +58505,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| result, M.call_closure (| @@ -58868,7 +58563,274 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::iterator::Iterator", + Ty.apply + (Ty.path + "core::slice::iter::Iter") + [ Ty.path "u8" ], + [], + "next", + [] + |), + [ iter ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| + M.never_to_any (| + M.read (| M.break (||) |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::option::Option::Some", + 0 + |) in + let γ0_0 := M.read (| γ0_0 |) in + let c := M.copy (| γ0_0 |) in + let~ _ := + M.write (| + result, + M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Mul", + T, + [ T ], + "mul", + [] + |), + [ + M.read (| result |); + M.call_closure (| + M.get_trait_method (| + "core::num::FromStrRadixHelper", + T, + [], + "from_u32", + [] + |), + [ M.read (| radix |) ] + |) + ] + |) + |) in + let~ x := + M.copy (| + M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::Try", + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path "u32"; + Ty.path + "core::num::error::ParseIntError" + ], + [], + "branch", + [] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.apply + (Ty.path + "core::option::Option") + [ Ty.path "u32" + ], + "ok_or", + [ + Ty.path + "core::num::error::ParseIntError" + ] + |), + [ + M.call_closure (| + M.get_associated_function (| + Ty.path + "char", + "to_digit", + [] + |), + [ + M.rust_cast + (M.read (| + c + |)); + M.read (| + radix + |) + ] + |); + Value.StructRecord + "core::num::error::ParseIntError" + [ + ("kind", + Value.StructTuple + "core::num::error::IntErrorKind::InvalidDigit" + []) + ] + ] + |) + ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::ops::control_flow::ControlFlow::Break", + 0 + |) in + let residual := + M.copy (| γ0_0 |) in + M.alloc (| + M.never_to_any (| + M.read (| + M.return_ (| + M.call_closure (| + M.get_trait_method (| + "core::ops::try_trait::FromResidual", + Ty.apply + (Ty.path + "core::result::Result") + [ + T; + Ty.path + "core::num::error::ParseIntError" + ], + [ + Ty.apply + (Ty.path + "core::result::Result") + [ + Ty.path + "core::convert::Infallible"; + Ty.path + "core::num::error::ParseIntError" + ] + ], + "from_residual", + [] + |), + [ + M.read (| + residual + |) + ] + |) + |) + |) + |) + |))); + fun γ => + ltac:(M.monadic + (let γ0_0 := + M.SubPointer.get_struct_tuple_field (| + γ, + "core::ops::control_flow::ControlFlow::Continue", + 0 + |) in + let val := + M.copy (| γ0_0 |) in + val)) + ] + |) + |) in + let~ _ := + M.write (| + result, + M.call_closure (| + M.get_trait_method (| + "core::ops::arith::Sub", + T, + [ T ], + "sub", + [] + |), + [ + M.read (| result |); + M.call_closure (| + M.get_trait_method (| + "core::num::FromStrRadixHelper", + T, + [], + "from_u32", + [] + |), + [ M.read (| x |) ] + |) + ] + |) + |) in + M.alloc (| Value.Tuple [] |))) + ] + |) in + M.alloc (| Value.Tuple [] |))) + |))) + ] + |)))) + ] + |) in + M.alloc (| Value.Tuple [] |))); + fun γ => + ltac:(M.monadic + (let~ _ := + M.match_operator (| + M.alloc (| Value.Tuple [] |), + [ + fun γ => + ltac:(M.monadic + (let γ := M.use is_positive in + let _ := + M.is_constant_or_break_match (| + M.read (| γ |), + Value.Bool true + |) in + M.use + (M.match_operator (| + M.alloc (| + M.call_closure (| + M.get_trait_method (| + "core::iter::traits::collect::IntoIterator", + Ty.apply + (Ty.path "&") + [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] + ], + [], + "into_iter", + [] + |), + [ M.read (| digits |) ] + |) + |), + [ + fun γ => + ltac:(M.monadic + (let iter := M.copy (| γ |) in + M.loop (| + ltac:(M.monadic + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -58888,269 +58850,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| - M.never_to_any (| - M.read (| M.break (||) |) - |) - |))); - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_struct_tuple_field (| + (let _ := + M.is_struct_tuple (| γ, - "core::option::Option::Some", - 0 + "core::option::Option::None" |) in - let γ0_0 := M.read (| γ0_0 |) in - let c := M.copy (| γ0_0 |) in - let _ := - M.write (| - result, - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Mul", - T, - [ T ], - "mul", - [] - |), - [ - M.read (| result |); - M.call_closure (| - M.get_trait_method (| - "core::num::FromStrRadixHelper", - T, - [], - "from_u32", - [] - |), - [ M.read (| radix |) ] - |) - ] - |) - |) in - let x := - M.copy (| - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::Try", - Ty.apply - (Ty.path - "core::result::Result") - [ - Ty.path "u32"; - Ty.path - "core::num::error::ParseIntError" - ], - [], - "branch", - [] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.apply - (Ty.path - "core::option::Option") - [ Ty.path "u32" - ], - "ok_or", - [ - Ty.path - "core::num::error::ParseIntError" - ] - |), - [ - M.call_closure (| - M.get_associated_function (| - Ty.path - "char", - "to_digit", - [] - |), - [ - M.rust_cast - (M.read (| - c - |)); - M.read (| - radix - |) - ] - |); - Value.StructRecord - "core::num::error::ParseIntError" - [ - ("kind", - Value.StructTuple - "core::num::error::IntErrorKind::InvalidDigit" - []) - ] - ] - |) - ] - |) - |), - [ - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_struct_tuple_field (| - γ, - "core::ops::control_flow::ControlFlow::Break", - 0 - |) in - let residual := - M.copy (| γ0_0 |) in - M.alloc (| - M.never_to_any (| - M.read (| - M.return_ (| - M.call_closure (| - M.get_trait_method (| - "core::ops::try_trait::FromResidual", - Ty.apply - (Ty.path - "core::result::Result") - [ - T; - Ty.path - "core::num::error::ParseIntError" - ], - [ - Ty.apply - (Ty.path - "core::result::Result") - [ - Ty.path - "core::convert::Infallible"; - Ty.path - "core::num::error::ParseIntError" - ] - ], - "from_residual", - [] - |), - [ - M.read (| - residual - |) - ] - |) - |) - |) - |) - |))); - fun γ => - ltac:(M.monadic - (let γ0_0 := - M.SubPointer.get_struct_tuple_field (| - γ, - "core::ops::control_flow::ControlFlow::Continue", - 0 - |) in - let val := - M.copy (| γ0_0 |) in - val)) - ] - |) - |) in - let _ := - M.write (| - result, - M.call_closure (| - M.get_trait_method (| - "core::ops::arith::Sub", - T, - [ T ], - "sub", - [] - |), - [ - M.read (| result |); - M.call_closure (| - M.get_trait_method (| - "core::num::FromStrRadixHelper", - T, - [], - "from_u32", - [] - |), - [ M.read (| x |) ] - |) - ] - |) - |) in - M.alloc (| Value.Tuple [] |))) - ] - |) in - M.alloc (| Value.Tuple [] |))) - |))) - ] - |)))) - ] - |) in - M.alloc (| Value.Tuple [] |))); - fun γ => - ltac:(M.monadic - (let _ := - M.match_operator (| - M.alloc (| Value.Tuple [] |), - [ - fun γ => - ltac:(M.monadic - (let γ := M.use is_positive in - let _ := - M.is_constant_or_break_match (| - M.read (| γ |), - Value.Bool true - |) in - M.use - (M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::collect::IntoIterator", - Ty.apply - (Ty.path "&") - [ Ty.apply (Ty.path "slice") [ Ty.path "u8" ] - ], - [], - "into_iter", - [] - |), - [ M.read (| digits |) ] - |) - |), - [ - fun γ => - ltac:(M.monadic - (let iter := M.copy (| γ |) in - M.loop (| - ltac:(M.monadic - (let _ := - M.match_operator (| - M.alloc (| - M.call_closure (| - M.get_trait_method (| - "core::iter::traits::iterator::Iterator", - Ty.apply - (Ty.path - "core::slice::iter::Iter") - [ Ty.path "u8" ], - [], - "next", - [] - |), - [ iter ] - |) - |), - [ - fun γ => - ltac:(M.monadic - (M.alloc (| + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -59165,7 +58870,7 @@ Module num. |) in let γ0_0 := M.read (| γ0_0 |) in let c := M.copy (| γ0_0 |) in - let mul := + let~ mul := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59179,7 +58884,7 @@ Module num. ] |) |) in - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -59307,7 +59012,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| result, M.read (| @@ -59454,7 +59159,7 @@ Module num. |) |) |) in - let _ := + let~ _ := M.write (| result, M.read (| @@ -59645,7 +59350,7 @@ Module num. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -59665,7 +59370,12 @@ Module num. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -59680,7 +59390,7 @@ Module num. |) in let γ0_0 := M.read (| γ0_0 |) in let c := M.copy (| γ0_0 |) in - let mul := + let~ mul := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -59694,7 +59404,7 @@ Module num. ] |) |) in - let x := + let~ x := M.copy (| M.match_operator (| M.alloc (| @@ -59822,7 +59532,7 @@ Module num. ] |) |) in - let _ := + let~ _ := M.write (| result, M.read (| @@ -59969,7 +59679,7 @@ Module num. |) |) |) in - let _ := + let~ _ := M.write (| result, M.read (| diff --git a/CoqOfRust/core/num/nonzero.v b/CoqOfRust/core/num/nonzero.v index a5f189bde..00bf1e10b 100644 --- a/CoqOfRust/core/num/nonzero.v +++ b/CoqOfRust/core/num/nonzero.v @@ -263,7 +263,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -703,22 +703,20 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |), - Value.Integer 1 - |), - M.call_closure (| + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |)) + (Value.Integer 1)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU8", "leading_zeros", [] |), [ M.read (| self |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -1408,7 +1406,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1450,7 +1448,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1983,7 +1981,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2423,22 +2421,20 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |), - Value.Integer 1 - |), - M.call_closure (| + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |)) + (Value.Integer 1)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU16", "leading_zeros", [] |), [ M.read (| self |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -3132,7 +3128,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3174,7 +3170,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3707,7 +3703,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4155,22 +4151,20 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |), - Value.Integer 1 - |), - M.call_closure (| + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |)) + (Value.Integer 1)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU32", "leading_zeros", [] |), [ M.read (| self |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -4864,7 +4858,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4906,7 +4900,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5439,7 +5433,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5879,22 +5873,20 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |), - Value.Integer 1 - |), - M.call_closure (| + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |)) + (Value.Integer 1)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU64", "leading_zeros", [] |), [ M.read (| self |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -6588,7 +6580,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6630,7 +6622,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7163,7 +7155,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7603,22 +7595,20 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |), - Value.Integer 1 - |), - M.call_closure (| + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |)) + (Value.Integer 1)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroU128", "leading_zeros", [] |), [ M.read (| self |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -8316,7 +8306,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8358,7 +8348,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8891,7 +8881,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9332,22 +9322,20 @@ Module num. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |), - Value.Integer 1 - |), - M.call_closure (| + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::nonzero::BITS" |) |)) + (Value.Integer 1)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "leading_zeros", [] |), [ M.read (| self |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -10045,7 +10033,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10087,7 +10075,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10620,7 +10608,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11169,7 +11157,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11304,7 +11292,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11356,7 +11344,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i8", "wrapping_neg", [] |), @@ -11965,7 +11953,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12007,7 +11995,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12540,7 +12528,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13089,7 +13077,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13224,7 +13212,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13276,7 +13264,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i16", "wrapping_neg", [] |), @@ -13885,7 +13873,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13927,7 +13915,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14460,7 +14448,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15017,7 +15005,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15152,7 +15140,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15204,7 +15192,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i32", "wrapping_neg", [] |), @@ -15813,7 +15801,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15855,7 +15843,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16388,7 +16376,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16937,7 +16925,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17072,7 +17060,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17124,7 +17112,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i64", "wrapping_neg", [] |), @@ -17733,7 +17721,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -17775,7 +17763,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -18308,7 +18296,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18857,7 +18845,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18992,7 +18980,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -19044,7 +19032,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "i128", "wrapping_neg", [] |), @@ -19657,7 +19645,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -19699,7 +19687,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -20232,7 +20220,7 @@ Module num. ltac:(M.monadic (let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -20782,7 +20770,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -20921,7 +20909,7 @@ Module num. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -20973,7 +20961,7 @@ Module num. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_neg", [] |), @@ -21586,7 +21574,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -21628,7 +21616,7 @@ Module num. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| diff --git a/CoqOfRust/core/num/saturating.v b/CoqOfRust/core/num/saturating.v index 5ea73b9b6..4b988c474 100644 --- a/CoqOfRust/core/num/saturating.v +++ b/CoqOfRust/core/num/saturating.v @@ -602,7 +602,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -646,7 +646,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -747,7 +747,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -791,7 +791,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -892,7 +892,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -936,7 +936,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1037,7 +1037,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1081,7 +1081,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1188,7 +1188,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1232,7 +1232,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1371,7 +1371,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1415,7 +1415,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1512,7 +1512,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1556,7 +1556,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1653,7 +1653,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1697,7 +1697,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1798,7 +1798,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1841,7 +1841,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1941,7 +1941,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1984,7 +1984,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2084,7 +2084,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2127,7 +2127,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2227,7 +2227,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2270,7 +2270,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2376,7 +2376,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2419,7 +2419,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2557,7 +2557,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2600,7 +2600,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2696,7 +2696,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2739,7 +2739,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2835,7 +2835,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2878,7 +2878,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2978,7 +2978,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3021,7 +3021,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3121,7 +3121,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3164,7 +3164,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3264,7 +3264,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3307,7 +3307,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3407,7 +3407,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3450,7 +3450,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3556,7 +3556,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3599,7 +3599,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3737,7 +3737,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3780,7 +3780,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3876,7 +3876,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3919,7 +3919,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4015,7 +4015,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4058,7 +4058,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4158,7 +4158,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4201,7 +4201,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4301,7 +4301,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4344,7 +4344,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4444,7 +4444,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4487,7 +4487,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4587,7 +4587,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4630,7 +4630,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4736,7 +4736,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4779,7 +4779,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4917,7 +4917,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4960,7 +4960,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5056,7 +5056,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5099,7 +5099,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5195,7 +5195,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5238,7 +5238,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5338,7 +5338,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5381,7 +5381,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5481,7 +5481,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5524,7 +5524,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5624,7 +5624,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5667,7 +5667,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5767,7 +5767,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5810,7 +5810,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5916,7 +5916,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5959,7 +5959,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6097,7 +6097,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6140,7 +6140,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6236,7 +6236,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6279,7 +6279,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6375,7 +6375,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6418,7 +6418,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6518,7 +6518,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6561,7 +6561,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6661,7 +6661,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6704,7 +6704,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6804,7 +6804,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6847,7 +6847,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6947,7 +6947,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6990,7 +6990,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7096,7 +7096,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7139,7 +7139,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7277,7 +7277,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7320,7 +7320,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7416,7 +7416,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7459,7 +7459,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7555,7 +7555,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7598,7 +7598,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7698,7 +7698,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7742,7 +7742,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7843,7 +7843,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7887,7 +7887,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7988,7 +7988,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8032,7 +8032,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8133,7 +8133,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8177,7 +8177,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8284,7 +8284,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8328,7 +8328,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8467,7 +8467,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8511,7 +8511,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8608,7 +8608,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8652,7 +8652,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8749,7 +8749,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8793,7 +8793,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8894,7 +8894,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8937,7 +8937,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9037,7 +9037,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9080,7 +9080,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9180,7 +9180,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9223,7 +9223,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9323,7 +9323,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9366,7 +9366,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9472,7 +9472,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9515,7 +9515,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9653,7 +9653,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9696,7 +9696,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9792,7 +9792,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9835,7 +9835,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9931,7 +9931,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9974,7 +9974,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10074,7 +10074,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10117,7 +10117,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10217,7 +10217,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10260,7 +10260,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10360,7 +10360,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10403,7 +10403,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10503,7 +10503,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10546,7 +10546,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10652,7 +10652,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10695,7 +10695,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10833,7 +10833,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10876,7 +10876,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10972,7 +10972,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11015,7 +11015,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11111,7 +11111,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11154,7 +11154,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11254,7 +11254,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11297,7 +11297,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11397,7 +11397,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11440,7 +11440,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11540,7 +11540,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11583,7 +11583,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11683,7 +11683,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11726,7 +11726,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11832,7 +11832,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11875,7 +11875,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12013,7 +12013,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12056,7 +12056,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12152,7 +12152,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12195,7 +12195,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12291,7 +12291,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12334,7 +12334,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12434,7 +12434,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12477,7 +12477,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12577,7 +12577,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12620,7 +12620,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12720,7 +12720,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12763,7 +12763,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12863,7 +12863,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12906,7 +12906,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13012,7 +13012,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13055,7 +13055,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13193,7 +13193,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13236,7 +13236,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13332,7 +13332,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13375,7 +13375,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13471,7 +13471,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13514,7 +13514,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13614,7 +13614,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13657,7 +13657,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13757,7 +13757,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13800,7 +13800,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13900,7 +13900,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13943,7 +13943,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14043,7 +14043,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14086,7 +14086,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14192,7 +14192,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14235,7 +14235,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14373,7 +14373,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14416,7 +14416,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14512,7 +14512,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14555,7 +14555,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14651,7 +14651,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14694,7 +14694,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| diff --git a/CoqOfRust/core/num/simulations/mod.v b/CoqOfRust/core/num/simulations/mod.v index 8f645c7a7..be7f96eed 100644 --- a/CoqOfRust/core/num/simulations/mod.v +++ b/CoqOfRust/core/num/simulations/mod.v @@ -9,14 +9,17 @@ Import Run. Module Impl_u64. Definition run_overflowing_sub (self rhs : Z) : - Run.pure (num.Impl_u64.overflowing_sub [] [φ self; φ rhs]) - (fun (v : (Z * bool)) => inl (φ v)). + {{ _, _ | + num.Impl_u64.overflowing_sub [] [φ self; φ rhs] ⇓ + fun (v : (Z * bool)) => inl (φ v) + | _ }}. Proof. - unfold Run.pure; intros. + intros. run_symbolic. eapply Run.CallPrimitiveGetFunction. { apply core.intrinsics.intrinsics.Function_sub_with_overflow. } + run_symbolic. eapply Run.CallClosure. { apply core.simulations.intrinsics.run_sub_with_overflow_u64_u64. } diff --git a/CoqOfRust/core/num/wrapping.v b/CoqOfRust/core/num/wrapping.v index 63c961486..bc3062f9a 100644 --- a/CoqOfRust/core/num/wrapping.v +++ b/CoqOfRust/core/num/wrapping.v @@ -582,7 +582,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -675,7 +675,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -772,7 +772,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -869,7 +869,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -966,7 +966,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1063,7 +1063,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1160,7 +1160,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1257,7 +1257,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1354,7 +1354,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1451,7 +1451,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1548,7 +1548,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1645,7 +1645,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1738,7 +1738,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1831,7 +1831,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1928,7 +1928,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2025,7 +2025,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2122,7 +2122,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2219,7 +2219,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2316,7 +2316,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2413,7 +2413,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2510,7 +2510,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2607,7 +2607,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2704,7 +2704,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2801,7 +2801,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2898,7 +2898,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -2941,7 +2941,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3041,7 +3041,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3084,7 +3084,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3184,7 +3184,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3227,7 +3227,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3327,7 +3327,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3370,7 +3370,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3470,7 +3470,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3513,7 +3513,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3651,7 +3651,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3694,7 +3694,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3790,7 +3790,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3833,7 +3833,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3929,7 +3929,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -3972,7 +3972,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4113,7 +4113,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4155,7 +4155,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4253,7 +4253,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4295,7 +4295,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4393,7 +4393,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4435,7 +4435,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4533,7 +4533,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4575,7 +4575,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4673,7 +4673,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4715,7 +4715,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4850,7 +4850,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4892,7 +4892,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4986,7 +4986,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5028,7 +5028,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5122,7 +5122,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5164,7 +5164,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5306,7 +5306,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5349,7 +5349,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5449,7 +5449,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5492,7 +5492,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5592,7 +5592,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5635,7 +5635,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5735,7 +5735,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5778,7 +5778,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5878,7 +5878,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -5921,7 +5921,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6059,7 +6059,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6102,7 +6102,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6198,7 +6198,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6241,7 +6241,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6337,7 +6337,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6380,7 +6380,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6523,7 +6523,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6566,7 +6566,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6666,7 +6666,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6709,7 +6709,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6809,7 +6809,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6852,7 +6852,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6952,7 +6952,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -6995,7 +6995,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7095,7 +7095,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7138,7 +7138,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7276,7 +7276,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7319,7 +7319,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7415,7 +7415,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7458,7 +7458,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7554,7 +7554,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7597,7 +7597,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7740,7 +7740,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7783,7 +7783,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7883,7 +7883,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -7926,7 +7926,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8026,7 +8026,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8069,7 +8069,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8169,7 +8169,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8212,7 +8212,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8312,7 +8312,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8355,7 +8355,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8493,7 +8493,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8536,7 +8536,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8632,7 +8632,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8675,7 +8675,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8771,7 +8771,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8814,7 +8814,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -8957,7 +8957,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9000,7 +9000,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9100,7 +9100,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9143,7 +9143,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9243,7 +9243,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9286,7 +9286,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9386,7 +9386,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9429,7 +9429,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9529,7 +9529,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9572,7 +9572,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9710,7 +9710,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9753,7 +9753,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9849,7 +9849,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9892,7 +9892,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -9988,7 +9988,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10031,7 +10031,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10174,7 +10174,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10217,7 +10217,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10317,7 +10317,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10360,7 +10360,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10460,7 +10460,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10503,7 +10503,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10603,7 +10603,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10646,7 +10646,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10746,7 +10746,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10789,7 +10789,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10927,7 +10927,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -10970,7 +10970,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11066,7 +11066,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11109,7 +11109,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11205,7 +11205,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11248,7 +11248,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11389,7 +11389,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11431,7 +11431,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11529,7 +11529,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11571,7 +11571,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11669,7 +11669,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11711,7 +11711,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11809,7 +11809,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11851,7 +11851,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11949,7 +11949,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -11991,7 +11991,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12126,7 +12126,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12168,7 +12168,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12262,7 +12262,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12304,7 +12304,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12398,7 +12398,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12440,7 +12440,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12582,7 +12582,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12625,7 +12625,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12725,7 +12725,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12768,7 +12768,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12868,7 +12868,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -12911,7 +12911,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13011,7 +13011,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13054,7 +13054,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13154,7 +13154,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13197,7 +13197,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13335,7 +13335,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13378,7 +13378,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13474,7 +13474,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13517,7 +13517,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13613,7 +13613,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13656,7 +13656,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13799,7 +13799,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13842,7 +13842,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13942,7 +13942,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -13985,7 +13985,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14085,7 +14085,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14128,7 +14128,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14228,7 +14228,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14271,7 +14271,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14371,7 +14371,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14414,7 +14414,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14552,7 +14552,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14595,7 +14595,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14691,7 +14691,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14734,7 +14734,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14830,7 +14830,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -14873,7 +14873,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15016,7 +15016,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15059,7 +15059,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15159,7 +15159,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15202,7 +15202,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15302,7 +15302,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15345,7 +15345,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15445,7 +15445,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15488,7 +15488,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15588,7 +15588,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15631,7 +15631,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15769,7 +15769,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15812,7 +15812,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15908,7 +15908,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -15951,7 +15951,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16047,7 +16047,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16090,7 +16090,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16233,7 +16233,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16276,7 +16276,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16376,7 +16376,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16419,7 +16419,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16519,7 +16519,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16562,7 +16562,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16662,7 +16662,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16705,7 +16705,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16805,7 +16805,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16848,7 +16848,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -16986,7 +16986,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -17029,7 +17029,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -17125,7 +17125,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -17168,7 +17168,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -17264,7 +17264,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -17307,7 +17307,7 @@ Module num. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -23403,55 +23403,50 @@ Module num. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 3 |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 3)) + (Value.Integer 1) |))). Definition i16 : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 4 |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 4)) + (Value.Integer 1) |))). Definition i32 : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 5 |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 5)) + (Value.Integer 1) |))). Definition i64 : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 6 |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 6)) + (Value.Integer 1) |))). Definition i128 : Value.t := M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 7 |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 7)) + (Value.Integer 1) |))). Definition u8 : Value.t := diff --git a/CoqOfRust/core/ops/arith.v b/CoqOfRust/core/ops/arith.v index 4fc125efb..879e40809 100644 --- a/CoqOfRust/core/ops/arith.v +++ b/CoqOfRust/core/ops/arith.v @@ -19,7 +19,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -45,7 +45,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.U8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.U8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -71,7 +71,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.U16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.U16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -97,7 +97,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.U32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.U32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -123,7 +123,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.U64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.U64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -149,7 +149,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.U128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.U128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -175,7 +175,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.Isize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.Isize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -201,7 +201,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.I8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.I8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -227,7 +227,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.I16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.I16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -253,7 +253,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.I32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.I32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -279,7 +279,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.I64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.I64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -305,7 +305,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.I128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.I128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -331,7 +331,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -357,7 +357,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.add (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.add Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -386,7 +386,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -412,7 +412,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.U8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.U8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -438,7 +438,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.U16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.U16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -464,7 +464,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.U32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.U32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -490,7 +490,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.U64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.U64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -516,7 +516,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.U128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.U128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -542,7 +542,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.Isize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.Isize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -568,7 +568,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.I8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.I8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -594,7 +594,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.I16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.I16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -620,7 +620,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.I32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.I32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -646,7 +646,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.I64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.I64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -672,7 +672,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.I128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.I128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -698,7 +698,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -724,7 +724,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.sub (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.sub Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -753,7 +753,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -779,7 +779,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.U8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.U8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -805,7 +805,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.U16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.U16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -831,7 +831,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.U32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.U32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -857,7 +857,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.U64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.U64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -883,7 +883,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.U128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.U128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -909,7 +909,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.Isize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.Isize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -935,7 +935,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.I8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.I8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -961,7 +961,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.I16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.I16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -987,7 +987,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.I32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.I32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1013,7 +1013,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.I64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.I64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1039,7 +1039,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.I128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.I128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1065,7 +1065,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1091,7 +1091,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.mul (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.mul Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1120,7 +1120,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1146,7 +1146,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.U8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.U8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1172,7 +1172,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.U16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.U16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1198,7 +1198,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.U32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.U32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1224,7 +1224,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.U64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.U64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1250,7 +1250,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.U128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.U128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1276,7 +1276,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.Isize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.Isize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1302,7 +1302,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.I8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.I8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1328,7 +1328,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.I16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.I16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1354,7 +1354,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.I32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.I32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1380,7 +1380,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.I64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.I64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1406,7 +1406,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.I128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.I128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1432,7 +1432,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1458,7 +1458,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.div (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.div Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1487,7 +1487,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1513,7 +1513,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.U8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.U8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1539,7 +1539,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.U16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.U16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1565,7 +1565,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.U32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.U32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1591,7 +1591,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.U64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.U64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1617,7 +1617,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.U128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.U128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1643,7 +1643,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.Isize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.Isize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1669,7 +1669,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.I8, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.I8 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1695,7 +1695,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.I16, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.I16 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1721,7 +1721,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.I32, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.I32 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1747,7 +1747,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.I64, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.I64 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1773,7 +1773,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.I128, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.I128 (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1799,7 +1799,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1825,7 +1825,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.rem (| Integer.Usize, M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.rem Integer.Usize (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2056,10 +2056,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2084,7 +2081,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.U8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.U8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2109,7 +2106,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.U16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.U16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2134,7 +2131,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.U32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.U32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2159,7 +2156,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.U64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.U64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2184,10 +2181,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.add (| Integer.U128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.add Integer.U128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2212,10 +2206,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Isize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.add Integer.Isize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2240,7 +2231,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.I8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.I8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2265,7 +2256,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.I16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.I16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2290,7 +2281,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2315,7 +2306,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.add (| Integer.I64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.add Integer.I64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2340,10 +2331,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.add (| Integer.I128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.add Integer.I128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2368,10 +2356,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2396,10 +2381,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2427,10 +2409,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2455,7 +2434,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.U8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.U8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2480,7 +2459,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.U16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.U16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2505,7 +2484,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.U32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.U32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2530,7 +2509,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.U64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.U64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2555,10 +2534,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.sub (| Integer.U128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.sub Integer.U128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2583,10 +2559,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.sub (| Integer.Isize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.sub Integer.Isize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2611,7 +2584,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.I8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.I8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2636,7 +2609,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.I16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.I16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2661,7 +2634,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.I32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.I32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2686,7 +2659,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.sub (| Integer.I64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.sub Integer.I64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2711,10 +2684,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.sub (| Integer.I128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.sub Integer.I128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2739,10 +2709,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2767,10 +2734,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2798,10 +2762,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.mul (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.mul Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2826,7 +2787,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.U8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.U8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2851,7 +2812,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.U16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.U16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2876,7 +2837,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.U32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.U32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2901,7 +2862,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.U64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.U64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2926,10 +2887,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.mul (| Integer.U128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.mul Integer.U128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2954,10 +2912,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.mul (| Integer.Isize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.mul Integer.Isize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -2982,7 +2937,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.I8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.I8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3007,7 +2962,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.I16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.I16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3032,7 +2987,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.I32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.I32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3057,7 +3012,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.mul (| Integer.I64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.mul Integer.I64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3082,10 +3037,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.mul (| Integer.I128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.mul Integer.I128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3110,10 +3062,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.mul (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.mul Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3138,10 +3087,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.mul (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.mul Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3169,10 +3115,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.div (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.div Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3197,7 +3140,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.U8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.U8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3222,7 +3165,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.U16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.U16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3247,7 +3190,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.U32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.U32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3272,7 +3215,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.U64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.U64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3297,10 +3240,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.div (| Integer.U128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.div Integer.U128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3325,10 +3265,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.div (| Integer.Isize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.div Integer.Isize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3353,7 +3290,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.I8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.I8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3378,7 +3315,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.I16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.I16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3403,7 +3340,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.I32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.I32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3428,7 +3365,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.div (| Integer.I64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.div Integer.I64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3453,10 +3390,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.div (| Integer.I128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.div Integer.I128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3481,10 +3415,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.div (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.div Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3509,10 +3440,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.div (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.div Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3540,10 +3468,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.rem (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.rem Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3568,7 +3493,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.U8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.U8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3593,7 +3518,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.U16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.U16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3618,7 +3543,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.U32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.U32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3643,7 +3568,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.U64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.U64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3668,10 +3593,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.rem (| Integer.U128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.rem Integer.U128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3696,10 +3618,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.rem (| Integer.Isize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.rem Integer.Isize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3724,7 +3643,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.I8, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.I8 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3749,7 +3668,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.I16, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.I16 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3774,7 +3693,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.I32, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.I32 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3799,7 +3718,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.rem (| Integer.I64, M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.rem Integer.I64 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3824,10 +3743,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.rem (| Integer.I128, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.rem Integer.I128 (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3852,10 +3768,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.rem (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.rem Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -3880,10 +3793,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| - β, - BinOp.Panic.rem (| Integer.Usize, M.read (| β |), M.read (| other |) |) - |) + M.write (| β, BinOp.Wrap.rem Integer.Usize (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ops/bit.v b/CoqOfRust/core/ops/bit.v index ab07d2cc2..e3e2f5c2e 100644 --- a/CoqOfRust/core/ops/bit.v +++ b/CoqOfRust/core/ops/bit.v @@ -1403,7 +1403,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1433,7 +1433,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1463,7 +1463,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1493,7 +1493,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1523,7 +1523,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1553,7 +1553,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1583,7 +1583,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1613,7 +1613,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1643,7 +1643,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1673,7 +1673,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1703,7 +1703,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1733,7 +1733,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1763,7 +1763,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1793,7 +1793,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1823,7 +1823,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1853,7 +1853,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1883,7 +1883,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1913,7 +1913,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1943,7 +1943,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -1973,7 +1973,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2003,7 +2003,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2033,7 +2033,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2063,7 +2063,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2093,7 +2093,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2123,7 +2123,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2153,7 +2153,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2183,7 +2183,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2213,7 +2213,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2243,7 +2243,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2273,7 +2273,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2303,7 +2303,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2333,7 +2333,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2363,7 +2363,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2393,7 +2393,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2423,7 +2423,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2453,7 +2453,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2483,7 +2483,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2513,7 +2513,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2543,7 +2543,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2573,7 +2573,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2603,7 +2603,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2633,7 +2633,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2663,7 +2663,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2693,7 +2693,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2723,7 +2723,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2753,7 +2753,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2783,7 +2783,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2813,7 +2813,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2843,7 +2843,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2873,7 +2873,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2903,7 +2903,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2933,7 +2933,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2963,7 +2963,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -2993,7 +2993,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3023,7 +3023,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3053,7 +3053,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3083,7 +3083,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3113,7 +3113,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3143,7 +3143,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3173,7 +3173,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3203,7 +3203,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3233,7 +3233,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3263,7 +3263,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3293,7 +3293,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3323,7 +3323,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3353,7 +3353,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3383,7 +3383,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3413,7 +3413,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3443,7 +3443,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3473,7 +3473,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3503,7 +3503,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3533,7 +3533,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3563,7 +3563,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3593,7 +3593,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3623,7 +3623,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3653,7 +3653,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3683,7 +3683,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3713,7 +3713,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3743,7 +3743,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3773,7 +3773,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3803,7 +3803,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3833,7 +3833,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3863,7 +3863,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3893,7 +3893,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3923,7 +3923,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3953,7 +3953,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -3983,7 +3983,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4013,7 +4013,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4043,7 +4043,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4073,7 +4073,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4103,7 +4103,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4133,7 +4133,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4163,7 +4163,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4193,7 +4193,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4223,7 +4223,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4253,7 +4253,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4283,7 +4283,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4313,7 +4313,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4343,7 +4343,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4373,7 +4373,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4403,7 +4403,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4433,7 +4433,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4463,7 +4463,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4493,7 +4493,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4523,7 +4523,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4553,7 +4553,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4583,7 +4583,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4613,7 +4613,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4643,7 +4643,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4673,7 +4673,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4703,7 +4703,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4733,7 +4733,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4763,7 +4763,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4793,7 +4793,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4823,7 +4823,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4853,7 +4853,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4883,7 +4883,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4913,7 +4913,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4943,7 +4943,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -4973,7 +4973,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5003,7 +5003,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5033,7 +5033,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5063,7 +5063,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5093,7 +5093,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5123,7 +5123,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5153,7 +5153,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5183,7 +5183,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5213,7 +5213,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5243,7 +5243,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5273,7 +5273,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5303,7 +5303,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5333,7 +5333,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5363,7 +5363,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5393,7 +5393,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5423,7 +5423,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5453,7 +5453,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5483,7 +5483,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5513,7 +5513,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5543,7 +5543,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5573,7 +5573,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5603,7 +5603,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5633,7 +5633,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5663,7 +5663,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5693,7 +5693,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shl (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shl (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5726,7 +5726,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5756,7 +5756,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5786,7 +5786,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5816,7 +5816,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5846,7 +5846,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5876,7 +5876,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5906,7 +5906,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5936,7 +5936,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5966,7 +5966,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -5996,7 +5996,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6026,7 +6026,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6056,7 +6056,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6086,7 +6086,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6116,7 +6116,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6146,7 +6146,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6176,7 +6176,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6206,7 +6206,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6236,7 +6236,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6266,7 +6266,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6296,7 +6296,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6326,7 +6326,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6356,7 +6356,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6386,7 +6386,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6416,7 +6416,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6446,7 +6446,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6476,7 +6476,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6506,7 +6506,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6536,7 +6536,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6566,7 +6566,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6596,7 +6596,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6626,7 +6626,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6656,7 +6656,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6686,7 +6686,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6716,7 +6716,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6746,7 +6746,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6776,7 +6776,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6806,7 +6806,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6836,7 +6836,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6866,7 +6866,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6896,7 +6896,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6926,7 +6926,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6956,7 +6956,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -6986,7 +6986,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7016,7 +7016,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7046,7 +7046,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7076,7 +7076,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7106,7 +7106,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7136,7 +7136,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7166,7 +7166,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7196,7 +7196,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7226,7 +7226,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7256,7 +7256,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7286,7 +7286,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7316,7 +7316,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7346,7 +7346,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7376,7 +7376,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7406,7 +7406,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7436,7 +7436,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7466,7 +7466,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7496,7 +7496,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7526,7 +7526,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7556,7 +7556,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7586,7 +7586,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7616,7 +7616,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7646,7 +7646,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7676,7 +7676,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7706,7 +7706,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7736,7 +7736,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7766,7 +7766,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7796,7 +7796,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7826,7 +7826,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7856,7 +7856,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7886,7 +7886,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7916,7 +7916,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7946,7 +7946,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -7976,7 +7976,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8006,7 +8006,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8036,7 +8036,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8066,7 +8066,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8096,7 +8096,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8126,7 +8126,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8156,7 +8156,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8186,7 +8186,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8216,7 +8216,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8246,7 +8246,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8276,7 +8276,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8306,7 +8306,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8336,7 +8336,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8366,7 +8366,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8396,7 +8396,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8426,7 +8426,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8456,7 +8456,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8486,7 +8486,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8516,7 +8516,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8546,7 +8546,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8576,7 +8576,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8606,7 +8606,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8636,7 +8636,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8666,7 +8666,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8696,7 +8696,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8726,7 +8726,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8756,7 +8756,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8786,7 +8786,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8816,7 +8816,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8846,7 +8846,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8876,7 +8876,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8906,7 +8906,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8936,7 +8936,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8966,7 +8966,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -8996,7 +8996,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9026,7 +9026,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9056,7 +9056,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9086,7 +9086,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9116,7 +9116,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9146,7 +9146,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9176,7 +9176,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9206,7 +9206,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9236,7 +9236,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9266,7 +9266,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9296,7 +9296,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9326,7 +9326,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9356,7 +9356,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9386,7 +9386,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9416,7 +9416,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9446,7 +9446,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9476,7 +9476,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9506,7 +9506,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9536,7 +9536,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9566,7 +9566,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9596,7 +9596,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9626,7 +9626,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9656,7 +9656,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9686,7 +9686,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9716,7 +9716,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9746,7 +9746,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9776,7 +9776,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9806,7 +9806,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9836,7 +9836,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9866,7 +9866,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9896,7 +9896,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9926,7 +9926,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9956,7 +9956,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -9986,7 +9986,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -10016,7 +10016,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in let other := M.alloc (| other |) in - BinOp.Panic.shr (| M.read (| self |), M.read (| other |) |))) + BinOp.Wrap.shr (M.read (| self |)) (M.read (| other |)))) | _, _ => M.impossible end. @@ -11032,7 +11032,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11061,7 +11061,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11090,7 +11090,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11119,7 +11119,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11148,7 +11148,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11177,7 +11177,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11206,7 +11206,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11235,7 +11235,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11264,7 +11264,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11293,7 +11293,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11322,7 +11322,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11351,7 +11351,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11380,7 +11380,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11409,7 +11409,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11438,7 +11438,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11467,7 +11467,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11496,7 +11496,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11525,7 +11525,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11554,7 +11554,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11583,7 +11583,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11612,7 +11612,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11641,7 +11641,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11670,7 +11670,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11699,7 +11699,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11728,7 +11728,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11757,7 +11757,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11786,7 +11786,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11815,7 +11815,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11844,7 +11844,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11873,7 +11873,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11902,7 +11902,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11931,7 +11931,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11960,7 +11960,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -11989,7 +11989,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12018,7 +12018,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12047,7 +12047,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12076,7 +12076,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12105,7 +12105,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12134,7 +12134,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12163,7 +12163,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12192,7 +12192,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12221,7 +12221,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12250,7 +12250,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12279,7 +12279,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12308,7 +12308,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12337,7 +12337,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12366,7 +12366,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12395,7 +12395,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12424,7 +12424,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12453,7 +12453,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12482,7 +12482,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12511,7 +12511,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12540,7 +12540,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12569,7 +12569,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12598,7 +12598,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12627,7 +12627,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12656,7 +12656,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12685,7 +12685,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12714,7 +12714,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12743,7 +12743,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12772,7 +12772,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12801,7 +12801,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12830,7 +12830,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12859,7 +12859,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12888,7 +12888,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12917,7 +12917,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12946,7 +12946,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -12975,7 +12975,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13004,7 +13004,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13033,7 +13033,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13062,7 +13062,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13091,7 +13091,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13120,7 +13120,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13149,7 +13149,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13178,7 +13178,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13207,7 +13207,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13236,7 +13236,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13265,7 +13265,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13294,7 +13294,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13323,7 +13323,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13352,7 +13352,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13381,7 +13381,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13410,7 +13410,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13439,7 +13439,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13468,7 +13468,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13497,7 +13497,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13526,7 +13526,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13555,7 +13555,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13584,7 +13584,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13613,7 +13613,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13642,7 +13642,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13671,7 +13671,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13700,7 +13700,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13729,7 +13729,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13758,7 +13758,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13787,7 +13787,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13816,7 +13816,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13845,7 +13845,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13874,7 +13874,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13903,7 +13903,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13932,7 +13932,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13961,7 +13961,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -13990,7 +13990,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14019,7 +14019,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14048,7 +14048,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14077,7 +14077,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14106,7 +14106,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14135,7 +14135,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14164,7 +14164,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14193,7 +14193,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14222,7 +14222,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14251,7 +14251,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14280,7 +14280,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14309,7 +14309,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14338,7 +14338,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14367,7 +14367,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14396,7 +14396,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14425,7 +14425,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14454,7 +14454,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14483,7 +14483,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14512,7 +14512,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14541,7 +14541,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14570,7 +14570,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14599,7 +14599,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14628,7 +14628,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14657,7 +14657,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14686,7 +14686,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14715,7 +14715,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14744,7 +14744,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14773,7 +14773,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14802,7 +14802,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14831,7 +14831,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14860,7 +14860,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14889,7 +14889,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14918,7 +14918,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14947,7 +14947,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -14976,7 +14976,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15005,7 +15005,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15034,7 +15034,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15063,7 +15063,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15092,7 +15092,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15121,7 +15121,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15150,7 +15150,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15179,7 +15179,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shl (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shl (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15211,7 +15211,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15240,7 +15240,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15269,7 +15269,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15298,7 +15298,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15327,7 +15327,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15356,7 +15356,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15385,7 +15385,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15414,7 +15414,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15443,7 +15443,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15472,7 +15472,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15501,7 +15501,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15530,7 +15530,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15559,7 +15559,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15588,7 +15588,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15617,7 +15617,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15646,7 +15646,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15675,7 +15675,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15704,7 +15704,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15733,7 +15733,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15762,7 +15762,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15791,7 +15791,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15820,7 +15820,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15849,7 +15849,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15878,7 +15878,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15907,7 +15907,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15936,7 +15936,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15965,7 +15965,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -15994,7 +15994,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16023,7 +16023,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16052,7 +16052,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16081,7 +16081,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16110,7 +16110,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16139,7 +16139,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16168,7 +16168,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16197,7 +16197,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16226,7 +16226,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16255,7 +16255,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16284,7 +16284,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16313,7 +16313,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16342,7 +16342,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16371,7 +16371,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16400,7 +16400,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16429,7 +16429,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16458,7 +16458,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16487,7 +16487,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16516,7 +16516,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16545,7 +16545,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16574,7 +16574,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16603,7 +16603,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16632,7 +16632,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16661,7 +16661,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16690,7 +16690,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16719,7 +16719,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16748,7 +16748,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16777,7 +16777,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16806,7 +16806,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16835,7 +16835,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16864,7 +16864,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16893,7 +16893,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16922,7 +16922,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16951,7 +16951,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -16980,7 +16980,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17009,7 +17009,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17038,7 +17038,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17067,7 +17067,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17096,7 +17096,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17125,7 +17125,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17154,7 +17154,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17183,7 +17183,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17212,7 +17212,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17241,7 +17241,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17270,7 +17270,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17299,7 +17299,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17328,7 +17328,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17357,7 +17357,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17386,7 +17386,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17415,7 +17415,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17444,7 +17444,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17473,7 +17473,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17502,7 +17502,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17531,7 +17531,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17560,7 +17560,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17589,7 +17589,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17618,7 +17618,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17647,7 +17647,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17676,7 +17676,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17705,7 +17705,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17734,7 +17734,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17763,7 +17763,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17792,7 +17792,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17821,7 +17821,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17850,7 +17850,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17879,7 +17879,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17908,7 +17908,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17937,7 +17937,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17966,7 +17966,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -17995,7 +17995,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18024,7 +18024,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18053,7 +18053,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18082,7 +18082,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18111,7 +18111,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18140,7 +18140,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18169,7 +18169,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18198,7 +18198,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18227,7 +18227,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18256,7 +18256,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18285,7 +18285,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18314,7 +18314,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18343,7 +18343,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18372,7 +18372,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18401,7 +18401,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18430,7 +18430,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18459,7 +18459,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18488,7 +18488,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18517,7 +18517,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18546,7 +18546,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18575,7 +18575,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18604,7 +18604,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18633,7 +18633,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18662,7 +18662,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18691,7 +18691,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18720,7 +18720,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18749,7 +18749,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18778,7 +18778,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18807,7 +18807,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18836,7 +18836,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18865,7 +18865,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18894,7 +18894,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18923,7 +18923,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18952,7 +18952,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -18981,7 +18981,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19010,7 +19010,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19039,7 +19039,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19068,7 +19068,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19097,7 +19097,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19126,7 +19126,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19155,7 +19155,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19184,7 +19184,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19213,7 +19213,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19242,7 +19242,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19271,7 +19271,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19300,7 +19300,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19329,7 +19329,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. @@ -19358,7 +19358,7 @@ Module ops. let other := M.alloc (| other |) in M.read (| let β := M.read (| self |) in - M.write (| β, BinOp.Panic.shr (| M.read (| β |), M.read (| other |) |) |) + M.write (| β, BinOp.Wrap.shr (M.read (| β |)) (M.read (| other |)) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/core/ops/control_flow.v b/CoqOfRust/core/ops/control_flow.v index ee4735de6..6b32ca8da 100644 --- a/CoqOfRust/core/ops/control_flow.v +++ b/CoqOfRust/core/ops/control_flow.v @@ -211,7 +211,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -221,7 +221,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -395,7 +395,7 @@ Module ops. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -405,7 +405,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -732,7 +732,12 @@ Module ops. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (let _ := + M.is_struct_tuple (| + γ, + "core::ops::control_flow::ControlFlow::Continue" + |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -858,7 +863,9 @@ Module ops. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (let _ := + M.is_struct_tuple (| γ, "core::ops::control_flow::ControlFlow::Break" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) diff --git a/CoqOfRust/core/ops/coroutine.v b/CoqOfRust/core/ops/coroutine.v index 11cdf6085..590a533d3 100644 --- a/CoqOfRust/core/ops/coroutine.v +++ b/CoqOfRust/core/ops/coroutine.v @@ -132,7 +132,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -142,7 +142,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -265,7 +265,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -275,7 +275,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -445,7 +445,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -455,7 +455,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -475,7 +475,8 @@ Module ops. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), [ fun γ => @@ -653,7 +654,7 @@ Module ops. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -663,7 +664,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/ops/index_range.v b/CoqOfRust/core/ops/index_range.v index e10cf10b2..51ef16a71 100644 --- a/CoqOfRust/core/ops/index_range.v +++ b/CoqOfRust/core/ops/index_range.v @@ -228,7 +228,7 @@ Module ops. (let start := M.alloc (| start |) in let end_ := M.alloc (| end_ |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -417,7 +417,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -426,7 +426,7 @@ Module ops. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -476,7 +476,7 @@ Module ops. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let value := + let~ value := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -484,7 +484,7 @@ Module ops. "start" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -520,7 +520,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -529,7 +529,7 @@ Module ops. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -579,7 +579,7 @@ Module ops. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), @@ -595,7 +595,7 @@ Module ops. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -633,7 +633,7 @@ Module ops. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let mid := + let~ mid := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -688,7 +688,7 @@ Module ops. ] |) |) in - let prefix := + let~ prefix := M.alloc (| Value.StructRecord "core::ops::index_range::IndexRange" @@ -704,7 +704,7 @@ Module ops. ("end_", M.read (| mid |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -741,7 +741,7 @@ Module ops. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let mid := + let~ mid := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -796,7 +796,7 @@ Module ops. ] |) |) in - let suffix := + let~ suffix := M.alloc (| Value.StructRecord "core::ops::index_range::IndexRange" @@ -812,7 +812,7 @@ Module ops. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -910,7 +910,7 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -945,7 +945,7 @@ Module ops. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let taken := + let~ taken := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -982,18 +982,17 @@ Module ops. [] |), [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "len", [] |), [ taken ] - |) - |) + |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; @@ -1098,7 +1097,7 @@ Module ops. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let taken := + let~ taken := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1135,18 +1134,17 @@ Module ops. [] |), [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::ops::index_range::IndexRange", "len", [] |), [ taken ] - |) - |) + |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; diff --git a/CoqOfRust/core/ops/range.v b/CoqOfRust/core/ops/range.v index 9eca0d0f2..93241afb0 100644 --- a/CoqOfRust/core/ops/range.v +++ b/CoqOfRust/core/ops/range.v @@ -399,7 +399,7 @@ Module ops. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Idx, [], "hash", [ __H ] |), @@ -460,7 +460,7 @@ Module ops. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -537,7 +537,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -625,7 +625,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -985,7 +985,7 @@ Module ops. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1062,7 +1062,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1405,7 +1405,7 @@ Module ops. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1493,7 +1493,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1841,7 +1841,7 @@ Module ops. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Idx, [], "hash", [ __H ] |), @@ -1855,7 +1855,7 @@ Module ops. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Idx, [], "hash", [ __H ] |), @@ -2103,21 +2103,20 @@ Module ops. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let exclusive_end := + let~ exclusive_end := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::RangeInclusive", "end" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let start := + let~ start := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2182,7 +2181,7 @@ Module ops. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2259,7 +2258,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2349,7 +2348,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2426,7 +2425,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2441,7 +2440,7 @@ Module ops. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2762,7 +2761,7 @@ Module ops. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2852,7 +2851,7 @@ Module ops. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3064,6 +3063,7 @@ Module ops. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) ] |) @@ -3158,6 +3158,7 @@ Module ops. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3195,7 +3196,7 @@ Module ops. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3205,7 +3206,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3293,7 +3294,7 @@ Module ops. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3303,7 +3304,7 @@ Module ops. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3493,7 +3494,8 @@ Module ops. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) ] |) |))) @@ -3549,7 +3551,8 @@ Module ops. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) ] |) |))) @@ -3582,7 +3585,8 @@ Module ops. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -3669,7 +3673,8 @@ Module ops. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -3785,7 +3790,10 @@ Module ops. [ start; M.alloc (| M.read (| item |) |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.Bool true |))) ] |) |), @@ -3847,7 +3855,11 @@ Module ops. [ item; M.alloc (| M.read (| end_ |) |) ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.Bool true |))) ] |) |))) @@ -4291,6 +4303,7 @@ Module ops. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::ops::range::Bound::Unbounded" |) in M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) ] |) @@ -4349,6 +4362,7 @@ Module ops. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_1, "core::ops::range::Bound::Unbounded" |) in M.alloc (| Value.StructTuple "core::ops::range::Bound::Unbounded" [] |))) ] |) diff --git a/CoqOfRust/core/ops/simulations/function.v b/CoqOfRust/core/ops/simulations/function.v new file mode 100644 index 000000000..a0a716701 --- /dev/null +++ b/CoqOfRust/core/ops/simulations/function.v @@ -0,0 +1,59 @@ +Require Import CoqOfRust.CoqOfRust. +Require Import proofs.M. +Require Import simulations.M. + +Require Import core.ops.function. + +Import Run. + +(* pub trait FnOnce { + type Output; + + fn call_once(self, args: Args) -> Self::Output; +} *) +Module FnOnce. + Record RunImpl + (Self : Set) (Self_ty : Ty.t) `{ToValue Self} + {Args : Set} (Args_ty : list Ty.t) (args_to_value : Args -> list Value.t) + (Output : Set) (Output_ty : Ty.t) `{ToValue Output} : + Set := { + call_once : {call_once @ + IsTraitMethod.t "core::ops::function::FnOnce" + Self_ty [Ty.tuple Args_ty] + "call_once" call_once * + forall (self : Self) (args : Args), + {{ _, _ | + call_once [] [ φ self; Value.Tuple (args_to_value args) ] ⇓ + fun (v : Output) => inl (φ v) + | _ }} + }; + }. +End FnOnce. + +Module Impl_FnOnce_for_function. + Definition run_impl + {Args : Set} (Args_ty : list Ty.t) (args_to_value : Args -> list Value.t) + (Output : Set) (Output_ty : Ty.t) `{ToValue Output} : + FnOnce.RunImpl + (StatelessFunction.t (Output := Output) args_to_value φ) + (Ty.function Args_ty Output_ty) + Args_ty args_to_value + Output Output_ty. + Proof. + constructor. + { (* call_once *) + eexists; split. + { eapply IsTraitMethod.Explicit. + { eapply FunctionTraitAutomaticImpl.FunctionImplementsFnOnce. } + { reflexivity. } + } + { intros. + run_symbolic. + eapply Run.CallClosure. { + apply self. + } + intros; run_symbolic. + } + } + Defined. +End Impl_FnOnce_for_function. diff --git a/CoqOfRust/core/option.v b/CoqOfRust/core/option.v index 4fb257286..d86f14e17 100644 --- a/CoqOfRust/core/option.v +++ b/CoqOfRust/core/option.v @@ -46,7 +46,7 @@ Module option. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -56,7 +56,7 @@ Module option. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -183,7 +183,7 @@ Module option. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -193,7 +193,7 @@ Module option. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -213,7 +213,8 @@ Module option. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), [ fun γ => @@ -284,6 +285,7 @@ Module option. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -345,7 +347,7 @@ Module option. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -355,7 +357,7 @@ Module option. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "isize", [], "hash", [ __H ] |), @@ -454,7 +456,10 @@ Module option. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Bool false |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -544,7 +549,9 @@ Module option. Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -586,7 +593,9 @@ Module option. Value.StructTuple "core::option::Option::Some" [ M.read (| x |) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -665,7 +674,9 @@ Module option. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -748,7 +759,9 @@ Module option. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -964,7 +977,8 @@ Module option. val)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::option::expect_failed", [] |), @@ -1012,7 +1026,8 @@ Module option. val)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic", [] |), @@ -1060,7 +1075,10 @@ Module option. |) in let x := M.copy (| γ0_0 |) in x)); - fun γ => ltac:(M.monadic default) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + default)) ] |) |))) @@ -1105,7 +1123,8 @@ Module option. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::FnOnce", @@ -1160,7 +1179,8 @@ Module option. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), [] @@ -1193,7 +1213,7 @@ Module option. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1201,7 +1221,7 @@ Module option. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1256,7 +1276,8 @@ Module option. val)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::hint::unreachable_unchecked", [] |), @@ -1322,7 +1343,9 @@ Module option. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -1348,7 +1371,7 @@ Module option. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1362,7 +1385,7 @@ Module option. 0 |) in let x := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1432,7 +1455,10 @@ Module option. [ M.read (| f |); Value.Tuple [ M.read (| t |) ] ] |) |))); - fun γ => ltac:(M.monadic default) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + default)) ] |) |))) @@ -1490,7 +1516,8 @@ Module option. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::FnOnce", @@ -1543,7 +1570,8 @@ Module option. M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| v |) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ M.read (| err |) ] |))) ] @@ -1590,7 +1618,8 @@ Module option. M.alloc (| Value.StructTuple "core::result::Result::Ok" [ M.read (| v |) ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ @@ -1666,7 +1695,9 @@ Module option. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -1733,7 +1764,9 @@ Module option. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -1845,7 +1878,9 @@ Module option. |) in optb)); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -1898,7 +1933,9 @@ Module option. |) |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -1932,7 +1969,7 @@ Module option. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2026,7 +2063,10 @@ Module option. 0 |) in x)); - fun γ => ltac:(M.monadic optb) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + optb)) ] |) |))) @@ -2069,7 +2109,8 @@ Module option. x)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::FnOnce", @@ -2122,11 +2163,13 @@ Module option. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_1, "core::option::Option::None" |) in a)); fun γ => ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in let b := M.copy (| γ0_1 |) in let γ2_0 := M.SubPointer.get_struct_tuple_field (| @@ -2161,7 +2204,7 @@ Module option. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] @@ -2212,14 +2255,15 @@ Module option. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => ltac:(M.monadic (let γ := M.read (| self |) in - let _ := + let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.read (| self |), Value.StructTuple "core::option::Option::Some" [ M.read (| value |) ] @@ -2309,7 +2353,7 @@ Module option. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2317,7 +2361,8 @@ Module option. ltac:(M.monadic (let γ := self in let γ := M.read (| γ |) in - let _ := + let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.read (| self |), Value.StructTuple @@ -2655,7 +2700,8 @@ Module option. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [ Value.StructTuple "core::option::Option::None" []; @@ -2714,7 +2760,9 @@ Module option. Value.StructTuple "core::option::Option::Some" [ M.read (| v |) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -2766,7 +2814,9 @@ Module option. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -2817,7 +2867,9 @@ Module option. Value.StructTuple "core::option::Option::Some" [ M.read (| t |) ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -2869,7 +2921,9 @@ Module option. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -2946,7 +3000,8 @@ Module option. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.StructTuple "core::option::Option::None" [] ] @@ -3025,6 +3080,7 @@ Module option. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) @@ -3470,7 +3526,9 @@ Module option. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let γ0_0 := M.read (| γ0_0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in let γ0_1 := M.read (| γ0_1 |) in + let _ := M.is_struct_tuple (| γ0_1, "core::option::Option::None" |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -4900,7 +4958,8 @@ Module option. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [ Value.Integer 0; @@ -5880,7 +5939,8 @@ Module option. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::ops::control_flow::ControlFlow::Break" [ Value.StructTuple "core::option::Option::None" [] ] @@ -5927,7 +5987,9 @@ Module option. residual, [ fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -6029,7 +6091,9 @@ Module option. let inner := M.copy (| γ0_0 |) in inner)); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) diff --git a/CoqOfRust/core/panic/location.v b/CoqOfRust/core/panic/location.v index 60a95feb4..4219c4e08 100644 --- a/CoqOfRust/core/panic/location.v +++ b/CoqOfRust/core/panic/location.v @@ -173,7 +173,7 @@ Module panic. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -193,7 +193,7 @@ Module panic. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u32", [], "hash", [ __H ] |), @@ -270,7 +270,8 @@ Module panic. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "u32", [], "cmp", [] |), @@ -291,7 +292,8 @@ Module panic. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -471,6 +473,7 @@ Module panic. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -504,6 +507,7 @@ Module panic. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/panic/panic_info.v b/CoqOfRust/core/panic/panic_info.v index ca2093211..c7b7c77b7 100644 --- a/CoqOfRust/core/panic/panic_info.v +++ b/CoqOfRust/core/panic/panic_info.v @@ -150,7 +150,7 @@ Module panic. (let self := M.alloc (| self |) in let info := M.alloc (| info |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -318,7 +318,7 @@ Module panic. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -392,7 +392,7 @@ Module panic. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -477,7 +477,7 @@ Module panic. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -496,7 +496,7 @@ Module panic. 0 |) in let message := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -571,7 +571,7 @@ Module panic. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -680,7 +680,7 @@ Module panic. 0 |) in let payload := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -761,7 +761,7 @@ Module panic. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| diff --git a/CoqOfRust/core/panic/unwind_safe.v b/CoqOfRust/core/panic/unwind_safe.v index d366a3477..df633992e 100644 --- a/CoqOfRust/core/panic/unwind_safe.v +++ b/CoqOfRust/core/panic/unwind_safe.v @@ -500,7 +500,7 @@ Module panic. (let self := M.alloc (| self |) in let cx := M.alloc (| cx |) in M.read (| - let pinned_field := + let~ pinned_field := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/core/panicking.v b/CoqOfRust/core/panicking.v index 08baaa267..286437797 100644 --- a/CoqOfRust/core/panicking.v +++ b/CoqOfRust/core/panicking.v @@ -32,7 +32,7 @@ Module panicking. ltac:(M.monadic (let fmt := M.alloc (| fmt |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -48,7 +48,7 @@ Module panicking. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let pi := + let~ pi := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -191,7 +191,7 @@ Module panicking. (let fmt := M.alloc (| fmt |) in let force_no_backtrace := M.alloc (| force_no_backtrace |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -210,7 +210,7 @@ Module panicking. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let pi := + let~ pi := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -503,7 +503,7 @@ Module panicking. (let index := M.alloc (| index |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -591,7 +591,7 @@ Module panicking. (let required := M.alloc (| required |) in let found := M.alloc (| found |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -798,7 +798,7 @@ Module panicking. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -862,14 +862,17 @@ Module panicking. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::panicking::AssertKind::Eq" |) in M.alloc (| M.read (| Value.String "Eq" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::panicking::AssertKind::Ne" |) in M.alloc (| M.read (| Value.String "Ne" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::panicking::AssertKind::Match" |) in M.alloc (| M.read (| Value.String "Match" |) |))) ] |) @@ -1050,14 +1053,23 @@ Module panicking. let right := M.alloc (| right |) in let args := M.alloc (| args |) in M.read (| - let op := + let~ op := M.copy (| M.match_operator (| kind, [ - fun γ => ltac:(M.monadic (Value.String "==")); - fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "!=" |) |))); - fun γ => ltac:(M.monadic (M.alloc (| M.read (| Value.String "matches" |) |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::panicking::AssertKind::Eq" |) in + Value.String "==")); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::panicking::AssertKind::Ne" |) in + M.alloc (| M.read (| Value.String "!=" |) |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::panicking::AssertKind::Match" |) in + M.alloc (| M.read (| Value.String "matches" |) |))) ] |) |) in @@ -1147,7 +1159,8 @@ Module panicking. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), [ diff --git a/CoqOfRust/core/pin.v b/CoqOfRust/core/pin.v index 063b99988..9f1a62fbf 100644 --- a/CoqOfRust/core/pin.v +++ b/CoqOfRust/core/pin.v @@ -488,7 +488,7 @@ Module pin. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.associated, [], "hash", [ H ] |), @@ -697,7 +697,7 @@ Module pin. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.write (| M.call_closure (| M.get_trait_method (| "core::ops::deref::DerefMut", P, [], "deref_mut", [] |), @@ -747,13 +747,13 @@ Module pin. (let self := M.alloc (| self |) in let func := M.alloc (| func |) in M.read (| - let pointer := + let~ pointer := M.alloc (| M.read (| M.SubPointer.get_struct_record_field (| self, "core::pin::Pin", "pointer" |) |) |) in - let new_pointer := + let~ new_pointer := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -931,7 +931,7 @@ Module pin. (let self := M.alloc (| self |) in let func := M.alloc (| func |) in M.read (| - let pointer := + let~ pointer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -942,7 +942,7 @@ Module pin. [ M.read (| self |) ] |) |) in - let new_pointer := + let~ new_pointer := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/proofs/default.v b/CoqOfRust/core/proofs/default.v deleted file mode 100644 index 0efa40b3e..000000000 --- a/CoqOfRust/core/proofs/default.v +++ /dev/null @@ -1,15 +0,0 @@ -Require Import CoqOfRust.CoqOfRust. -Require Import CoqOfRust.proofs.M. -Require Import CoqOfRust.simulations.M. -Require core.simulations.default. - -Import Run. - -Module Default. - Record InstanceWithRun (Self : Set) `{ToTy Self} `{ToValue Self} : Set := { - default : {default @ - IsTraitMethod "core::default::Default" (Φ Self) [] "default" default * - Run.pure (default [] []) (fun v => inl (φ v)) - }; - }. -End Default. diff --git a/CoqOfRust/core/ptr/alignment.v b/CoqOfRust/core/ptr/alignment.v index 4db4a4790..c99125d49 100644 --- a/CoqOfRust/core/ptr/alignment.v +++ b/CoqOfRust/core/ptr/alignment.v @@ -160,6 +160,11 @@ Module ptr. "core::ptr::alignment::Alignment", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::ptr::alignment::AlignmentEnum64::_Align1Shl0" + |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -289,7 +294,7 @@ Module ptr. ltac:(M.monadic (let align := M.alloc (| align |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1066,7 +1071,7 @@ Module ptr. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1076,7 +1081,7 @@ Module ptr. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1356,7 +1361,7 @@ Module ptr. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1366,7 +1371,7 @@ Module ptr. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1806,7 +1811,7 @@ Module ptr. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1816,7 +1821,7 @@ Module ptr. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/ptr/const_ptr.v b/CoqOfRust/core/ptr/const_ptr.v index 72d2cbdda..546ea90df 100644 --- a/CoqOfRust/core/ptr/const_ptr.v +++ b/CoqOfRust/core/ptr/const_ptr.v @@ -258,7 +258,7 @@ Module ptr. (let self := M.alloc (| self |) in let addr := M.alloc (| addr |) in M.read (| - let self_addr := + let~ self_addr := M.alloc (| M.rust_cast (M.call_closure (| @@ -266,8 +266,8 @@ Module ptr. [ M.read (| self |) ] |)) |) in - let dest_addr := M.alloc (| M.rust_cast (M.read (| addr |)) |) in - let offset := + let~ dest_addr := M.alloc (| M.rust_cast (M.read (| addr |)) |) in + let~ offset := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), @@ -688,11 +688,11 @@ Module ptr. (let self := M.alloc (| self |) in let origin := M.alloc (| origin |) in M.read (| - let pointee_size := + let~ pointee_size := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -817,8 +817,8 @@ Module ptr. (let self := M.alloc (| self |) in let origin := M.alloc (| origin |) in M.read (| - let this := M.copy (| self |) in - let _ := + let~ this := M.copy (| self |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -827,7 +827,7 @@ Module ptr. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -864,11 +864,11 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let pointee_size := + let~ pointee_size := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1002,7 +1002,8 @@ Module ptr. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1540,7 +1541,7 @@ Module ptr. (let self := M.alloc (| self |) in let align := M.alloc (| align |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1593,7 +1594,7 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::align_offset", [ T ] |), @@ -1673,7 +1674,7 @@ Module ptr. (let self := M.alloc (| self |) in let align := M.alloc (| align |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/ptr/mod.v b/CoqOfRust/core/ptr/mod.v index 00b318f70..50a807424 100644 --- a/CoqOfRust/core/ptr/mod.v +++ b/CoqOfRust/core/ptr/mod.v @@ -293,7 +293,7 @@ Module ptr. (let x := M.alloc (| x |) in let y := M.alloc (| y |) in M.read (| - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -304,7 +304,7 @@ Module ptr. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -322,7 +322,7 @@ Module ptr. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -333,7 +333,7 @@ Module ptr. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -417,8 +417,8 @@ Module ptr. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -427,7 +427,7 @@ Module ptr. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -472,7 +472,7 @@ Module ptr. ] |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -513,23 +513,22 @@ Module ptr. M.get_function (| "core::mem::size_of", [ T ] |), [] |)) - (BinOp.Panic.mul (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.mul + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] - |), - Value.Integer 2 - |)))) + |)) + (Value.Integer 2)))) |))) |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -553,20 +552,19 @@ Module ptr. |)), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] - |) - |)) + |))) (Value.Integer 0))) |) |)) in @@ -578,7 +576,7 @@ Module ptr. M.alloc (| M.never_to_any (| M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -589,7 +587,7 @@ Module ptr. [ M.read (| x |) ] |) |) in - let y := + let~ y := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -600,26 +598,24 @@ Module ptr. [ M.read (| y |) ] |) |) in - let count := + let~ count := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| count |), - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| count |)) + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] - |) - |) - |) + |))) |) in M.return_ (| M.call_closure (| @@ -636,7 +632,7 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -660,20 +656,19 @@ Module ptr. |)), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u8" ] |), [] - |) - |)) + |))) (Value.Integer 0))) |) |)) in @@ -685,7 +680,7 @@ Module ptr. M.alloc (| M.never_to_any (| M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -696,7 +691,7 @@ Module ptr. [ M.read (| x |) ] |) |) in - let y := + let~ y := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -707,26 +702,24 @@ Module ptr. [ M.read (| y |) ] |) |) in - let count := + let~ count := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| count |), - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| count |)) + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "u8" ] |), [] - |) - |) - |) + |))) |) in M.return_ (| M.call_closure (| @@ -786,7 +779,7 @@ Module ptr. let y := M.alloc (| y |) in let count := M.alloc (| count |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -797,7 +790,7 @@ Module ptr. [ M.read (| x |) ] |) |) in - let y := + let~ y := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -808,7 +801,7 @@ Module ptr. [ M.read (| y |) ] |) |) in - let i := M.alloc (| Value.Integer 0 |) in + let~ i := M.alloc (| Value.Integer 0 |) in M.loop (| ltac:(M.monadic (M.match_operator (| @@ -819,7 +812,7 @@ Module ptr. (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| i |)) (M.read (| count |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -832,7 +825,7 @@ Module ptr. [ M.read (| x |); M.read (| i |) ] |) |) in - let y := + let~ y := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -845,7 +838,7 @@ Module ptr. [ M.read (| y |); M.read (| i |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -855,11 +848,11 @@ Module ptr. [ M.read (| x |); M.read (| y |) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -867,7 +860,8 @@ Module ptr. (M.alloc (| M.never_to_any (| M.read (| - let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in + let~ _ := + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) |) @@ -905,8 +899,8 @@ Module ptr. (let dst := M.alloc (| dst |) in let src := M.alloc (| src |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -914,7 +908,7 @@ Module ptr. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -937,7 +931,7 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", [ T ] |), @@ -996,7 +990,7 @@ Module ptr. ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1004,7 +998,7 @@ Module ptr. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1060,7 +1054,7 @@ Module ptr. ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1071,7 +1065,7 @@ Module ptr. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), @@ -1135,7 +1129,7 @@ Module ptr. (let dst := M.alloc (| dst |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1143,7 +1137,7 @@ Module ptr. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1197,7 +1191,7 @@ Module ptr. (let dst := M.alloc (| dst |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ Ty.path "u8" ] |), @@ -1208,7 +1202,7 @@ Module ptr. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::forget", [ T ] |), @@ -1240,7 +1234,7 @@ Module ptr. ltac:(M.monadic (let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1248,7 +1242,7 @@ Module ptr. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1302,7 +1296,7 @@ Module ptr. (let dst := M.alloc (| dst |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1310,7 +1304,7 @@ Module ptr. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1333,7 +1327,7 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::volatile_store", [ T ] |), @@ -1533,11 +1527,11 @@ Module ptr. M.catch_return (| ltac:(M.monadic (M.read (| - let stride := + let~ stride := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) |) in - let addr := + let~ addr := M.alloc (| M.call_closure (| M.get_function (| @@ -1547,14 +1541,14 @@ Module ptr. [ M.read (| p |) ] |) |) in - let a_minus_one := + let~ a_minus_one := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), [ M.read (| a |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1568,7 +1562,7 @@ Module ptr. M.alloc (| M.never_to_any (| M.read (| - let p_mod_a := + let~ p_mod_a := M.alloc (| BinOp.Pure.bit_and (M.read (| addr |)) (M.read (| a_minus_one |)) |) in @@ -1604,14 +1598,14 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let a_mod_stride := + let~ a_mod_stride := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_rem", [ Ty.path "usize" ] |), [ M.read (| a |); M.read (| stride |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1627,7 +1621,7 @@ Module ptr. M.alloc (| M.never_to_any (| M.read (| - let aligned_address := + let~ aligned_address := M.alloc (| BinOp.Pure.bit_and (M.call_closure (| @@ -1645,7 +1639,7 @@ Module ptr. [ Value.Integer 0; M.read (| a |) ] |)) |) in - let byte_offset := + let~ byte_offset := M.alloc (| M.call_closure (| M.get_function (| @@ -1655,14 +1649,14 @@ Module ptr. [ M.read (| aligned_address |); M.read (| addr |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), [ BinOp.Pure.lt (M.read (| byte_offset |)) (M.read (| a |)) ] |) |) in - let addr_mod_stride := + let~ addr_mod_stride := M.alloc (| M.call_closure (| M.get_function (| @@ -1712,16 +1706,16 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let gcdpow := + let~ gcdpow := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "usize" ] |), [ M.read (| stride |) ] |) |) in - let y := + let~ y := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::cttz_nonzero", [ Ty.path "usize" ] |), @@ -1742,14 +1736,14 @@ Module ptr. ] |) |) in - let gcd := + let~ gcd := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_shl", [ Ty.path "usize" ] |), [ Value.Integer 1; M.read (| gcdpow |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1775,7 +1769,7 @@ Module ptr. M.alloc (| M.never_to_any (| M.read (| - let a2 := + let~ a2 := M.alloc (| M.call_closure (| M.get_function (| @@ -1785,7 +1779,7 @@ Module ptr. [ M.read (| a |); M.read (| gcdpow |) ] |) |) in - let a2minus1 := + let~ a2minus1 := M.alloc (| M.call_closure (| M.get_function (| @@ -1795,7 +1789,7 @@ Module ptr. [ M.read (| a2 |); Value.Integer 1 ] |) |) in - let s2 := + let~ s2 := M.alloc (| M.call_closure (| M.get_function (| @@ -1810,7 +1804,7 @@ Module ptr. ] |) |) in - let minusp2 := + let~ minusp2 := M.alloc (| M.call_closure (| M.get_function (| @@ -1916,44 +1910,42 @@ Module ptr. (let x := M.alloc (| x |) in let m := M.alloc (| m |) in M.read (| - let m_minus_one := + let~ m_minus_one := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), [ M.read (| m |); Value.Integer 1 ] |) |) in - let inverse := + let~ inverse := M.alloc (| M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.get_constant (| "core::ptr::align_offset::mod_inv::INV_TABLE_MOD_16" |), M.alloc (| - BinOp.Panic.shr (| - BinOp.Pure.bit_and + BinOp.Wrap.shr + (BinOp.Pure.bit_and (M.read (| x |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::ptr::align_offset::mod_inv::INV_TABLE_MOD" |) - |), - Value.Integer 1 - |)), - Value.Integer 1 - |) + |)) + (Value.Integer 1))) + (Value.Integer 1) |) |) |)) |) in - let mod_gate := + let~ mod_gate := M.copy (| M.get_constant (| "core::ptr::align_offset::mod_inv::INV_TABLE_MOD" |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1970,7 +1962,7 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| inverse, M.call_closure (| @@ -2013,7 +2005,7 @@ Module ptr. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let new_gate := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2029,7 +2021,7 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| mod_gate, M.read (| new_gate |) |) in + let~ _ := M.write (| mod_gate, M.read (| new_gate |) |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -2111,7 +2103,7 @@ Module ptr. (let hashee := M.alloc (| hashee |) in let into := M.alloc (| into |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/core/ptr/mut_ptr.v b/CoqOfRust/core/ptr/mut_ptr.v index a620720f4..b8eb75e71 100644 --- a/CoqOfRust/core/ptr/mut_ptr.v +++ b/CoqOfRust/core/ptr/mut_ptr.v @@ -258,7 +258,7 @@ Module ptr. (let self := M.alloc (| self |) in let addr := M.alloc (| addr |) in M.read (| - let self_addr := + let~ self_addr := M.alloc (| M.rust_cast (M.call_closure (| @@ -266,8 +266,8 @@ Module ptr. [ M.read (| self |) ] |)) |) in - let dest_addr := M.alloc (| M.rust_cast (M.read (| addr |)) |) in - let offset := + let~ dest_addr := M.alloc (| M.rust_cast (M.read (| addr |)) |) in + let~ offset := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "isize", "wrapping_sub", [] |), @@ -1722,7 +1722,7 @@ Module ptr. (let self := M.alloc (| self |) in let align := M.alloc (| align |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1775,7 +1775,7 @@ Module ptr. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::align_offset", [ T ] |), @@ -1854,7 +1854,7 @@ Module ptr. (let self := M.alloc (| self |) in let align := M.alloc (| align |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2022,7 +2022,7 @@ Module ptr. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2097,7 +2097,7 @@ Module ptr. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2108,7 +2108,7 @@ Module ptr. [ M.read (| self |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2119,7 +2119,7 @@ Module ptr. [ M.read (| self |) ] |) |) in - let tail := + let~ tail := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -2137,7 +2137,7 @@ Module ptr. M.get_function (| "core::ptr::slice_from_raw_parts_mut", [ T ] |), [ M.read (| tail |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| mid |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| mid |)) ] |) ] diff --git a/CoqOfRust/core/ptr/non_null.v b/CoqOfRust/core/ptr/non_null.v index 5315020d1..cd46b9ec6 100644 --- a/CoqOfRust/core/ptr/non_null.v +++ b/CoqOfRust/core/ptr/non_null.v @@ -54,7 +54,7 @@ Module ptr. | [], [] => ltac:(M.monadic (M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::invalid_mut", [ T ] |), @@ -172,7 +172,7 @@ Module ptr. ltac:(M.monadic (let ptr := M.alloc (| ptr |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -181,7 +181,7 @@ Module ptr. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1638,7 +1638,7 @@ Module ptr. (let self := M.alloc (| self |) in let align := M.alloc (| align |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/result.v b/CoqOfRust/core/result.v index c2cfc170b..e8c7abe6b 100644 --- a/CoqOfRust/core/result.v +++ b/CoqOfRust/core/result.v @@ -58,7 +58,7 @@ Module result. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -68,7 +68,7 @@ Module result. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -178,7 +178,7 @@ Module result. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -188,7 +188,7 @@ Module result. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -354,7 +354,7 @@ Module result. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -364,7 +364,7 @@ Module result. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -384,7 +384,8 @@ Module result. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), [ fun γ => @@ -552,7 +553,7 @@ Module result. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -562,7 +563,7 @@ Module result. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "isize", [], "hash", [ __H ] |), @@ -1181,7 +1182,7 @@ Module result. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1195,7 +1196,7 @@ Module result. 0 |) in let t := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1238,7 +1239,7 @@ Module result. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1252,7 +1253,7 @@ Module result. 0 |) in let e := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2164,7 +2165,7 @@ Module result. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2172,7 +2173,7 @@ Module result. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2259,7 +2260,7 @@ Module result. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2267,7 +2268,7 @@ Module result. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2590,6 +2591,7 @@ Module result. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic @@ -3123,7 +3125,7 @@ Module result. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3394,7 +3396,7 @@ Module result. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3668,7 +3670,7 @@ Module result. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), diff --git a/CoqOfRust/core/simulations/clone.v b/CoqOfRust/core/simulations/clone.v new file mode 100644 index 000000000..d99ef646b --- /dev/null +++ b/CoqOfRust/core/simulations/clone.v @@ -0,0 +1,29 @@ +Require Import CoqOfRust.CoqOfRust. +Require Import proofs.M. +Require Import simulations.M. + +Import Run. + +(* + pub trait Clone: Sized { + fn clone(&self) -> Self; + + fn clone_from(&mut self, source: &Self) { + *self = source.clone() + } + } +*) +Module Clone. + Record RunImpl `{State.Trait} (Self : Set) `{ToTy Self} `{ToValue Self} : Set := { + clone : {clone @ + IsTraitMethod.t "core::clone::Clone" (Φ Self) [] "clone" clone * + forall (state : State) (pointer : Pointer.t Value.t), + HasRead.t state pointer φ -> + {{ _, state | + clone [] [ Value.Pointer pointer ] ⇓ + fun (v : Self) => inl (φ v) + | fun state' => state' = state }} + }; + (* TODO: add [clone_from] *) + }. +End Clone. diff --git a/CoqOfRust/core/simulations/cmp.v b/CoqOfRust/core/simulations/cmp.v new file mode 100644 index 000000000..a7c502eab --- /dev/null +++ b/CoqOfRust/core/simulations/cmp.v @@ -0,0 +1,187 @@ +Require Import CoqOfRust.CoqOfRust. +Require Import proofs.M. +Require Import simulations.M. +Require core.ops.simulations.function. + +Require Import core.cmp. + +Import Run. + +(* pub enum Ordering { + Less = -1, + Equal = 0, + Greater = 1, +} *) +Module Ordering. + Inductive t : Set := + | Less : t + | Equal : t + | Greater : t. + + Global Instance IsToTy : ToTy t := { + Φ := Ty.path "core::cmp::Ordering"; + }. + + Global Instance IsToValue : ToValue t := { + φ x := + match x with + | Less => Value.StructTuple "core::cmp::Ordering::Less" [] + | Equal => Value.StructTuple "core::cmp::Ordering::Equal" [] + | Greater => Value.StructTuple "core::cmp::Ordering::Greater" [] + end; + }. +End Ordering. + +(* + pub fn min_by Ordering>(v1: T, v2: T, compare: F) -> T { + match compare(&v1, &v2) { + Ordering::Less | Ordering::Equal => v1, + Ordering::Greater => v2, + } + } +*) +Definition run_min_by `{State.Trait} {T F : Set} {T_ty F_ty : Ty.t} `{ToValue F} `{ToValue T} + (v1 v2 : T) (compare : F) + (run_impl_FnOnce_for_F : + function.FnOnce.RunImpl + F F_ty + [ Ty.apply (Ty.path "&") [ T_ty ]; Ty.apply (Ty.path "&") [ T_ty ] ] + (fun '((v1, v2) : T * T) => [ + Value.Pointer (Pointer.Immediate (φ v1)); + Value.Pointer (Pointer.Immediate (φ v2)) + ]) + Ordering.t (Φ Ordering.t) + ) : + {{ _, _ | + cmp.min_by [ T_ty; F_ty ] [ φ v1; φ v2; φ compare ] ⇓ + fun (v : T) => inl (φ v) + | _ }}. +Proof. + destruct run_impl_FnOnce_for_F as [ + [call_once [H_call_once run_call_once]] + ]. + intros; run_symbolic. + eapply Run.CallPrimitiveGetTraitMethod. { + apply H_call_once. + } + run_symbolic. + eapply Run.CallClosure. { + apply (run_call_once compare (v1, v2)). + } + intros; run_symbolic. +Admitted. + +(* + pub trait Ord: Eq + PartialOrd { + // Required method + fn cmp(&self, other: &Self) -> Ordering; + + // Provided methods + fn max(self, other: Self) -> Self + where Self: Sized { ... } + fn min(self, other: Self) -> Self + where Self: Sized { ... } + fn clamp(self, min: Self, max: Self) -> Self + where Self: Sized + PartialOrd { ... } + } +*) +Module Ord. + Record RunImpl (Self : Set) (Self_ty : Ty.t) `{ToValue Self} : Set := { + cmp : {cmp @ + IsTraitMethod.t "core::cmp::Ord" Self_ty [] "cmp" cmp * + forall `(State.Trait) (state : State) (self other : Pointer.t Value.t), + HasRead.t (A := Self) state self φ -> + HasRead.t (A := Self) state other φ -> + {{ _, state | + cmp [] [ Value.Pointer self; Value.Pointer other ] ⇓ + fun (v : Ordering.t) => inl (φ v) + | fun state' => state' = state }} + }; + (* max : {max @ + IsTraitMethod.t "core::cmp::Ord" Self_ty [] "max" max * + forall (self other : Self), + {{ _, _ | + max [] [ φ self; φ other ] ⇓ + fun (v : Self) => inl (φ v) + | _ }} + }; *) + min : {min @ + IsTraitMethod.t "core::cmp::Ord" Self_ty [] "min" min * + forall (self other : Self), + {{ _, _ | + min [] [ φ self; φ other ] ⇓ + fun (v : Self) => inl (φ v) + | _ }} + }; + (* clamp : {clamp @ + IsTraitMethod.t "core::cmp::Ord" Self_ty [] "clamp" clamp * + forall (self min max : Self), + {{ _, _ | + clamp [] [ φ self; φ min; φ max ] ⇓ + fun (v : Self) => inl (φ v) + | _ }} + }; *) + }. +End Ord. + +Module Impl_core_cmp_Ord_for_u64. + Definition run_impl `{State.Trait} : Ord.RunImpl Z (Ty.path "u64"). + Proof. + constructor. + { (* cmp *) + eexists; split. + { eapply IsTraitMethod.Explicit. + { apply cmp.impls.Impl_core_cmp_Ord_for_u64.Implements. } + { reflexivity. } + } + { intros * [self H_self] [other H_other] **. + run_symbolic. + eapply Run.CallPrimitiveStateRead. { + apply H_self. + } + run_symbolic. + eapply Run.CallPrimitiveStateRead. { + apply H_other. + } + run_symbolic. + destruct (_ Self; - } -*) Module Default. - Class Trait (Self : Set) : Set := { - default : Self; + Record RunImpl (Self : Set) (Self_ty : Ty.t) `{ToValue Self} : Set := { + default : {default @ + IsTraitMethod.t "core::default::Default" Self_ty [] "default" default * + {{ _, _ | + default [] [] ⇓ + fun (v : Self) => inl (φ v) + | _ }} + }; }. End Default. + +Module Impl_core_default_Default_for_i64. + Definition run_impl : Default.RunImpl Z (Ty.path "i64"). + Proof. + constructor. + { eexists; split. + { eapply IsTraitMethod.Explicit. + { apply default.Impl_core_default_Default_for_i64.Implements. } + { reflexivity. } + } + { intros. + run_symbolic. + } + } + Defined. +End Impl_core_default_Default_for_i64. + +Module Impl_core_default_Default_for_u64. + Definition run_impl : Default.RunImpl Z (Ty.path "u64"). + Proof. + constructor. + { eexists; split. + { eapply IsTraitMethod.Explicit. + { apply default.Impl_core_default_Default_for_u64.Implements. } + { reflexivity. } + } + { intros. + run_symbolic. + } + } + Defined. +End Impl_core_default_Default_for_u64. diff --git a/CoqOfRust/core/simulations/intrinsics.v b/CoqOfRust/core/simulations/intrinsics.v index f2da2f1dc..2aae2338e 100644 --- a/CoqOfRust/core/simulations/intrinsics.v +++ b/CoqOfRust/core/simulations/intrinsics.v @@ -21,10 +21,12 @@ Axiom sub_with_overflow_u64_eq : end. Definition run_sub_with_overflow_u64_u64 (self rhs : Z) : - Run.pure (core.intrinsics.intrinsics.sub_with_overflow [Ty.path "u64"] [φ self; φ rhs]) - (fun (v : (Z * bool)) => inl (φ v)). + {{ _, _ | + core.intrinsics.intrinsics.sub_with_overflow [Ty.path "u64"] [φ self; φ rhs] ⇓ + (fun (v : (Z * bool)) => inl (φ v)) + | _ }}. Proof. - unfold Run.pure; intros. + intros. eapply Run.Rewrite. { rewrite sub_with_overflow_u64_eq; reflexivity. } diff --git a/CoqOfRust/core/simulations/option.v b/CoqOfRust/core/simulations/option.v index f52f6644e..64b50aa88 100644 --- a/CoqOfRust/core/simulations/option.v +++ b/CoqOfRust/core/simulations/option.v @@ -21,7 +21,7 @@ Module Impl_Option_T. Definition Self (T : Set) : Set := option T. - Definition unwrap_or_default {T : Set} + (* Definition unwrap_or_default {T : Set} {_ : core.simulations.default.Default.Trait T} (self : Self T) : T := @@ -39,12 +39,12 @@ Module Impl_Option_T. Definition unwrap {State A : Set} (self : option A) : MS? State string A := - expect self "". + expect self "". *) End Impl_Option_T. -Module Impl_Default_for_Option_T. +(* Module Impl_Default_for_Option_T. Global Instance I (T : Set) : core.simulations.default.Default.Trait (option T) := { default := None; }. -End Impl_Default_for_Option_T. +End Impl_Default_for_Option_T. *) diff --git a/CoqOfRust/core/slice/ascii.v b/CoqOfRust/core/slice/ascii.v index 22dcf21b8..968e23e66 100644 --- a/CoqOfRust/core/slice/ascii.v +++ b/CoqOfRust/core/slice/ascii.v @@ -98,8 +98,8 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let byte_ptr := M.alloc (| M.read (| self |) |) in - let ascii_ptr := M.alloc (| M.rust_cast (M.read (| byte_ptr |)) |) in + let~ byte_ptr := M.alloc (| M.read (| self |) |) in + let~ ascii_ptr := M.alloc (| M.rust_cast (M.read (| byte_ptr |)) |) in M.alloc (| M.read (| ascii_ptr |) |) |))) | _, _ => M.impossible @@ -245,7 +245,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -264,7 +264,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -276,7 +278,7 @@ Module slice. 0 |) in let byte := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -334,7 +336,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -353,7 +355,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -365,7 +369,7 @@ Module slice. 0 |) in let byte := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -455,8 +459,8 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let bytes := M.copy (| self |) in - let _ := + let~ bytes := M.copy (| self |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -492,7 +496,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| bytes, M.read (| rest |) |) in + let~ _ := M.write (| bytes, M.read (| rest |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -504,7 +508,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -542,8 +546,8 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let bytes := M.copy (| self |) in - let _ := + let~ bytes := M.copy (| self |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -579,7 +583,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| bytes, M.read (| rest |) |) in + let~ _ := M.write (| bytes, M.read (| rest |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -591,7 +595,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1164,7 +1168,7 @@ Module slice. ltac:(M.monadic (let bytes := M.alloc (| bytes |) in M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1178,7 +1182,7 @@ Module slice. let γ1_rev0 := M.SubPointer.get_slice_rev_index (| γ, 0 |) in let rest := M.alloc (| γ1_rest |) in let last := M.alloc (| γ1_rev0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1206,14 +1210,14 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| bytes, M.read (| rest |) |) in + let~ _ := M.write (| bytes, M.read (| rest |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1333,7 +1337,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1344,7 +1348,7 @@ Module slice. [ M.read (| s |) ] |) |) in - let align_offset := + let~ align_offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1365,7 +1369,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1421,7 +1425,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset_to_aligned := + let~ offset_to_aligned := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1440,7 +1444,7 @@ Module slice. ] |) |) in - let start := + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1451,7 +1455,7 @@ Module slice. [ M.read (| s |) ] |) |) in - let first_word := + let~ first_word := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1462,7 +1466,7 @@ Module slice. [ M.rust_cast (M.read (| start |)) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1484,7 +1488,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1493,7 +1497,7 @@ Module slice. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1532,7 +1536,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let word_ptr := + let~ word_ptr := M.alloc (| M.rust_cast (M.call_closure (| @@ -1544,8 +1548,8 @@ Module slice. [ M.read (| start |); M.read (| offset_to_aligned |) ] |)) |) in - let byte_pos := M.copy (| offset_to_aligned |) in - let _ := + let~ byte_pos := M.copy (| offset_to_aligned |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1554,7 +1558,7 @@ Module slice. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1607,7 +1611,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1620,22 +1624,21 @@ Module slice. (M.alloc (| BinOp.Pure.lt (M.read (| byte_pos |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) - |) - |)) + |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1647,7 +1650,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1658,15 +1661,14 @@ Module slice. (M.alloc (| UnOp.Pure.not (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| byte_pos |), - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| byte_pos |)) + (M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) - |) - |)) + |))) (M.read (| len |))) |)) in let _ := @@ -1698,7 +1700,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1710,7 +1712,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1766,7 +1768,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (Value.Tuple [])); + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + Value.Tuple [])); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1832,7 +1839,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let word := + let~ word := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1843,7 +1850,7 @@ Module slice. [ M.read (| word_ptr |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1873,21 +1880,20 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := byte_pos in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.write (| word_ptr, M.call_closure (| @@ -1905,7 +1911,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1916,7 +1922,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1925,7 +1931,7 @@ Module slice. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1941,11 +1947,10 @@ Module slice. (M.read (| len |)), ltac:(M.monadic (BinOp.Pure.le - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| byte_pos |) - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| byte_pos |))) (M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" @@ -1978,7 +1983,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let last_word := + let~ last_word := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1996,13 +2001,12 @@ Module slice. |), [ M.read (| start |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| M.get_constant (| "core::slice::ascii::is_ascii::USIZE_SIZE" |) - |) - |) + |)) ] |)) ] diff --git a/CoqOfRust/core/slice/cmp.v b/CoqOfRust/core/slice/cmp.v index 910d129cf..d8d7592d4 100644 --- a/CoqOfRust/core/slice/cmp.v +++ b/CoqOfRust/core/slice/cmp.v @@ -195,7 +195,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -356,7 +356,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -391,7 +391,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let size := + let~ size := M.alloc (| M.call_closure (| M.get_function (| @@ -478,7 +478,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let l := + let~ l := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -502,7 +502,7 @@ Module slice. ] |) |) in - let lhs := + let~ lhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -520,7 +520,7 @@ Module slice. ] |) |) in - let rhs := + let~ rhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -538,7 +538,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -563,7 +563,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -582,7 +582,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -625,6 +630,11 @@ Module slice. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -978,7 +988,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let l := + let~ l := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -1002,7 +1012,7 @@ Module slice. ] |) |) in - let lhs := + let~ lhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1020,7 +1030,7 @@ Module slice. ] |) |) in - let rhs := + let~ rhs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1038,7 +1048,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1063,7 +1073,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1082,7 +1092,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1118,7 +1133,13 @@ Module slice. |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.Tuple [] |))); + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (let non_eq := M.copy (| γ |) in @@ -1204,11 +1225,11 @@ Module slice. (let left := M.alloc (| left |) in let right := M.alloc (| right |) in M.read (| - let diff := + let~ diff := M.alloc (| - BinOp.Panic.sub (| - Integer.Isize, - M.rust_cast + BinOp.Wrap.sub + Integer.Isize + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1216,8 +1237,8 @@ Module slice. [] |), [ M.read (| left |) ] - |)), - M.rust_cast + |))) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1225,10 +1246,9 @@ Module slice. [] |), [ M.read (| right |) ] - |)) - |) + |))) |) in - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1283,7 +1303,7 @@ Module slice. ] |) |) in - let order := + let~ order := M.alloc (| M.rust_cast (M.call_closure (| @@ -1309,7 +1329,7 @@ Module slice. ] |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1320,7 +1340,7 @@ Module slice. (M.alloc (| BinOp.Pure.eq (M.read (| order |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := M.write (| order, M.read (| diff |) |) in + let~ _ := M.write (| order, M.read (| diff |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] @@ -1476,8 +1496,8 @@ Module slice. (let self := M.alloc (| self |) in let x := M.alloc (| x |) in M.read (| - let byte := M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |) in - let bytes := + let~ byte := M.alloc (| M.rust_cast (M.read (| M.read (| self |) |)) |) in + let~ bytes := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u8" ] |), diff --git a/CoqOfRust/core/slice/index.v b/CoqOfRust/core/slice/index.v index cddcc1955..2256702ed 100644 --- a/CoqOfRust/core/slice/index.v +++ b/CoqOfRust/core/slice/index.v @@ -873,7 +873,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -948,7 +948,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -1004,7 +1004,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1318,7 +1318,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1458,7 +1458,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1983,7 +1983,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2082,7 +2082,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_len := + let~ new_len := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), @@ -2157,7 +2157,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2256,7 +2256,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_len := + let~ new_len := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::unchecked_sub", [ Ty.path "usize" ] |), @@ -2329,7 +2329,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2478,7 +2478,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3103,7 +3103,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3194,7 +3194,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3641,7 +3641,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3723,7 +3723,7 @@ Module slice. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4140,7 +4140,7 @@ Module slice. (let range := M.alloc (| range |) in let bounds := M.alloc (| bounds |) in M.read (| - let len := + let~ len := M.copy (| M.SubPointer.get_struct_record_field (| bounds, @@ -4148,7 +4148,7 @@ Module slice. "end" |) |) in - let start := + let~ start := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4161,7 +4161,7 @@ Module slice. [ range ] |) |) in - let start := + let~ start := M.copy (| M.match_operator (| start, @@ -4224,11 +4224,14 @@ Module slice. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4241,7 +4244,7 @@ Module slice. [ range ] |) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| end_, @@ -4304,11 +4307,14 @@ Module slice. let γ0_0 := M.read (| γ0_0 |) in let end_ := M.copy (| γ0_0 |) in end_)); - fun γ => ltac:(M.monadic len) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + len)) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4329,7 +4335,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4396,7 +4402,7 @@ Module slice. let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in M.read (| - let start := + let~ start := M.copy (| M.match_operator (| start, @@ -4421,17 +4427,17 @@ Module slice. |) in let i := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| i |)) (Value.Integer 1) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| end_, @@ -4446,11 +4452,7 @@ Module slice. |) in let i := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| i |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -4462,7 +4464,11 @@ Module slice. |) in let i := M.copy (| γ0_0 |) in i)); - fun γ => ltac:(M.monadic len) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + len)) ] |) |) in @@ -4522,7 +4528,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let start := + let~ start := M.copy (| M.match_operator (| start, @@ -4620,11 +4626,18 @@ Module slice. val)) ] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::ops::range::Bound::Unbounded" + |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| end_, @@ -4722,7 +4735,14 @@ Module slice. |) in let end_ := M.copy (| γ0_0 |) in end_)); - fun γ => ltac:(M.monadic len) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::ops::range::Bound::Unbounded" + |) in + len)) ] |) |) in @@ -4788,7 +4808,7 @@ Module slice. let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in M.read (| - let start := + let~ start := M.copy (| M.match_operator (| start, @@ -4854,11 +4874,15 @@ Module slice. ] |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| end_, @@ -4924,7 +4948,11 @@ Module slice. |) in let end_ := M.copy (| γ0_0 |) in end_)); - fun γ => ltac:(M.monadic len) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| γ, "core::ops::range::Bound::Unbounded" |) in + len)) ] |) |) in diff --git a/CoqOfRust/core/slice/iter.v b/CoqOfRust/core/slice/iter.v index 487f9602e..fd812a23c 100644 --- a/CoqOfRust/core/slice/iter.v +++ b/CoqOfRust/core/slice/iter.v @@ -213,14 +213,14 @@ Module slice. ltac:(M.monadic (let slice := M.alloc (| slice |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "as_ptr", [] |), [ M.read (| slice |) ] |) |) in - let end_or_len := + let~ end_or_len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -552,7 +552,7 @@ Module slice. ltac:(M.monadic (let slice := M.alloc (| slice |) in M.read (| - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -563,7 +563,7 @@ Module slice. [ M.read (| slice |) ] |) |) in - let end_or_len := + let~ end_or_len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -682,7 +682,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -704,7 +704,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -821,7 +821,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -843,7 +843,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -1189,7 +1189,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1285,7 +1285,8 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::slice::iter::SplitIter", @@ -1306,7 +1307,7 @@ Module slice. 0 |) in let idx := M.copy (| γ0_0 |) in - let ret := + let~ ret := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -1338,7 +1339,7 @@ Module slice. |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1369,11 +1370,10 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1)) ] ] |) @@ -1433,9 +1433,9 @@ Module slice. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -1450,9 +1450,8 @@ Module slice. |) |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] ] |))) @@ -1504,7 +1503,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1600,7 +1599,8 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::slice::iter::SplitIter", @@ -1621,7 +1621,7 @@ Module slice. 0 |) in let idx := M.copy (| γ0_0 |) in - let ret := + let~ ret := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -1650,17 +1650,16 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1)) ] ] |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1746,7 +1745,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1825,7 +1824,7 @@ Module slice. (let slice := M.alloc (| slice |) in let pred := M.alloc (| pred |) in M.read (| - let finished := + let~ finished := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2029,7 +2028,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2054,7 +2053,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2149,11 +2148,10 @@ Module slice. fun γ => ltac:(M.monadic (let idx := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1))) ] |) | _ => M.impossible (||) @@ -2179,7 +2177,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2209,7 +2207,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2222,7 +2220,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -2251,7 +2249,7 @@ Module slice. |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2411,7 +2409,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2436,7 +2434,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let remainder := + let~ remainder := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2498,9 +2496,9 @@ Module slice. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -2515,9 +2513,8 @@ Module slice. |) |) ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) ] ] |) @@ -2525,7 +2522,7 @@ Module slice. ] |) |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2612,11 +2609,10 @@ Module slice. fun γ => ltac:(M.monadic (let idx := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1))) ] |) | _ => M.impossible (||) @@ -2627,7 +2623,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2640,7 +2636,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2653,7 +2649,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -2682,7 +2678,7 @@ Module slice. |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2900,7 +2896,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2981,7 +2977,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3077,7 +3073,8 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::slice::iter::SplitIter", @@ -3098,7 +3095,7 @@ Module slice. 0 |) in let idx := M.copy (| γ0_0 |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_function (| @@ -3124,11 +3121,7 @@ Module slice. |), [ M.read (| tmp |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| idx |)) (Value.Integer 1) ] |) |), @@ -3139,7 +3132,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3229,9 +3222,9 @@ Module slice. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -3246,9 +3239,8 @@ Module slice. |) |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] ] |))) @@ -3307,7 +3299,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3332,9 +3324,9 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let idx_opt := + let~ idx_opt := M.copy (| - let pred := + let~ pred := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3408,7 +3400,8 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::slice::iter::SplitIter", @@ -3429,7 +3422,7 @@ Module slice. 0 |) in let idx := M.copy (| γ0_0 |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_function (| @@ -3463,7 +3456,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3558,7 +3551,7 @@ Module slice. (let slice := M.alloc (| slice |) in let pred := M.alloc (| pred |) in M.read (| - let finished := + let~ finished := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3709,7 +3702,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3734,9 +3727,9 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let idx_opt := + let~ idx_opt := M.copy (| - let pred := + let~ pred := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3805,7 +3798,7 @@ Module slice. |) |) |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3836,11 +3829,10 @@ Module slice. fun γ => ltac:(M.monadic (let idx := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1))) ] |) | _ => M.impossible (||) @@ -3866,7 +3858,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3896,7 +3888,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3909,7 +3901,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_function (| @@ -3943,7 +3935,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4096,7 +4088,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4121,7 +4113,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let idx_opt := + let~ idx_opt := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4156,7 +4148,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let pred := + (let~ pred := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4164,7 +4156,7 @@ Module slice. "pred" |) |) in - let remainder := + let~ remainder := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4190,9 +4182,9 @@ Module slice. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -4207,9 +4199,8 @@ Module slice. |) |) ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) ] ] |) @@ -4273,7 +4264,7 @@ Module slice. ] |) |) in - let idx := + let~ idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4304,11 +4295,10 @@ Module slice. fun γ => ltac:(M.monadic (let idx := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - Value.Integer 1 - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (Value.Integer 1))) ] |) | _ => M.impossible (||) @@ -4319,7 +4309,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4332,7 +4322,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4345,7 +4335,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_function (| @@ -4379,7 +4369,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5207,7 +5197,7 @@ Module slice. ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5216,7 +5206,7 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -5238,7 +5228,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5247,7 +5237,7 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -6050,7 +6040,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let ret := + (let~ ret := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -6100,7 +6090,7 @@ Module slice. |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6206,13 +6196,13 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let size := + (let~ size := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6227,8 +6217,8 @@ Module slice. |) |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6243,10 +6233,8 @@ Module slice. |) |) ] - |) - |), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in M.alloc (| Value.Tuple @@ -6373,7 +6361,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6385,7 +6373,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let nth := + (let~ nth := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6413,7 +6401,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6444,11 +6432,10 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| n |)) + (Value.Integer 1)) ] ] |) @@ -6527,11 +6514,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let start := + (let~ start := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6546,8 +6533,8 @@ Module slice. |) |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6562,8 +6549,7 @@ Module slice. |) |) ] - |) - |) + |)) |) in M.alloc (| Value.StructTuple @@ -6749,7 +6735,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let ret := + (let~ ret := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -6778,9 +6764,9 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6795,8 +6781,8 @@ Module slice. |) |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -6811,14 +6797,13 @@ Module slice. |) |) ] - |) - |)) + |))) ] ] |) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6846,9 +6831,9 @@ Module slice. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -6863,9 +6848,8 @@ Module slice. |) |) ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) ] ] |) @@ -6961,7 +6945,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -6973,7 +6957,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let ret := + (let~ ret := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6999,10 +6983,10 @@ Module slice. "core::ops::range::Range" [ ("start", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::num::nonzero::NonZeroUsize", "get", @@ -7017,14 +7001,13 @@ Module slice. |) |) ] - |) - |)); + |))); ("end_", M.read (| end_ |)) ] ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7055,11 +7038,10 @@ Module slice. "core::ops::range::RangeTo" [ ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (Value.Integer 1)) ] ] |) @@ -7345,7 +7327,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let chunksz := + (let~ chunksz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -7403,7 +7385,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7477,11 +7459,11 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let n := + (let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -7496,21 +7478,20 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Chunks", "chunk_size" |) - |) - |) + |)) |) in - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -7525,17 +7506,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Chunks", "chunk_size" |) - |) - |) + |)) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7553,11 +7533,7 @@ Module slice. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic n) ] @@ -7683,7 +7659,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7695,7 +7671,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.match_operator (| M.alloc (| @@ -7756,7 +7732,12 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -7777,7 +7758,7 @@ Module slice. ] |) |) in - let nth := + let~ nth := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7806,7 +7787,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -7896,15 +7877,15 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let start := + (let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -7919,25 +7900,22 @@ Module slice. |) |) ] - |), - Value.Integer 1 - |), - M.read (| + |)) + (Value.Integer 1)) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::slice::iter::Chunks", "chunk_size" |) - |) - |), - M.read (| + |))) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::slice::iter::Chunks", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| Value.StructTuple @@ -8000,21 +7978,20 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let start := + let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Chunks", "chunk_size" |) - |) - |) + |)) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -8169,11 +8146,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let remainder := + (let~ remainder := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -8188,17 +8165,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Chunks", "chunk_size" |) - |) - |) + |)) |) in - let chunksz := + let~ chunksz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8242,9 +8218,9 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -8259,9 +8235,8 @@ Module slice. |) |) ] - |), - M.read (| chunksz |) - |) + |)) + (M.read (| chunksz |)) ] |) |), @@ -8272,7 +8247,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8318,7 +8293,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8341,7 +8316,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8353,29 +8328,23 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let start := + (let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - M.read (| n |) - |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1)) + (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::Chunks", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| M.alloc (| @@ -8429,7 +8398,9 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], @@ -8450,7 +8421,7 @@ Module slice. ] |) |) in - let nth_back := + let~ nth_back := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8474,7 +8445,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8753,7 +8724,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let sz := + (let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -8811,7 +8782,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -8885,11 +8856,11 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let n := + (let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -8904,21 +8875,20 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -8933,17 +8903,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -8961,11 +8930,7 @@ Module slice. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic n) ] @@ -9097,7 +9062,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9109,7 +9074,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.match_operator (| M.alloc (| @@ -9172,7 +9137,12 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -9244,7 +9214,7 @@ Module slice. M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let nth := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9317,15 +9287,15 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let start := + (let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -9340,25 +9310,22 @@ Module slice. |) |) ] - |), - Value.Integer 1 - |), - M.read (| + |)) + (Value.Integer 1)) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::slice::iter::ChunksMut", "chunk_size" |) - |) - |), - M.read (| + |))) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::slice::iter::ChunksMut", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| Value.StructTuple @@ -9418,23 +9385,22 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let start := + let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -9584,11 +9550,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let remainder := + (let~ remainder := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -9603,17 +9569,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let sz := + let~ sz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -9641,7 +9606,7 @@ Module slice. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9676,7 +9641,7 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| sz |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| sz |)) ] |) |), @@ -9687,7 +9652,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9737,7 +9702,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9760,7 +9725,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9772,29 +9737,23 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let start := + (let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - M.read (| n |) - |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1)) + (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| M.alloc (| @@ -9850,7 +9809,9 @@ Module slice. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply @@ -9920,7 +9881,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let nth_back := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10142,27 +10103,25 @@ Module slice. (let slice := M.alloc (| slice |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |), - M.read (| chunk_size |) - |) + |)) + (M.read (| chunk_size |)) |) in - let fst_len := + let~ fst_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |), - M.read (| rem |) - |) + |)) + (M.read (| rem |)) |) in M.match_operator (| M.alloc (| @@ -10378,7 +10337,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10411,11 +10370,11 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| @@ -10426,15 +10385,14 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple @@ -10550,7 +10508,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10588,7 +10546,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10660,19 +10618,18 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let start := + let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| M.call_closure (| @@ -10807,9 +10764,9 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -10824,15 +10781,14 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |) - |) + |)) ] |) |), @@ -10843,7 +10799,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10886,7 +10842,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10909,7 +10865,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10921,43 +10877,36 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let start := + (let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - M.read (| n |) - |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1)) + (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExact", "chunk_size" |) - |) - |) + |)) |) in - let nth_back := + let~ nth_back := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10981,7 +10930,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11235,27 +11184,25 @@ Module slice. (let slice := M.alloc (| slice |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |), - M.read (| chunk_size |) - |) + |)) + (M.read (| chunk_size |)) |) in - let fst_len := + let~ fst_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |), - M.read (| rem |) - |) + |)) + (M.read (| rem |)) |) in M.match_operator (| M.alloc (| @@ -11419,7 +11366,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11452,11 +11399,11 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -11471,15 +11418,14 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple @@ -11598,7 +11544,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11638,7 +11584,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11710,19 +11656,18 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let start := + let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| M.call_closure (| @@ -11859,9 +11804,9 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -11876,15 +11821,14 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" |) - |) - |) + |)) ] |) |), @@ -11895,7 +11839,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11942,7 +11886,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11965,7 +11909,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11977,41 +11921,34 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let start := + (let~ start := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - M.read (| n |) - |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1)) + (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in M.match_operator (| M.alloc (| @@ -12067,7 +12004,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let nth_back := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12412,7 +12349,7 @@ Module slice. ltac:(M.monadic (let slice := M.alloc (| slice |) in M.read (| - let num_windows := + let~ num_windows := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), @@ -12421,11 +12358,10 @@ Module slice. M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.get_constant (| "core::slice::iter::N" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::slice::iter::N" |) |)) + (Value.Integer 1) ] |) |) in @@ -12488,7 +12424,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12519,7 +12455,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12538,7 +12474,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12563,7 +12499,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12572,7 +12508,7 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) |))) @@ -12662,7 +12598,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12686,7 +12622,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12702,7 +12638,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12731,7 +12667,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12752,11 +12688,11 @@ Module slice. "slice_head" |) |); - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12765,11 +12701,10 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1)) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) |))) @@ -12926,7 +12861,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12957,7 +12892,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12980,23 +12915,22 @@ Module slice. "slice_head" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13005,7 +12939,7 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) |))) @@ -13035,7 +12969,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13059,7 +12993,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13075,7 +13009,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret := + let~ ret := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13098,23 +13032,22 @@ Module slice. "slice_head" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::ArrayWindows", "num" |) - |), - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) - |) + |)) + (BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1)) ] |) ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -13123,11 +13056,10 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| Integer.Usize, M.read (| n |), Value.Integer 1 |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1)) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| ret |) ] |) |))) @@ -14554,7 +14486,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let len := + (let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14573,7 +14505,7 @@ Module slice. ] |) |) in - let chunksz := + let~ chunksz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -14605,11 +14537,7 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| chunksz |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| chunksz |)) ] |) |), @@ -14620,7 +14548,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -14694,11 +14622,11 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let n := + (let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -14713,21 +14641,20 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunks", "chunk_size" |) - |) - |) + |)) |) in - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -14742,17 +14669,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunks", "chunk_size" |) - |) - |) + |)) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -14770,11 +14696,7 @@ Module slice. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic n) ] @@ -14902,7 +14824,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -14914,11 +14836,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -14933,11 +14855,10 @@ Module slice. |) |) ] - |), - M.read (| end_ |) - |) + |)) + (M.read (| end_ |)) |) in - let start := + let~ start := M.copy (| M.match_operator (| M.alloc (| @@ -14970,11 +14891,18 @@ Module slice. |) in let sum := M.copy (| γ0_0 |) in sum)); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in - let nth := + let~ nth := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15003,7 +14931,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -15094,11 +15022,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let rem := + (let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -15113,17 +15041,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::slice::iter::RChunks", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -15202,11 +15129,11 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| @@ -15217,21 +15144,19 @@ Module slice. |) |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunks", "chunk_size" |) - |) - |) - |) + |))) |) in - let start := + let~ start := M.copy (| M.match_operator (| M.alloc (| @@ -15250,7 +15175,10 @@ Module slice. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 0 |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -15290,7 +15218,7 @@ Module slice. M.read (| start |) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| end_ |)) (M.read (| start |)) ] |) |) @@ -15369,11 +15297,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let remainder := + (let~ remainder := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -15388,17 +15316,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunks", "chunk_size" |) - |) - |) + |)) |) in - let chunksz := + let~ chunksz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -15453,7 +15380,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -15498,7 +15425,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15521,7 +15448,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -15533,33 +15460,27 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let offset_from_end := + (let~ offset_from_end := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - M.read (| n |) - |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1)) + (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunks", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -15574,11 +15495,10 @@ Module slice. |) |) ] - |), - M.read (| offset_from_end |) - |) + |)) + (M.read (| offset_from_end |)) |) in - let start := + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), @@ -15594,7 +15514,7 @@ Module slice. ] |) |) in - let nth_back := + let~ nth_back := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15618,7 +15538,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -15902,7 +15822,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let sz := + (let~ sz := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -15933,7 +15853,7 @@ Module slice. ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15968,7 +15888,7 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| sz |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| sz |)) ] |) |), @@ -15979,7 +15899,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16053,11 +15973,11 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let n := + (let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -16072,21 +15992,20 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -16101,17 +16020,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -16129,11 +16047,7 @@ Module slice. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| n |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic n) ] @@ -16269,7 +16183,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16281,11 +16195,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") @@ -16302,11 +16216,10 @@ Module slice. |) |) ] - |), - M.read (| end_ |) - |) + |)) + (M.read (| end_ |)) |) in - let start := + let~ start := M.copy (| M.match_operator (| M.alloc (| @@ -16339,7 +16252,14 @@ Module slice. |) in let sum := M.copy (| γ0_0 |) in sum)); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| Value.Integer 0 |))) ] |) |) in @@ -16384,11 +16304,10 @@ Module slice. |), [ M.read (| tail |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - M.read (| start |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (M.read (| start |)) ] |) |), @@ -16399,7 +16318,7 @@ Module slice. M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let nth := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16473,11 +16392,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let rem := + (let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -16492,17 +16411,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::slice::iter::RChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -16579,11 +16497,11 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -16598,21 +16516,19 @@ Module slice. |) |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "chunk_size" |) - |) - |) - |) + |))) |) in - let start := + let~ start := M.copy (| M.match_operator (| M.alloc (| @@ -16631,7 +16547,10 @@ Module slice. |) |), [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))); + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 0 |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -16671,7 +16590,7 @@ Module slice. M.read (| start |) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| end_ |)) (M.read (| start |)) ] |) |) @@ -16751,11 +16670,11 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let remainder := + (let~ remainder := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -16770,17 +16689,16 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let sz := + let~ sz := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -16835,7 +16753,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16884,7 +16802,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16907,7 +16825,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -16919,33 +16837,27 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let offset_from_end := + (let~ offset_from_end := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |), - M.read (| n |) - |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1)) + (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksMut", "chunk_size" |) - |) - |) + |)) |) in - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -16960,11 +16872,10 @@ Module slice. |) |) ] - |), - M.read (| offset_from_end |) - |) + |)) + (M.read (| offset_from_end |)) |) in - let start := + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), @@ -17026,7 +16937,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let nth_back := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -17247,16 +17158,15 @@ Module slice. (let slice := M.alloc (| slice |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |), - M.read (| chunk_size |) - |) + |)) + (M.read (| chunk_size |)) |) in M.match_operator (| M.alloc (| @@ -17455,9 +17365,9 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -17472,15 +17382,14 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |) - |) + |)) ] |) |), @@ -17491,7 +17400,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -17524,11 +17433,11 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| @@ -17539,15 +17448,14 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple @@ -17663,7 +17571,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -17691,9 +17599,9 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -17708,9 +17616,8 @@ Module slice. |) |) ] - |), - M.read (| end_ |) - |) + |)) + (M.read (| end_ |)) ] |) |), @@ -17720,7 +17627,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -17793,11 +17700,11 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| @@ -17808,33 +17715,30 @@ Module slice. |) |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |) - |) - |) + |))) |) in - let start := + let~ start := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| M.call_closure (| @@ -17986,7 +17890,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in let snd := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18032,7 +17936,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18055,7 +17959,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18067,25 +17971,24 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let offset := + (let~ offset := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| n |) |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |) - |) + |)) |) in - let start := + let~ start := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -18100,25 +18003,23 @@ Module slice. |) |) ] - |), - M.read (| offset |) - |) + |)) + (M.read (| offset |)) |) in - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExact", "chunk_size" |) - |) - |) + |)) |) in - let nth_back := + let~ nth_back := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18142,7 +18043,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18385,16 +18286,15 @@ Module slice. (let slice := M.alloc (| slice |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let rem := + let~ rem := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |), - M.read (| chunk_size |) - |) + |)) + (M.read (| chunk_size |)) |) in M.match_operator (| M.alloc (| @@ -18525,7 +18425,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let len := + (let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18560,17 +18460,16 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |) - |) + |)) ] |) |), @@ -18581,7 +18480,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18614,11 +18513,11 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let n := + let~ n := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -18633,15 +18532,14 @@ Module slice. |) |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple @@ -18761,7 +18659,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18773,7 +18671,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let len := + (let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18812,11 +18710,10 @@ Module slice. "v" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| end_ |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| end_ |)) ] |) |), @@ -18826,7 +18723,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let fst := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -18899,11 +18796,11 @@ Module slice. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -18918,33 +18815,30 @@ Module slice. |) |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| idx |), - M.read (| + |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| idx |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |) - |) - |) + |))) |) in - let start := + let~ start := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in M.alloc (| M.call_closure (| @@ -19098,7 +18992,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -19148,7 +19042,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19171,7 +19065,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| n |)) (M.read (| len |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -19183,25 +19077,24 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let offset := + (let~ offset := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| n |) |), - M.read (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| n |))) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in - let start := + let~ start := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ Ty.apply (Ty.path "slice") [ T ] ], "len", @@ -19216,23 +19109,21 @@ Module slice. |) |) ] - |), - M.read (| offset |) - |) + |)) + (M.read (| offset |)) |) in - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::iter::RChunksExactMut", "chunk_size" |) - |) - |) + |)) |) in M.match_operator (| M.alloc (| @@ -19280,7 +19171,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let nth_back := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -19603,8 +19494,8 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer 1 |) in - let iter := + (let~ len := M.alloc (| Value.Integer 1 |) in + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -19624,7 +19515,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -19696,11 +19587,10 @@ Module slice. let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -19714,7 +19604,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -19752,7 +19642,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -19946,8 +19836,8 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer 1 |) in - let iter := + (let~ len := M.alloc (| Value.Integer 1 |) in + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -19967,7 +19857,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -20039,11 +19929,10 @@ Module slice. let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -20057,7 +19946,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -20084,9 +19973,9 @@ Module slice. "slice" |) |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", @@ -20101,9 +19990,8 @@ Module slice. |) |) ] - |), - M.read (| len |) - |) + |)) + (M.read (| len |)) ] |) |), @@ -20114,7 +20002,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -20319,8 +20207,8 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer 1 |) in - let iter := + (let~ len := M.alloc (| Value.Integer 1 |) in + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -20340,7 +20228,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -20412,11 +20300,10 @@ Module slice. let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -20430,7 +20317,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -20441,7 +20328,7 @@ Module slice. ] |))) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_function (| @@ -20475,7 +20362,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -20670,8 +20557,8 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let len := M.alloc (| Value.Integer 1 |) in - let iter := + (let~ len := M.alloc (| Value.Integer 1 |) in + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -20691,7 +20578,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -20763,11 +20650,10 @@ Module slice. let β := len in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -20781,7 +20667,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -20792,7 +20678,7 @@ Module slice. ] |))) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_function (| @@ -20818,18 +20704,17 @@ Module slice. |), [ M.read (| slice |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| slice |) ] - |), - M.read (| len |) - |) + |)) + (M.read (| len |)) ] |) |), @@ -20840,7 +20725,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let head := M.copy (| γ0_0 |) in let tail := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/core/slice/iter/macros.v b/CoqOfRust/core/slice/iter/macros.v index e2471efc2..0a8f02710 100644 --- a/CoqOfRust/core/slice/iter/macros.v +++ b/CoqOfRust/core/slice/iter/macros.v @@ -51,7 +51,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -73,7 +73,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -144,7 +144,7 @@ Module slice. (let self := M.alloc (| self |) in let offset := M.alloc (| offset |) in M.read (| - let old := + let~ old := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -152,8 +152,8 @@ Module slice. "ptr" |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -163,7 +163,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -189,7 +189,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let _end := + (let~ _end := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -277,7 +277,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -294,7 +294,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| len |), M.call_closure (| @@ -309,7 +309,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -326,7 +326,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| end_ |), M.call_closure (| @@ -373,7 +373,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -395,7 +395,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -457,7 +457,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -479,7 +479,7 @@ Module slice. M.alloc (| BinOp.Pure.eq (M.read (| len |)) (Value.Integer 0) |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -582,7 +582,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -606,7 +606,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -695,7 +695,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let exact := + let~ exact := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -706,7 +706,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -728,7 +728,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -798,7 +798,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -820,7 +820,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -889,7 +889,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -916,7 +916,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -938,7 +938,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -991,7 +991,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1007,7 +1007,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1029,7 +1029,7 @@ Module slice. M.write (| M.read (| len |), Value.Integer 0 |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1069,7 +1069,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1126,7 +1126,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let advance := + let~ advance := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -1147,7 +1147,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1169,7 +1169,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -1214,7 +1214,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1250,7 +1250,7 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| advance |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -1329,7 +1329,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1352,7 +1352,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1376,7 +1376,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -1434,9 +1434,9 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let acc := M.copy (| init |) in - let i := M.alloc (| Value.Integer 0 |) in - let len := + let~ acc := M.copy (| init |) in + let~ i := M.alloc (| Value.Integer 0 |) in + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1451,7 +1451,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1473,7 +1473,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -1514,10 +1514,10 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.write (| acc, M.call_closure (| @@ -1563,7 +1563,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| i, M.call_closure (| @@ -1643,7 +1643,7 @@ Module slice. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1662,7 +1662,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -1699,7 +1699,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1765,7 +1765,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1806,7 +1806,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1871,7 +1871,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1912,7 +1912,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1990,7 +1990,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2031,7 +2031,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2103,7 +2103,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2149,7 +2149,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2164,7 +2164,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2186,7 +2186,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -2227,8 +2227,8 @@ Module slice. ] |) |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2256,7 +2256,7 @@ Module slice. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2284,7 +2284,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2309,15 +2309,11 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2325,7 +2321,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2371,7 +2367,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2386,7 +2382,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2408,7 +2404,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -2449,8 +2445,8 @@ Module slice. ] |) |) in - let i := M.copy (| n |) in - let _ := + let~ i := M.copy (| n |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2478,15 +2474,11 @@ Module slice. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2515,7 +2507,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2545,7 +2537,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2767,7 +2759,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2791,7 +2783,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -2894,7 +2886,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2921,7 +2913,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2943,7 +2935,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -2996,7 +2988,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3012,7 +3004,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3034,7 +3026,7 @@ Module slice. M.write (| M.read (| len |), Value.Integer 0 |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3076,7 +3068,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3133,7 +3125,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let advance := + let~ advance := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -3154,7 +3146,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3176,7 +3168,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -3221,7 +3213,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3257,7 +3249,7 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| advance |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -3437,7 +3429,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3459,7 +3451,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -3530,7 +3522,7 @@ Module slice. (let self := M.alloc (| self |) in let offset := M.alloc (| offset |) in M.read (| - let old := + let~ old := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3538,8 +3530,8 @@ Module slice. "ptr" |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3549,7 +3541,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3575,7 +3567,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let _end := + (let~ _end := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3663,7 +3655,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3680,7 +3672,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| len |), M.call_closure (| @@ -3695,7 +3687,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3712,7 +3704,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| end_ |), M.call_closure (| @@ -3759,7 +3751,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3781,7 +3773,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -3843,7 +3835,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3865,7 +3857,7 @@ Module slice. M.alloc (| BinOp.Pure.eq (M.read (| len |)) (Value.Integer 0) |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -3968,7 +3960,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3992,7 +3984,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -4081,7 +4073,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let exact := + let~ exact := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4092,7 +4084,7 @@ Module slice. M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4114,7 +4106,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -4184,7 +4176,7 @@ Module slice. (let γ := M.use (M.get_constant (| "core::mem::SizedTypeProperties::IS_ZST" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4206,7 +4198,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -4275,7 +4267,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4302,7 +4294,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4324,7 +4316,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -4377,7 +4369,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4393,7 +4385,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4415,7 +4407,7 @@ Module slice. M.write (| M.read (| len |), Value.Integer 0 |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4455,7 +4447,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4512,7 +4504,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let advance := + let~ advance := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -4533,7 +4525,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4555,7 +4547,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -4600,7 +4592,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4636,7 +4628,7 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| advance |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" @@ -4715,7 +4707,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4738,7 +4730,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4762,7 +4754,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -4820,9 +4812,9 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let acc := M.copy (| init |) in - let i := M.alloc (| Value.Integer 0 |) in - let len := + let~ acc := M.copy (| init |) in + let~ i := M.alloc (| Value.Integer 0 |) in + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4837,7 +4829,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4859,7 +4851,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -4900,10 +4892,10 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.write (| acc, M.call_closure (| @@ -4949,7 +4941,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| i, M.call_closure (| @@ -5029,7 +5021,7 @@ Module slice. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5048,7 +5040,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -5085,7 +5077,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5152,7 +5144,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5193,7 +5185,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5258,7 +5250,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5299,7 +5291,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5377,7 +5369,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5418,7 +5410,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5490,7 +5482,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5536,7 +5528,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5551,7 +5543,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5573,7 +5565,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -5614,8 +5606,8 @@ Module slice. ] |) |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5643,7 +5635,7 @@ Module slice. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5672,7 +5664,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5697,15 +5689,11 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -5713,7 +5701,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5759,7 +5747,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let n := + let~ n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5774,7 +5762,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5796,7 +5784,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -5837,8 +5825,8 @@ Module slice. ] |) |) in - let i := M.copy (| n |) in - let _ := + let~ i := M.copy (| n |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5866,15 +5854,11 @@ Module slice. 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5903,7 +5887,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5933,7 +5917,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6071,7 +6055,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6095,7 +6079,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -6198,7 +6182,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6225,7 +6209,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6247,7 +6231,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -6300,7 +6284,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6316,7 +6300,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6338,7 +6322,7 @@ Module slice. M.write (| M.read (| len |), Value.Integer 0 |))); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6380,7 +6364,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6437,7 +6421,7 @@ Module slice. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let advance := + let~ advance := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -6458,7 +6442,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6480,7 +6464,7 @@ Module slice. len)); fun γ => ltac:(M.monadic - (let end_ := + (let~ end_ := M.copy (| M.call_closure (| M.get_associated_function (| @@ -6525,7 +6509,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6561,7 +6545,7 @@ Module slice. "new", [] |), - [ BinOp.Panic.sub (| Integer.Usize, M.read (| n |), M.read (| advance |) |) ] + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (M.read (| advance |)) ] |); Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ]; M.constructor_as_closure "core::result::Result::Err" diff --git a/CoqOfRust/core/slice/memchr.v b/CoqOfRust/core/slice/memchr.v index 2c72deb5c..9a7e4b1cb 100644 --- a/CoqOfRust/core/slice/memchr.v +++ b/CoqOfRust/core/slice/memchr.v @@ -78,7 +78,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -96,13 +96,12 @@ Module slice. |), [ M.read (| text |) ] |)) - (BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| M.get_constant (| "core::slice::memchr::USIZE_BYTES" |) - |) - |)) + |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -159,8 +158,8 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -187,7 +186,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -224,15 +223,11 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -240,7 +235,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -320,7 +315,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -331,7 +326,7 @@ Module slice. [ M.read (| text |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -342,7 +337,7 @@ Module slice. [ M.read (| text |) ] |) |) in - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -356,7 +351,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -369,7 +364,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| offset, M.read (| @@ -394,7 +389,7 @@ Module slice. |) |) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_function (| @@ -453,14 +448,14 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let repeated_x := + let~ repeated_x := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u8", [] |), [ M.read (| x |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -473,25 +468,23 @@ Module slice. (M.alloc (| BinOp.Pure.le (M.read (| offset |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| M.get_constant (| "core::slice::memchr::USIZE_BYTES" |) - |) - |) - |)) + |)))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let u := + let~ _ := + let~ u := M.copy (| M.rust_cast (M.call_closure (| @@ -503,7 +496,7 @@ Module slice. [ M.read (| ptr |); M.read (| offset |) ] |)) |) in - let v := + let~ v := M.copy (| M.rust_cast (M.call_closure (| @@ -514,19 +507,18 @@ Module slice. |), [ M.read (| ptr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (M.read (| M.get_constant (| "core::slice::memchr::USIZE_BYTES" |) - |) - |) + |)) ] |)) |) in - let zu := + let~ zu := M.alloc (| M.call_closure (| M.get_function (| @@ -540,7 +532,7 @@ Module slice. ] |) |) in - let zv := + let~ zv := M.alloc (| M.call_closure (| M.get_function (| @@ -578,21 +570,19 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := offset in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| M.get_constant (| "core::slice::memchr::USIZE_BYTES" |) - |), - Value.Integer 2 - |) - |) + |)) + (Value.Integer 2)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -600,7 +590,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -611,7 +601,7 @@ Module slice. ] |))) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u8" ] |), @@ -634,18 +624,17 @@ Module slice. M.read (| offset |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| text |) ] - |), - M.read (| offset |) - |) + |)) + (M.read (| offset |)) ] |) |) in @@ -671,13 +660,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::Some" - [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - M.read (| i |) - |) - ] + [ BinOp.Wrap.add Integer.Usize (M.read (| offset |)) (M.read (| i |)) ] |))); fun γ => ltac:(M.monadic @@ -754,7 +737,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -765,7 +748,7 @@ Module slice. [ M.read (| text |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -807,18 +790,17 @@ Module slice. |), [ M.read (| prefix |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| suffix |) ] - |) - |) + |)) ] |))) ] @@ -830,8 +812,8 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let min_aligned_offset := M.copy (| γ0_0 |) in let max_aligned_offset := M.copy (| γ0_1 |) in - let offset := M.copy (| max_aligned_offset |) in - let _ := + let~ offset := M.copy (| max_aligned_offset |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -920,11 +902,10 @@ Module slice. Value.StructTuple "core::option::Option::Some" [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - M.read (| index |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (M.read (| index |)) ] |) |) @@ -933,21 +914,21 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let repeated_x := + let~ repeated_x := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "repeat_u8", [] |), [ M.read (| x |) ] |) |) in - let chunk_bytes := + let~ chunk_bytes := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -967,8 +948,8 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := - let u := + let~ _ := + let~ u := M.copy (| M.rust_cast (M.call_closure (| @@ -979,19 +960,17 @@ Module slice. |), [ M.read (| ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| offset |), - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| chunk_bytes |) - |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| offset |)) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| chunk_bytes |))) ] |)) |) in - let v := + let~ v := M.copy (| M.rust_cast (M.call_closure (| @@ -1002,15 +981,14 @@ Module slice. |), [ M.read (| ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| offset |), - M.read (| chunk_bytes |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| offset |)) + (M.read (| chunk_bytes |)) ] |)) |) in - let zu := + let~ zu := M.alloc (| M.call_closure (| M.get_function (| @@ -1024,7 +1002,7 @@ Module slice. ] |) |) in - let zv := + let~ zv := M.alloc (| M.call_closure (| M.get_function (| @@ -1062,19 +1040,17 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := offset in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| chunk_bytes |) - |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| chunk_bytes |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1082,7 +1058,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/slice/mod.v b/CoqOfRust/core/slice/mod.v index 34385a9f0..7ec4546f4 100644 --- a/CoqOfRust/core/slice/mod.v +++ b/CoqOfRust/core/slice/mod.v @@ -57,6 +57,8 @@ Module slice. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::ops::range::Bound::Unbounded" |) in let γ1_0 := M.SubPointer.get_struct_tuple_field (| γ0_1, @@ -75,6 +77,8 @@ Module slice. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::ops::range::Bound::Unbounded" |) in let γ1_0 := M.SubPointer.get_struct_tuple_field (| γ0_1, @@ -177,6 +181,8 @@ Module slice. 0 |) in let i := M.copy (| γ1_0 |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::ops::range::Bound::Unbounded" |) in M.alloc (| Value.Tuple [ @@ -272,6 +278,8 @@ Module slice. 0 |) in let i := M.copy (| γ1_0 |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::ops::range::Bound::Unbounded" |) in M.alloc (| Value.Tuple [ @@ -1067,18 +1075,17 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::split_last_chunk::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::split_last_chunk::N" |) |)) ] |) |), @@ -1179,20 +1186,19 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::slice::split_last_chunk_mut::N" |) - |) - |) + |)) ] |) |), @@ -1279,7 +1285,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let last := + (let~ last := M.copy (| M.SubPointer.get_tuple_field (| M.alloc (| @@ -1291,18 +1297,17 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::last_chunk::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::last_chunk::N" |) |)) ] |) |), @@ -1380,7 +1385,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic - (let last := + (let~ last := M.alloc (| M.read (| M.SubPointer.get_tuple_field (| @@ -1393,20 +1398,19 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::slice::last_chunk_mut::N" |) - |) - |) + |)) ] |) |), @@ -1640,14 +1644,14 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let start := + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "as_ptr", [] |), [ M.read (| self |) ] |) |) in - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*const") [ T ], "add", [] |), @@ -1688,7 +1692,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let start := + let~ start := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1699,7 +1703,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let end_ := + let~ end_ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -1749,9 +1753,9 @@ Module slice. let a := M.alloc (| a |) in let b := M.alloc (| b |) in M.read (| - let pa := M.alloc (| M.SubPointer.get_array_field (| M.read (| self |), a |) |) in - let pb := M.alloc (| M.SubPointer.get_array_field (| M.read (| self |), b |) |) in - let _ := + let~ pa := M.alloc (| M.SubPointer.get_array_field (| M.read (| self |), a |) |) in + let~ pb := M.alloc (| M.SubPointer.get_array_field (| M.read (| self |), b |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::swap", [ T ] |), @@ -1790,7 +1794,7 @@ Module slice. let a := M.alloc (| a |) in let b := M.alloc (| b |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1872,7 +1876,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1883,7 +1887,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::swap", [ T ] |), @@ -1957,16 +1961,15 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let half_len := + let~ half_len := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - Value.Integer 2 - |) + |)) + (Value.Integer 2) |) in M.match_operator (| M.alloc (| @@ -2027,7 +2030,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let front_half := M.copy (| γ0_0 |) in let back_half := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Self, "revswap.reverse", [] |), @@ -2117,7 +2120,7 @@ Module slice. (let self := M.alloc (| self |) in let size := M.alloc (| size |) in M.read (| - let size := + let~ size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2172,7 +2175,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2244,7 +2247,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2316,7 +2319,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2388,7 +2391,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2466,7 +2469,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2493,22 +2496,21 @@ Module slice. (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::slice::as_chunks_unchecked::N" |) - |) - |)) + |))) (Value.Integer 0))) |)) |)) in @@ -2553,7 +2555,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_len := + let~ new_len := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::exact_div", [ Ty.path "usize" ] |), @@ -2620,7 +2622,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2662,16 +2664,15 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::as_chunks::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::as_chunks::N" |) |)) |) in M.match_operator (| M.alloc (| @@ -2679,11 +2680,10 @@ Module slice. M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "split_at", [] |), [ M.read (| self |); - BinOp.Panic.mul (| - Integer.Usize, - M.read (| len |), - M.read (| M.get_constant (| "core::slice::as_chunks::N" |) |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| len |)) + (M.read (| M.get_constant (| "core::slice::as_chunks::N" |) |)) ] |) |), @@ -2694,7 +2694,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let multiple_of_n := M.copy (| γ0_0 |) in let remainder := M.copy (| γ0_1 |) in - let array_slice := + let~ array_slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2734,7 +2734,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2776,16 +2776,15 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::as_rchunks::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::as_rchunks::N" |) |)) |) in M.match_operator (| M.alloc (| @@ -2793,18 +2792,16 @@ Module slice. M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "split_at", [] |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| len |), - M.read (| M.get_constant (| "core::slice::as_rchunks::N" |) |) - |) - |) + |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| len |)) + (M.read (| M.get_constant (| "core::slice::as_rchunks::N" |) |))) ] |) |), @@ -2815,7 +2812,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let remainder := M.copy (| γ0_0 |) in let multiple_of_n := M.copy (| γ0_1 |) in - let array_slice := + let~ array_slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2850,7 +2847,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2930,7 +2927,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2957,22 +2954,21 @@ Module slice. (Value.Integer 0), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::slice::as_chunks_unchecked_mut::N" |) - |) - |)) + |))) (Value.Integer 0))) |)) |)) in @@ -3017,7 +3013,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let new_len := + let~ new_len := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::exact_div", [ Ty.path "usize" ] |), @@ -3084,7 +3080,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3126,16 +3122,15 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::as_chunks_mut::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::as_chunks_mut::N" |) |)) |) in M.match_operator (| M.alloc (| @@ -3147,11 +3142,10 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.mul (| - Integer.Usize, - M.read (| len |), - M.read (| M.get_constant (| "core::slice::as_chunks_mut::N" |) |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| len |)) + (M.read (| M.get_constant (| "core::slice::as_chunks_mut::N" |) |)) ] |) |), @@ -3162,7 +3156,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let multiple_of_n := M.copy (| γ0_0 |) in let remainder := M.copy (| γ0_1 |) in - let array_slice := + let~ array_slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3202,7 +3196,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3244,16 +3238,15 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::as_rchunks_mut::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::as_rchunks_mut::N" |) |)) |) in M.match_operator (| M.alloc (| @@ -3265,18 +3258,16 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| len |), - M.read (| M.get_constant (| "core::slice::as_rchunks_mut::N" |) |) - |) - |) + |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| len |)) + (M.read (| M.get_constant (| "core::slice::as_rchunks_mut::N" |) |))) ] |) |), @@ -3287,7 +3278,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let remainder := M.copy (| γ0_0 |) in let multiple_of_n := M.copy (| γ0_1 |) in - let array_slice := + let~ array_slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3322,7 +3313,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3397,7 +3388,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3471,7 +3462,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3543,7 +3534,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3615,7 +3606,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3687,7 +3678,7 @@ Module slice. (let self := M.alloc (| self |) in let chunk_size := M.alloc (| chunk_size |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3821,7 +3812,7 @@ Module slice. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3888,7 +3879,7 @@ Module slice. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3965,21 +3956,21 @@ Module slice. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "as_ptr", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4057,7 +4048,7 @@ Module slice. |), [ M.read (| ptr |); M.read (| mid |) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| mid |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| mid |)) ] |) ] @@ -4095,14 +4086,14 @@ Module slice. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4113,7 +4104,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4187,7 +4178,7 @@ Module slice. M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), [ M.read (| ptr |); M.read (| mid |) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), M.read (| mid |) |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| mid |)) ] |) ] @@ -4331,7 +4322,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4372,14 +4363,13 @@ Module slice. M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "split_at", [] |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::rsplit_array_ref::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::rsplit_array_ref::N" |) |)) ] |) |), @@ -4430,7 +4420,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4475,14 +4465,13 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| M.get_constant (| "core::slice::rsplit_array_mut::N" |) |) - |) + |)) + (M.read (| M.get_constant (| "core::slice::rsplit_array_mut::N" |) |)) ] |) |), @@ -4873,7 +4862,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let index := + let~ index := M.copy (| M.match_operator (| M.alloc (| @@ -5005,11 +4994,10 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| index |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| index |)) + (Value.Integer 1)) ] ] |) @@ -5044,7 +5032,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let index := + let~ index := M.copy (| M.match_operator (| M.alloc (| @@ -5176,11 +5164,10 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| index |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| index |)) + (Value.Integer 1)) ] ] |) @@ -5239,7 +5226,7 @@ Module slice. (let self := M.alloc (| self |) in let needle := M.alloc (| needle |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), @@ -5365,11 +5352,10 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| m |), - M.read (| n |) - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| m |)) + (M.read (| n |))) ] ] |) @@ -5415,21 +5401,21 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let prefix := + let~ prefix := M.alloc (| M.call_closure (| M.get_trait_method (| "core::slice::SlicePattern", P, [], "as_slice", [] |), [ M.read (| prefix |) ] |) |) in - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| prefix |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5555,7 +5541,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let suffix := + let~ suffix := M.alloc (| M.call_closure (| M.get_trait_method (| "core::slice::SlicePattern", P, [], "as_slice", [] |), @@ -5591,7 +5577,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let len := M.copy (| γ0_0 |) in let n := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5617,11 +5603,10 @@ Module slice. |), [ M.read (| self |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| n |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| n |)) ] |) |), @@ -5801,16 +5786,16 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let size := + let~ size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |) |) in - let left := M.alloc (| Value.Integer 0 |) in - let right := M.copy (| size |) in - let _ := + let~ left := M.alloc (| Value.Integer 0 |) in + let~ right := M.copy (| size |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5828,19 +5813,17 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let mid := + let~ mid := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| left |), - BinOp.Panic.div (| - Integer.Usize, - M.read (| size |), - Value.Integer 2 - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| left |)) + (BinOp.Wrap.div + Integer.Usize + (M.read (| size |)) + (Value.Integer 2)) |) in - let cmp := + let~ cmp := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5866,7 +5849,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| left, M.read (| @@ -5902,18 +5885,17 @@ Module slice. Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| mid |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| mid |)) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic left) ] |) |) |) in - let _ := + let~ _ := M.write (| right, M.read (| @@ -5954,7 +5936,7 @@ Module slice. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5989,7 +5971,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6021,14 +6003,13 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| size, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| right |), - M.read (| left |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| right |)) + (M.read (| left |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -6036,7 +6017,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6047,7 +6028,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::assume", [] |), @@ -6161,7 +6142,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6204,7 +6185,7 @@ Module slice. (let self := M.alloc (| self |) in let compare := M.alloc (| compare |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6305,7 +6286,7 @@ Module slice. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6811,14 +6792,14 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6845,7 +6826,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6856,9 +6837,9 @@ Module slice. [ M.read (| self |) ] |) |) in - let next_read := M.alloc (| Value.Integer 1 |) in - let next_write := M.alloc (| Value.Integer 1 |) in - let _ := + let~ next_read := M.alloc (| Value.Integer 1 |) in + let~ next_write := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -6876,7 +6857,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let ptr_read := + let~ ptr_read := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6887,7 +6868,7 @@ Module slice. [ M.read (| ptr |); M.read (| next_read |) ] |) |) in - let prev_ptr_write := + let~ prev_ptr_write := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6897,15 +6878,14 @@ Module slice. |), [ M.read (| ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| next_write |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| next_write |)) + (Value.Integer 1) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6944,7 +6924,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6962,7 +6942,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let ptr_write := + let~ ptr_write := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6976,7 +6956,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6994,29 +6974,24 @@ Module slice. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := next_write in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := next_read in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -7024,7 +6999,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7170,7 +7145,7 @@ Module slice. (let self := M.alloc (| self |) in let mid := M.alloc (| mid |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7203,18 +7178,17 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let k := + let~ k := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| mid |) - |) + |)) + (M.read (| mid |)) |) in - let p := + let~ p := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7225,7 +7199,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::slice::rotate::ptr_rotate", [ T ] |), @@ -7269,7 +7243,7 @@ Module slice. (let self := M.alloc (| self |) in let k := M.alloc (| k |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7302,18 +7276,17 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let mid := + let~ mid := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| k |) - |) + |)) + (M.read (| k |)) |) in - let p := + let~ p := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7324,7 +7297,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::slice::rotate::ptr_rotate", [ T ] |), @@ -7363,7 +7336,7 @@ Module slice. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7423,7 +7396,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -7440,7 +7413,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -7450,7 +7425,7 @@ Module slice. 0 |) in let el := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| el |), M.call_closure (| @@ -7495,7 +7470,7 @@ Module slice. (let self := M.alloc (| self |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7554,7 +7529,7 @@ Module slice. (let self := M.alloc (| self |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7614,7 +7589,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -7718,15 +7693,11 @@ Module slice. |) in let src_start := M.copy (| γ0_0 |) in let src_end := M.copy (| γ0_1 |) in - let count := + let~ count := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| src_end |), - M.read (| src_start |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| src_end |)) (M.read (| src_start |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7738,18 +7709,17 @@ Module slice. UnOp.Pure.not (BinOp.Pure.le (M.read (| dest |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| count |) - |))) + |)) + (M.read (| count |)))) |)) in let _ := M.is_constant_or_break_match (| @@ -7784,7 +7754,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7795,7 +7765,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let src_ptr := + let~ src_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7806,7 +7776,7 @@ Module slice. [ M.read (| ptr |); M.read (| src_start |) ] |) |) in - let dest_ptr := + let~ dest_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7817,7 +7787,7 @@ Module slice. [ M.read (| ptr |); M.read (| dest |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy", [ T ] |), @@ -7858,7 +7828,7 @@ Module slice. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7919,7 +7889,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::swap_nonoverlapping", [ T ] |), @@ -8000,49 +7970,44 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let gcd := + let~ gcd := M.copy (| M.get_constant (| "core::slice::align_to_offsets_discriminant" |) |) in - let ts := + let~ ts := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| M.get_function (| "core::mem::size_of", [ U ] |), [] |), - M.read (| gcd |) - |) + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ U ] |), [] |)) + (M.read (| gcd |)) |) in - let us := + let~ us := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |), - M.read (| gcd |) - |) + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |)) + (M.read (| gcd |)) |) in - let us_len := + let~ us_len := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| ts |) - |), - M.read (| us |) - |) + |)) + (M.read (| ts |))) + (M.read (| us |)) |) in - let ts_len := + let~ ts_len := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] - |), - M.read (| ts |) - |) + |)) + (M.read (| ts |)) |) in M.alloc (| Value.Tuple [ M.read (| us_len |); M.read (| ts_len |) ] |) |))) @@ -8098,7 +8063,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8137,7 +8102,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8148,7 +8113,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::align_offset", [ T ] |), @@ -8268,18 +8233,17 @@ Module slice. |), [ M.read (| rest |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| rest |) ] - |), - M.read (| ts_len |) - |) + |)) + (M.read (| ts_len |)) ] |); M.read (| ts_len |) @@ -8355,7 +8319,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8394,7 +8358,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8405,7 +8369,7 @@ Module slice. [ M.read (| self |) ] |) |) in - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::align_offset", [ T ] |), @@ -8482,7 +8446,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let us_len := M.copy (| γ0_0 |) in let ts_len := M.copy (| γ0_1 |) in - let rest_len := + let~ rest_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8493,7 +8457,7 @@ Module slice. [ M.read (| rest |) ] |) |) in - let mut_ptr := + let~ mut_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8532,11 +8496,10 @@ Module slice. |), [ M.read (| mut_ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| rest_len |), - M.read (| ts_len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| rest_len |)) + (M.read (| ts_len |)) ] |); M.read (| ts_len |) @@ -8583,7 +8546,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -8636,7 +8599,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -8704,7 +8667,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -8757,7 +8720,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -9229,7 +9192,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let direction := M.copy (| γ0_0 |) in let split_index := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9290,6 +9253,11 @@ Module slice. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::slice::Direction::Front" + |) in + let~ _ := M.write (| M.read (| self |), M.read (| back |) |) in M.alloc (| Value.StructTuple @@ -9299,6 +9267,11 @@ Module slice. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::slice::Direction::Back" + |) in + let~ _ := M.write (| M.read (| self |), M.read (| front |) |) in M.alloc (| Value.StructTuple @@ -9430,7 +9403,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let direction := M.copy (| γ0_0 |) in let split_index := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9501,6 +9474,11 @@ Module slice. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::slice::Direction::Front" + |) in + let~ _ := M.write (| M.read (| self |), M.read (| back |) |) in M.alloc (| Value.StructTuple @@ -9510,6 +9488,11 @@ Module slice. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::slice::Direction::Back" + |) in + let~ _ := M.write (| M.read (| self |), M.read (| front |) |) in M.alloc (| Value.StructTuple @@ -9631,7 +9614,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let first := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in - let _ := M.write (| M.read (| self |), M.read (| rem |) |) in + let~ _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| first |) ] |))) @@ -9754,7 +9737,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let first := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in - let _ := M.write (| M.read (| self |), M.read (| rem |) |) in + let~ _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| first |) ] |))) @@ -9869,7 +9852,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let last := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in - let _ := M.write (| M.read (| self |), M.read (| rem |) |) in + let~ _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| last |) ] |))) @@ -9992,7 +9975,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let last := M.copy (| γ0_0 |) in let rem := M.copy (| γ0_1 |) in - let _ := M.write (| M.read (| self |), M.read (| rem |) |) in + let~ _ := M.write (| M.read (| self |), M.read (| rem |) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| last |) ] |))) @@ -10039,8 +10022,8 @@ Module slice. (let self := M.alloc (| self |) in let indices := M.alloc (| indices |) in M.read (| - let slice := M.alloc (| M.read (| self |) |) in - let arr := + let~ slice := M.alloc (| M.read (| self |) |) in + let~ arr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10053,7 +10036,7 @@ Module slice. [] |) |) in - let arr_ptr := + let~ arr_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10066,7 +10049,7 @@ Module slice. [ arr ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -10097,7 +10080,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -10116,7 +10099,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -10128,7 +10113,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let idx := + let~ idx := M.copy (| M.call_closure (| M.get_associated_function (| @@ -10142,7 +10127,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_associated_function (| @@ -10219,7 +10204,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10312,7 +10297,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10425,7 +10410,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10533,7 +10518,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10576,7 +10561,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10632,7 +10617,7 @@ Module slice. (let self := M.alloc (| self |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10693,14 +10678,14 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |) |) in - let src := + let~ src := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10740,7 +10725,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -10759,7 +10744,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -10769,7 +10756,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10821,7 +10808,7 @@ Module slice. (let self := M.alloc (| self |) in let src := M.alloc (| src |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10982,8 +10969,8 @@ Module slice. (let indices := M.alloc (| indices |) in let len := M.alloc (| len |) in M.read (| - let valid := M.alloc (| Value.Bool true |) in - let _ := + let~ valid := M.alloc (| Value.Bool true |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -11026,7 +11013,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -11049,7 +11036,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -11063,7 +11052,7 @@ Module slice. let i := M.copy (| γ1_0 |) in let γ1_1 := M.read (| γ1_1 |) in let idx := M.copy (| γ1_1 |) in - let _ := + let~ _ := let β := valid in M.write (| β, @@ -11113,7 +11102,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -11132,7 +11121,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -11147,7 +11141,7 @@ Module slice. |) in let γ0_0 := M.read (| γ0_0 |) in let idx2 := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := valid in M.write (| β, diff --git a/CoqOfRust/core/slice/raw.v b/CoqOfRust/core/slice/raw.v index 72effdeb2..3fed614c0 100644 --- a/CoqOfRust/core/slice/raw.v +++ b/CoqOfRust/core/slice/raw.v @@ -23,7 +23,7 @@ Module slice. (let data := M.alloc (| data |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -31,7 +31,7 @@ Module slice. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -90,7 +90,7 @@ Module slice. (let data := M.alloc (| data |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -98,7 +98,7 @@ Module slice. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/slice/rotate.v b/CoqOfRust/core/slice/rotate.v index 059b4f754..6c1cbecdb 100644 --- a/CoqOfRust/core/slice/rotate.v +++ b/CoqOfRust/core/slice/rotate.v @@ -186,7 +186,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -207,7 +207,7 @@ Module slice. M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -245,11 +245,10 @@ Module slice. (M.alloc (| LogicalOp.or (| BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.Usize, - M.read (| left |), - M.read (| right |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| left |)) + (M.read (| right |))) (Value.Integer 24), ltac:(M.monadic (BinOp.Pure.gt @@ -274,7 +273,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -285,7 +284,7 @@ Module slice. [ M.read (| mid |); M.read (| left |) ] |) |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -296,12 +295,12 @@ Module slice. [ M.read (| x |) ] |) |) in - let i := M.copy (| right |) in - let gcd := M.copy (| right |) in - let _ := + let~ i := M.copy (| right |) in + let~ gcd := M.copy (| right |) in + let~ _ := M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.write (| tmp, M.call_closure (| @@ -340,17 +339,16 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| left |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| left |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -371,7 +369,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -413,7 +411,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| gcd, M.read (| i |) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -423,21 +421,20 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| right |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| right |)) |) in M.alloc (| Value.Tuple [] |))) ] |))) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -467,7 +464,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -487,7 +484,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -501,7 +503,7 @@ Module slice. 0 |) in let start := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| tmp, M.call_closure (| @@ -529,18 +531,17 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| i, - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| right |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| right |)) |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.write (| tmp, M.call_closure (| @@ -592,17 +593,16 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| left - |) - |) + |)) |) in M.match_operator (| M.alloc (| @@ -633,7 +633,8 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ + _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -687,17 +688,16 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| right - |) - |) + |)) |) in M.alloc (| Value.Tuple [] @@ -733,9 +733,9 @@ Module slice. |), [ M.read (| left |); M.read (| right |) ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ @@ -745,15 +745,14 @@ Module slice. ] |), [] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] - |) - |)) + |))) |)) in let _ := M.is_constant_or_break_match (| @@ -763,7 +762,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let rawarray := + let~ rawarray := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -785,7 +784,7 @@ Module slice. [] |) |) in - let buf := + let~ buf := M.alloc (| M.rust_cast (M.call_closure (| @@ -808,7 +807,7 @@ Module slice. [ rawarray ] |)) |) in - let dim := + let~ dim := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -829,7 +828,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -847,7 +846,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -875,7 +874,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -903,7 +902,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -922,7 +921,7 @@ Module slice. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -938,7 +937,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -966,7 +965,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1022,8 +1021,8 @@ Module slice. |) in M.loop (| ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1047,7 +1046,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| mid, M.call_closure (| @@ -1061,15 +1060,14 @@ Module slice. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := left in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| right |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| right |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1103,8 +1101,8 @@ Module slice. ltac:(M.monadic (M.loop (| ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1128,7 +1126,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| mid, M.call_closure (| @@ -1142,15 +1140,14 @@ Module slice. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := right in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| left |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| left |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), diff --git a/CoqOfRust/core/slice/select.v b/CoqOfRust/core/slice/select.v index 172a3eb24..22e36fe2c 100644 --- a/CoqOfRust/core/slice/select.v +++ b/CoqOfRust/core/slice/select.v @@ -102,14 +102,14 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let limit := M.alloc (| Value.Integer 16 |) in - let was_balanced := M.alloc (| Value.Bool true |) in + let~ limit := M.alloc (| Value.Integer 16 |) in + let~ was_balanced := M.alloc (| Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -141,7 +141,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -166,7 +166,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -192,7 +192,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -211,7 +211,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -232,7 +232,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -246,7 +246,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -256,15 +256,14 @@ Module slice. [ M.read (| v |) ] |) |) in - let _ := + let~ _ := let β := limit in M.write (| β, - BinOp.Panic.sub (| - Integer.I32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I32 + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -283,7 +282,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let pivot := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -341,7 +340,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let mid := + let~ mid := M.alloc (| M.call_closure (| M.get_function (| @@ -355,7 +354,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -387,7 +386,7 @@ Module slice. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| v, M.call_closure (| @@ -411,16 +410,15 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| index, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| index |), - M.read (| mid |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| index |)) + (M.read (| mid |)) |) in - let _ := + let~ _ := M.write (| pred, Value.StructTuple @@ -454,7 +452,7 @@ Module slice. (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let mid := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| was_balanced, BinOp.Pure.ge @@ -465,32 +463,30 @@ Module slice. |), [ M.read (| mid |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - M.read (| mid |) - |) + |)) + (M.read (| mid |)) ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 8 - |)) + |)) + (Value.Integer 8)) |) in M.match_operator (| M.alloc (| @@ -538,7 +534,7 @@ Module slice. |) in let pivot := M.copy (| γ0_0 |) in let right := M.copy (| γ0_1 |) in - let pivot := + let~ pivot := M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), @@ -562,25 +558,23 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| v, M.read (| right |) |) in - let _ := + let~ _ := M.write (| index, - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| index |), - M.read (| mid |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| index |)) + (M.read (| mid |))) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| pred, Value.StructTuple @@ -609,7 +603,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| v, M.read (| left |) @@ -1039,7 +1033,7 @@ Module slice. let index := M.alloc (| index |) in let is_less := M.alloc (| is_less |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1124,7 +1118,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1146,25 +1140,24 @@ Module slice. (M.alloc (| BinOp.Pure.eq (M.read (| index |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let max_idx := + let~ max_idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1183,7 +1176,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1212,7 +1205,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let min_idx := + let~ min_idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1233,7 +1226,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1251,7 +1244,7 @@ Module slice. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1309,7 +1302,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let pivot := M.copy (| γ0_0 |) in let right := M.copy (| γ0_1 |) in - let pivot := + let~ pivot := M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), @@ -1389,7 +1382,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1398,7 +1391,7 @@ Module slice. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1443,7 +1436,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1452,7 +1445,7 @@ Module slice. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1495,7 +1488,7 @@ Module slice. M.read (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1527,7 +1520,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1552,7 +1545,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1578,7 +1571,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1589,18 +1582,17 @@ Module slice. (M.alloc (| BinOp.Pure.eq (M.read (| k |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) |)) in let _ := M.is_constant_or_break_match (| @@ -1610,7 +1602,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let max_idx := + let~ max_idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1631,7 +1623,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1670,7 +1662,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let min_idx := + let~ min_idx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1691,7 +1683,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1715,7 +1707,7 @@ Module slice. |))) ] |) in - let p := + let~ p := M.alloc (| M.call_closure (| M.get_function (| @@ -1760,7 +1752,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| v, M.call_closure (| @@ -1786,7 +1778,7 @@ Module slice. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| v, M.call_closure (| @@ -1807,28 +1799,25 @@ Module slice. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| p |), - Value.Integer 1 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| p |)) + (Value.Integer 1)) ] ] |) |) in - let _ := + let~ _ := let β := k in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| p |), - Value.Integer 1 - |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| p |)) + (Value.Integer 1)) |) in M.alloc (| Value.Tuple [] |))) ] @@ -1881,7 +1870,7 @@ Module slice. (let v := M.alloc (| v |) in let is_less := M.alloc (| is_less |) in M.read (| - let frac := + let~ frac := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1905,18 +1894,17 @@ Module slice. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 12 - |) + |)) + (Value.Integer 12) |))); fun γ => ltac:(M.monadic @@ -1952,95 +1940,81 @@ Module slice. Value.Bool true |) in M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 64 - |) + |)) + (Value.Integer 64) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 1024 - |) + |)) + (Value.Integer 1024) |))) ] |))) ] |) |) in - let pivot := - M.alloc (| - BinOp.Panic.div (| Integer.Usize, M.read (| frac |), Value.Integer 2 |) - |) in - let lo := + let~ pivot := + M.alloc (| BinOp.Wrap.div Integer.Usize (M.read (| frac |)) (Value.Integer 2) |) in + let~ lo := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 2 - |), - M.read (| pivot |) - |) - |) in - let hi := - M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| frac |), M.read (| lo |) |) + |)) + (Value.Integer 2)) + (M.read (| pivot |)) |) in - let gap := + let~ hi := + M.alloc (| BinOp.Wrap.add Integer.Usize (M.read (| frac |)) (M.read (| lo |)) |) in + let~ gap := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - BinOp.Panic.mul (| Integer.Usize, Value.Integer 9, M.read (| frac |) |) - |), - Value.Integer 4 - |) - |) in - let a := - M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| lo |), - BinOp.Panic.mul (| Integer.Usize, Value.Integer 4, M.read (| frac |) |) - |), - M.read (| gap |) - |) + |)) + (BinOp.Wrap.mul Integer.Usize (Value.Integer 9) (M.read (| frac |)))) + (Value.Integer 4) |) in - let b := + let~ a := M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| hi |), M.read (| gap |) |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| lo |)) + (BinOp.Wrap.mul Integer.Usize (Value.Integer 4) (M.read (| frac |)))) + (M.read (| gap |)) |) in - let _ := + let~ b := + M.alloc (| BinOp.Wrap.add Integer.Usize (M.read (| hi |)) (M.read (| gap |)) |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2065,7 +2039,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2084,7 +2058,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2096,7 +2072,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2107,60 +2083,52 @@ Module slice. M.read (| v |); M.read (| is_less |); M.read (| a |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - M.read (| frac |) - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (M.read (| frac |)); M.read (| b |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| a |), - Value.Integer 1 - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| a |)) + (Value.Integer 1); M.read (| i |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| b |), - Value.Integer 1 - |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| a |), - Value.Integer 2 - |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| frac |) - |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| b |), - Value.Integer 2 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| b |)) + (Value.Integer 1); + BinOp.Wrap.add + Integer.Usize + (M.read (| a |)) + (Value.Integer 2); + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| frac |)); + BinOp.Wrap.add + Integer.Usize + (M.read (| b |)) + (Value.Integer 2) ] |) |) in - let _ := + let~ _ := let β := a in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 3 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 3) |) in - let _ := + let~ _ := let β := b in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 3 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 3) |) in M.alloc (| Value.Tuple [] |))) ] @@ -2169,7 +2137,7 @@ Module slice. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::slice::select::median_of_medians", [ T; F ] |), @@ -2189,11 +2157,7 @@ Module slice. [ ("start", M.read (| lo |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| lo |), - M.read (| frac |) - |)) + BinOp.Wrap.add Integer.Usize (M.read (| lo |)) (M.read (| frac |))) ] ] |); @@ -2208,7 +2172,7 @@ Module slice. M.get_function (| "core::slice::sort::partition", [ T; F ] |), [ M.read (| v |); - BinOp.Panic.add (| Integer.Usize, M.read (| lo |), M.read (| pivot |) |); + BinOp.Wrap.add Integer.Usize (M.read (| lo |)) (M.read (| pivot |)); M.read (| is_less |) ] |) @@ -2283,7 +2247,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.write (| b, M.call_closure (| @@ -2297,7 +2261,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| h, M.call_closure (| @@ -2311,7 +2275,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2344,7 +2308,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", [ Ty.path "usize" ] |), @@ -2355,7 +2319,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2388,7 +2352,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", [ Ty.path "usize" ] |), @@ -2399,7 +2363,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2475,14 +2439,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| d, M.read (| f |) |) in + let~ _ := M.write (| d, M.read (| f |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2526,7 +2490,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2591,7 +2555,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2622,7 +2586,7 @@ Module slice. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2655,7 +2619,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := M.write (| d, M.read (| b |) |) in + let~ _ := M.write (| d, M.read (| b |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -2699,14 +2663,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| d, M.read (| h |) |) in + let~ _ := M.write (| d, M.read (| h |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "swap", [] |), @@ -2753,7 +2717,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2786,7 +2750,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::swap", [ Ty.path "usize" ] |), @@ -2797,7 +2761,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2836,7 +2800,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/slice/sort.v b/CoqOfRust/core/slice/sort.v index 5e5f63339..fe39e8d2f 100644 --- a/CoqOfRust/core/slice/sort.v +++ b/CoqOfRust/core/slice/sort.v @@ -32,7 +32,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -127,7 +127,7 @@ Module slice. (let v := M.alloc (| v |) in let is_less := M.alloc (| is_less |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -135,7 +135,7 @@ Module slice. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -176,7 +176,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let arr_ptr := + let~ arr_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -187,18 +187,17 @@ Module slice. [ M.read (| v |) ] |) |) in - let i := + let~ i := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let i_ptr := + let~ i_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -242,7 +241,7 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -258,7 +257,7 @@ Module slice. ] |) |) in - let hole := + let~ hole := M.alloc (| Value.StructRecord "core::slice::sort::InsertionHole" @@ -285,7 +284,7 @@ Module slice. |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -333,11 +332,10 @@ Module slice. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (Value.Integer 1)) ] ] |) @@ -350,7 +348,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -373,7 +371,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -385,7 +388,7 @@ Module slice. 0 |) in let j := M.copy (| γ0_0 |) in - let j_ptr := + let~ j_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -396,7 +399,7 @@ Module slice. [ M.read (| arr_ptr |); M.read (| j |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -458,7 +461,7 @@ Module slice. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -479,7 +482,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| hole, @@ -567,7 +570,7 @@ Module slice. (let v := M.alloc (| v |) in let is_less := M.alloc (| is_less |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -575,7 +578,7 @@ Module slice. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -660,7 +663,7 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let arr_ptr := + let~ arr_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -671,7 +674,7 @@ Module slice. [ M.read (| v |) ] |) |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -687,7 +690,7 @@ Module slice. ] |) |) in - let hole := + let~ hole := M.alloc (| Value.StructRecord "core::slice::sort::InsertionHole" @@ -714,7 +717,7 @@ Module slice. |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -776,7 +779,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -795,7 +798,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -807,7 +815,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -881,7 +889,7 @@ Module slice. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -907,18 +915,17 @@ Module slice. |), [ M.read (| arr_ptr |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) ] |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| hole, @@ -979,14 +986,14 @@ Module slice. let offset := M.alloc (| offset |) in let is_less := M.alloc (| is_less |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1042,7 +1049,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1061,7 +1068,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1071,7 +1080,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1146,14 +1155,14 @@ Module slice. let offset := M.alloc (| offset |) in let is_less := M.alloc (| is_less |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1227,7 +1236,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1250,7 +1259,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1260,7 +1271,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1366,15 +1377,15 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let i := M.alloc (| Value.Integer 1 |) in - let _ := + let~ i := M.alloc (| Value.Integer 1 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1407,7 +1418,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1426,7 +1437,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1437,7 +1453,7 @@ Module slice. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1499,11 +1515,10 @@ Module slice. |), [ M.read (| v |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) ] |) ] @@ -1516,15 +1531,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1532,7 +1546,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -1545,7 +1559,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1572,7 +1586,7 @@ Module slice. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1605,7 +1619,7 @@ Module slice. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1615,11 +1629,10 @@ Module slice. |), [ M.read (| v |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (Value.Integer 1); M.read (| i |) ] |) @@ -1641,7 +1654,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1669,16 +1682,15 @@ Module slice. [ ("end_", M.read (| i |)) ] ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |); + BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (Value.Integer 1); M.read (| is_less |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1791,7 +1803,7 @@ Module slice. (let v := M.alloc (| v |) in let is_less := M.alloc (| is_less |) in M.read (| - let sift_down := + let~ sift_down := M.alloc (| M.closure (fun γ => @@ -1813,19 +1825,17 @@ Module slice. M.read (| M.loop (| ltac:(M.monadic - (let child := + (let~ child := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| node |) - |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| node |))) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1862,7 +1872,7 @@ Module slice. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1872,11 +1882,10 @@ Module slice. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.Usize, - M.read (| child |), - Value.Integer 1 - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| child |)) + (Value.Integer 1)) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -1893,14 +1902,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := child in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_trait_method (| "core::ops::function::FnMut", @@ -1930,17 +1939,15 @@ Module slice. M.SubPointer.get_array_field (| M.read (| v |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| child |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| child |)) + (Value.Integer 1) |) |) ] ] - |)) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1948,7 +1955,7 @@ Module slice. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2007,7 +2014,7 @@ Module slice. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2022,7 +2029,7 @@ Module slice. ] |) |) in - let _ := M.write (| node, M.read (| child |) |) in + let~ _ := M.write (| node, M.read (| child |) |) in M.alloc (| Value.Tuple [] |))) |) |))) @@ -2033,7 +2040,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2062,18 +2069,17 @@ Module slice. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] - |), - Value.Integer 2 - |)) + |)) + (Value.Integer 2)) ] ] |) @@ -2086,7 +2092,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2109,7 +2115,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2121,7 +2129,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2210,7 +2218,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2233,7 +2241,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2243,7 +2253,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2254,7 +2264,7 @@ Module slice. [ M.read (| v |); Value.Integer 0; M.read (| i |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2583,7 +2593,7 @@ Module slice. let pivot := M.alloc (| pivot |) in let is_less := M.alloc (| is_less |) in M.read (| - let l := + let~ l := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2594,23 +2604,23 @@ Module slice. [ M.read (| v |) ] |) |) in - let block_l := + let~ block_l := M.copy (| M.get_constant (| "core::slice::sort::partition_in_blocks::BLOCK" |) |) in - let start_l := + let~ start_l := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::null_mut", [ Ty.path "u8" ] |), [] |) |) in - let end_l := + let~ end_l := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::null_mut", [ Ty.path "u8" ] |), [] |) |) in - let offsets_l := + let~ offsets_l := M.alloc (| repeat (M.call_closure (| @@ -2623,7 +2633,7 @@ Module slice. |)) 128 |) in - let r := + let~ r := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "add", [] |), @@ -2636,23 +2646,23 @@ Module slice. ] |) |) in - let block_r := + let~ block_r := M.copy (| M.get_constant (| "core::slice::sort::partition_in_blocks::BLOCK" |) |) in - let start_r := + let~ start_r := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::null_mut", [ Ty.path "u8" ] |), [] |) |) in - let end_r := + let~ end_r := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::null_mut", [ Ty.path "u8" ] |), [] |) |) in - let offsets_r := + let~ offsets_r := M.alloc (| repeat (M.call_closure (| @@ -2665,25 +2675,24 @@ Module slice. |)) 128 |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic - (let is_done := + (let~ is_done := M.alloc (| BinOp.Pure.le (M.call_closure (| M.get_function (| "core::slice::sort::partition_in_blocks.width", [] |), [ M.read (| l |); M.read (| r |) ] |)) - (BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer 2) + (M.read (| M.get_constant (| "core::slice::sort::partition_in_blocks::BLOCK" |) - |) - |)) + |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2692,7 +2701,7 @@ Module slice. (let γ := M.use is_done in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let rem := + let~ rem := M.alloc (| M.call_closure (| M.get_function (| @@ -2702,7 +2711,7 @@ Module slice. [ M.read (| l |); M.read (| r |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2726,25 +2735,24 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := rem in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| M.get_constant (| "core::slice::sort::partition_in_blocks::BLOCK" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2762,7 +2770,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| block_r, M.read (| rem |) |) in + let~ _ := M.write (| block_r, M.read (| rem |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -2783,34 +2791,32 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := M.write (| block_l, M.read (| rem |) |) in + let~ _ := M.write (| block_l, M.read (| rem |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| block_l, - BinOp.Panic.div (| - Integer.Usize, - M.read (| rem |), - Value.Integer 2 - |) + BinOp.Wrap.div + Integer.Usize + (M.read (| rem |)) + (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| block_r, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| rem |), - M.read (| block_l |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| rem |)) + (M.read (| block_l |)) |) in M.alloc (| Value.Tuple [] |))) ] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2822,7 +2828,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2878,7 +2884,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2890,7 +2896,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2908,11 +2914,10 @@ Module slice. |), [ M.read (| l |); M.read (| r |) ] |)) - (BinOp.Panic.add (| - Integer.Usize, - M.read (| block_l |), - M.read (| block_r |) - |))) + (BinOp.Wrap.add + Integer.Usize + (M.read (| block_l |)) + (M.read (| block_r |)))) |)) in let _ := M.is_constant_or_break_match (| @@ -2946,7 +2951,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2959,7 +2964,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| start_l, M.call_closure (| @@ -2973,8 +2978,8 @@ Module slice. [ (* Unsize *) M.pointer_coercion offsets_l ] |) |) in - let _ := M.write (| end_l, M.read (| start_l |) |) in - let elem := M.copy (| l |) in + let~ _ := M.write (| end_l, M.read (| start_l |) |) in + let~ elem := M.copy (| l |) in M.use (M.match_operator (| M.alloc (| @@ -3002,7 +3007,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3021,7 +3026,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3033,12 +3043,12 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| end_l |), M.rust_cast (M.read (| i |)) |) in - let _ := + let~ _ := M.write (| end_l, M.call_closure (| @@ -3083,7 +3093,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| elem, M.call_closure (| @@ -3105,7 +3115,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3118,7 +3128,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| start_r, M.call_closure (| @@ -3132,8 +3142,8 @@ Module slice. [ (* Unsize *) M.pointer_coercion offsets_r ] |) |) in - let _ := M.write (| end_r, M.read (| start_r |) |) in - let elem := M.copy (| r |) in + let~ _ := M.write (| end_r, M.read (| start_r |) |) in + let~ elem := M.copy (| r |) in M.use (M.match_operator (| M.alloc (| @@ -3161,7 +3171,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3180,7 +3190,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3192,7 +3207,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| elem, M.call_closure (| @@ -3204,12 +3219,12 @@ Module slice. [ M.read (| elem |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.read (| end_r |), M.rust_cast (M.read (| i |)) |) in - let _ := + let~ _ := M.write (| end_r, M.call_closure (| @@ -3261,7 +3276,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let count := + let~ count := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -3277,7 +3292,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3290,7 +3305,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::read", [ T ] |), @@ -3320,7 +3335,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3338,9 +3353,9 @@ Module slice. |), [ M.read (| r |); - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "usize", @@ -3349,9 +3364,8 @@ Module slice. [] |), [ M.read (| M.read (| start_r |) |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |)); M.call_closure (| @@ -3378,7 +3392,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3406,7 +3420,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3425,7 +3439,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -3438,7 +3457,7 @@ Module slice. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.write (| start_l, M.call_closure (| @@ -3453,7 +3472,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3495,9 +3514,9 @@ Module slice. |), [ M.read (| r |); - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "usize", @@ -3510,16 +3529,15 @@ Module slice. M.read (| start_r |) |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| start_r, M.call_closure (| @@ -3534,7 +3552,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3552,9 +3570,9 @@ Module slice. |), [ M.read (| r |); - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "usize", @@ -3567,9 +3585,8 @@ Module slice. M.read (| start_r |) |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |)); M.call_closure (| @@ -3607,7 +3624,7 @@ Module slice. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -3624,9 +3641,9 @@ Module slice. |), [ M.read (| r |); - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "usize", @@ -3635,23 +3652,22 @@ Module slice. [] |), [ M.read (| M.read (| start_r |) |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::forget", [ T ] |), [ M.read (| tmp |) ] |) |) in - let _ := + let~ _ := M.write (| start_l, M.call_closure (| @@ -3663,7 +3679,7 @@ Module slice. [ M.read (| start_l |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| start_r, M.call_closure (| @@ -3679,7 +3695,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3692,7 +3708,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| l, M.call_closure (| @@ -3708,7 +3724,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3721,7 +3737,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -3759,7 +3775,7 @@ Module slice. M.use (M.alloc (| BinOp.Pure.lt (M.read (| start_l |)) (M.read (| end_l |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3771,7 +3787,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -3816,7 +3832,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -3850,7 +3866,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3868,7 +3884,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| end_l, M.call_closure (| @@ -3880,7 +3896,7 @@ Module slice. [ M.read (| end_l |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::swap", [ T ] |), @@ -3916,7 +3932,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| r, M.call_closure (| @@ -3934,7 +3950,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3975,7 +3991,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3987,7 +4003,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -4038,7 +4054,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -4077,7 +4093,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4097,7 +4113,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| end_r, M.call_closure (| @@ -4109,7 +4125,7 @@ Module slice. [ M.read (| end_r |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::swap", [ T ] |), @@ -4123,9 +4139,9 @@ Module slice. |), [ M.read (| r |); - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "usize", @@ -4134,15 +4150,14 @@ Module slice. [] |), [ M.read (| M.read (| end_r |) |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) ] |) |) in - let _ := + let~ _ := M.write (| l, M.call_closure (| @@ -4160,7 +4175,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4240,7 +4255,7 @@ Module slice. (let l := M.alloc (| l |) in let r := M.alloc (| r |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4275,21 +4290,19 @@ Module slice. ] |) in M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "addr", [] |), [ M.read (| r |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "*mut") [ T ], "addr", [] |), [ M.read (| l |) ] - |) - |), - M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |) - |) + |))) + (M.call_closure (| M.get_function (| "core::mem::size_of", [ T ] |), [] |)) |) |))) | _, _ => M.impossible @@ -4359,7 +4372,7 @@ Module slice. let is_less := M.alloc (| is_less |) in M.read (| M.match_operator (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "swap", [] |), @@ -4384,14 +4397,14 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let pivot := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in - let pivot := + let~ pivot := M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), M.alloc (| Value.Integer 0 |) |) |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4407,7 +4420,7 @@ Module slice. ] |) |) in - let _pivot_guard := + let~ _pivot_guard := M.alloc (| Value.StructRecord "core::slice::sort::InsertionHole" @@ -4428,7 +4441,7 @@ Module slice. ("dest", M.read (| pivot |)) ] |) in - let pivot := + let~ pivot := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4441,8 +4454,8 @@ Module slice. [ tmp ] |) |) in - let l := M.alloc (| Value.Integer 0 |) in - let r := + let~ l := M.alloc (| Value.Integer 0 |) in + let~ r := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4453,8 +4466,8 @@ Module slice. [ M.read (| v |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4505,15 +4518,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := l in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4521,7 +4533,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4572,11 +4584,10 @@ Module slice. |), [ M.read (| v |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| r |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| r |)) + (Value.Integer 1) ] |); M.read (| pivot |) @@ -4590,15 +4601,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := r in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4606,7 +4616,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4620,10 +4630,10 @@ Module slice. M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| l |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| l |)) + (M.call_closure (| M.get_function (| "core::slice::sort::partition_in_blocks", [ T; F ] @@ -4651,8 +4661,7 @@ Module slice. M.read (| pivot |); M.read (| is_less |) ] - |) - |); + |)); BinOp.Pure.ge (M.read (| l |)) (M.read (| r |)) ] |))) @@ -4665,7 +4674,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let mid := M.copy (| γ0_0 |) in let was_partitioned := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4758,7 +4767,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "swap", [] |), @@ -4783,14 +4792,14 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let pivot := M.copy (| γ0_0 |) in let v := M.copy (| γ0_1 |) in - let pivot := + let~ pivot := M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), M.alloc (| Value.Integer 0 |) |) |) in - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4806,7 +4815,7 @@ Module slice. ] |) |) in - let _pivot_guard := + let~ _pivot_guard := M.alloc (| Value.StructRecord "core::slice::sort::InsertionHole" @@ -4827,7 +4836,7 @@ Module slice. ("dest", M.read (| pivot |)) ] |) in - let pivot := + let~ pivot := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4840,7 +4849,7 @@ Module slice. [ tmp ] |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4851,7 +4860,7 @@ Module slice. [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4875,12 +4884,12 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let l := M.alloc (| Value.Integer 0 |) in - let r := M.copy (| len |) in - let _ := + let~ l := M.alloc (| Value.Integer 0 |) in + let~ r := M.copy (| len |) in + let~ _ := M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4934,15 +4943,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := l in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4950,7 +4958,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4961,18 +4969,17 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := let β := r in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5032,7 +5039,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5054,7 +5061,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5065,7 +5072,7 @@ Module slice. [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::ptr::swap", [ T ] |), @@ -5089,20 +5096,16 @@ Module slice. ] |) |) in - let _ := + let~ _ := let β := l in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) |) in M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| l |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| l |)) (Value.Integer 1) |))) ] |) @@ -5167,7 +5170,7 @@ Module slice. ltac:(M.monadic (let v := M.alloc (| v |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), @@ -5182,8 +5185,8 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| len |)) (Value.Integer 8) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let seed := M.copy (| len |) in - let gen_usize := + let~ seed := M.copy (| len |) in + let~ gen_usize := M.alloc (| M.closure (fun γ => @@ -5215,42 +5218,39 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let r := + let~ r := M.alloc (| M.rust_cast (M.read (| seed |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) - (BinOp.Panic.shl (| - M.read (| r |), - Value.Integer 13 - |)) + (BinOp.Wrap.shl + (M.read (| r |)) + (Value.Integer 13)) |) in - let _ := + let~ _ := let β := r in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) - (BinOp.Panic.shr (| - M.read (| r |), - Value.Integer 17 - |)) + (BinOp.Wrap.shr + (M.read (| r |)) + (Value.Integer 17)) |) in - let _ := + let~ _ := let β := r in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) - (BinOp.Panic.shl (| - M.read (| r |), - Value.Integer 5 - |)) + (BinOp.Wrap.shl + (M.read (| r |)) + (Value.Integer 5)) |) in - let _ := + let~ _ := M.write (| seed, M.rust_cast (M.read (| r |)) @@ -5258,42 +5258,39 @@ Module slice. seed)); fun γ => ltac:(M.monadic - (let r := + (let~ r := M.alloc (| M.rust_cast (M.read (| seed |)) |) in - let _ := + let~ _ := let β := r in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) - (BinOp.Panic.shl (| - M.read (| r |), - Value.Integer 13 - |)) + (BinOp.Wrap.shl + (M.read (| r |)) + (Value.Integer 13)) |) in - let _ := + let~ _ := let β := r in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) - (BinOp.Panic.shr (| - M.read (| r |), - Value.Integer 7 - |)) + (BinOp.Wrap.shr + (M.read (| r |)) + (Value.Integer 7)) |) in - let _ := + let~ _ := let β := r in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) - (BinOp.Panic.shl (| - M.read (| r |), - Value.Integer 17 - |)) + (BinOp.Wrap.shl + (M.read (| r |)) + (Value.Integer 17)) |) in - let _ := + let~ _ := M.write (| seed, M.rust_cast (M.read (| r |)) @@ -5307,20 +5304,19 @@ Module slice. | _ => M.impossible (||) end)) |) in - let modulus := + let~ modulus := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "next_power_of_two", [] |), [ M.read (| len |) ] |) |) in - let pos := + let~ pos := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.div (| Integer.Usize, M.read (| len |), Value.Integer 4 |), - Value.Integer 2 - |) + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.div Integer.Usize (M.read (| len |)) (Value.Integer 4)) + (Value.Integer 2) |) in M.use (M.match_operator (| @@ -5346,7 +5342,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5365,7 +5361,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -5377,7 +5378,7 @@ Module slice. 0 |) in let i := M.copy (| γ0_0 |) in - let other := + let~ other := M.alloc (| BinOp.Pure.bit_and (M.call_closure (| @@ -5390,13 +5391,12 @@ Module slice. |), [ gen_usize; Value.Tuple [] ] |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| modulus |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| modulus |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5414,22 +5414,21 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := other in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| len |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5439,15 +5438,13 @@ Module slice. |), [ M.read (| v |); - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| pos |), - Value.Integer 1 - |), - M.read (| i |) - |); + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| pos |)) + (Value.Integer 1)) + (M.read (| i |)); M.read (| other |) ] |) @@ -5545,39 +5542,36 @@ Module slice. (let v := M.alloc (| v |) in let is_less := M.alloc (| is_less |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let a := + let~ a := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.div (| Integer.Usize, M.read (| len |), Value.Integer 4 |), - Value.Integer 1 - |) + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.div Integer.Usize (M.read (| len |)) (Value.Integer 4)) + (Value.Integer 1) |) in - let b := + let~ b := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.div (| Integer.Usize, M.read (| len |), Value.Integer 4 |), - Value.Integer 2 - |) + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.div Integer.Usize (M.read (| len |)) (Value.Integer 4)) + (Value.Integer 2) |) in - let c := + let~ c := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.div (| Integer.Usize, M.read (| len |), Value.Integer 4 |), - Value.Integer 3 - |) + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.div Integer.Usize (M.read (| len |)) (Value.Integer 4)) + (Value.Integer 3) |) in - let swaps := M.alloc (| Value.Integer 0 |) in - let _ := + let~ swaps := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5586,7 +5580,7 @@ Module slice. (let γ := M.use (M.alloc (| BinOp.Pure.ge (M.read (| len |)) (Value.Integer 8) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let sort2 := + let~ sort2 := M.alloc (| M.closure (fun γ => @@ -5675,7 +5669,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -5685,15 +5679,14 @@ Module slice. [ M.read (| a |); M.read (| b |) ] |) |) in - let _ := + let~ _ := let β := swaps in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -5709,7 +5702,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let sort3 := + let~ sort3 := M.alloc (| M.closure (fun γ => @@ -5735,7 +5728,7 @@ Module slice. ltac:(M.monadic (let c := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5777,7 +5770,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5819,7 +5812,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5872,7 +5865,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5894,7 +5887,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let sort_adjacent := + let~ sort_adjacent := M.alloc (| M.closure (fun γ => @@ -5908,8 +5901,8 @@ Module slice. ltac:(M.monadic (let a := M.copy (| γ |) in M.read (| - let tmp := M.copy (| M.read (| a |) |) in - let _ := + let~ tmp := M.copy (| M.read (| a |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5952,19 +5945,17 @@ Module slice. Value.Tuple [ M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| tmp |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| tmp |)) + (Value.Integer 1) |); M.read (| a |); M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| tmp |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| tmp |)) + (Value.Integer 1) |) ] ] @@ -5977,7 +5968,7 @@ Module slice. | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5996,7 +5987,7 @@ Module slice. [ sort_adjacent; Value.Tuple [ a ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6015,7 +6006,7 @@ Module slice. [ sort_adjacent; Value.Tuple [ b ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6038,7 +6029,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6092,7 +6083,7 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6106,11 +6097,10 @@ Module slice. M.alloc (| Value.Tuple [ - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), Value.Integer 1 |), - M.read (| b |) - |); + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1)) + (M.read (| b |)); Value.Bool true ] |))) @@ -6129,7 +6119,7 @@ Module slice. Definition value_MAX_SWAPS : Value.t := M.run ltac:(M.monadic - (M.alloc (| BinOp.Panic.mul (| Integer.Usize, Value.Integer 4, Value.Integer 3 |) |))). + (M.alloc (| BinOp.Wrap.mul Integer.Usize (Value.Integer 4) (Value.Integer 3) |))). End choose_pivot. (* @@ -6231,14 +6221,14 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let was_balanced := M.alloc (| Value.Bool true |) in - let was_partitioned := M.alloc (| Value.Bool true |) in + let~ was_balanced := M.alloc (| Value.Bool true |) in + let~ was_partitioned := M.alloc (| Value.Bool true |) in M.alloc (| M.never_to_any (| M.read (| M.loop (| ltac:(M.monadic - (let len := + (let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6249,7 +6239,7 @@ Module slice. [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6274,7 +6264,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6292,7 +6282,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6318,7 +6308,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6337,7 +6327,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6354,7 +6344,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6368,7 +6358,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6378,15 +6368,14 @@ Module slice. [ M.read (| v |) ] |) |) in - let _ := + let~ _ := let β := limit in M.write (| β, - BinOp.Panic.sub (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -6406,7 +6395,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let pivot := M.copy (| γ0_0 |) in let likely_sorted := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6462,7 +6451,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6520,7 +6509,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let mid := + let~ mid := M.alloc (| M.call_closure (| M.get_function (| @@ -6534,7 +6523,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| v, M.call_closure (| @@ -6586,7 +6575,7 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let mid := M.copy (| γ0_0 |) in let was_p := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| was_balanced, BinOp.Pure.ge @@ -6597,20 +6586,18 @@ Module slice. |), [ M.read (| mid |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| mid |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| mid |)) ] |)) - (BinOp.Panic.div (| - Integer.Usize, - M.read (| len |), - Value.Integer 8 - |)) + (BinOp.Wrap.div + Integer.Usize + (M.read (| len |)) + (Value.Integer 8)) |) in - let _ := + let~ _ := M.write (| was_partitioned, M.read (| was_p |) |) in M.match_operator (| M.alloc (| @@ -6658,7 +6645,7 @@ Module slice. |) in let pivot := M.copy (| γ0_0 |) in let right := M.copy (| γ0_1 |) in - let pivot := + let~ pivot := M.alloc (| M.SubPointer.get_array_field (| M.read (| pivot |), @@ -6700,7 +6687,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6715,12 +6702,12 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| v, M.read (| right |) |) in - let _ := + let~ _ := M.write (| pred, Value.StructTuple @@ -6730,7 +6717,7 @@ Module slice. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -6747,7 +6734,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| v, M.read (| left |) @@ -6804,7 +6791,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6820,12 +6807,12 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let limit := + let~ limit := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::num::BITS" |) |), - M.call_closure (| + BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::num::BITS" |) |)) + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "leading_zeros", [] |), [ M.call_closure (| @@ -6837,10 +6824,9 @@ Module slice. [ M.read (| v |) ] |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::slice::sort::recurse", [ T; F ] |), @@ -6977,14 +6963,14 @@ Module slice. let buf := M.alloc (| buf |) in let is_less := M.alloc (| is_less |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let v := + let~ v := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7016,8 +7002,8 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let v_mid := M.copy (| γ0_0 |) in let v_end := M.copy (| γ0_1 |) in - let hole := M.copy (| Value.DeclaredButUndefined |) in - let _ := + let~ hole := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7028,19 +7014,18 @@ Module slice. (M.alloc (| BinOp.Pure.le (M.read (| mid |)) - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| mid |) - |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| mid |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7054,7 +7039,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| hole, Value.StructRecord @@ -7074,7 +7059,7 @@ Module slice. ] |) in M.alloc (| Value.Tuple [] |) in - let left := + let~ left := M.alloc (| M.SubPointer.get_struct_record_field (| hole, @@ -7082,8 +7067,8 @@ Module slice. "start" |) |) in - let right := M.copy (| v_mid |) in - let out := + let~ right := M.copy (| v_mid |) in + let~ out := M.alloc (| M.SubPointer.get_struct_record_field (| hole, @@ -7122,7 +7107,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let is_l := + let~ is_l := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7148,7 +7133,7 @@ Module slice. ] |) |) in - let to_copy := + let~ to_copy := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7166,7 +7151,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7181,7 +7166,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| out |), M.call_closure (| @@ -7193,7 +7178,7 @@ Module slice. [ M.read (| M.read (| out |) |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| right, M.call_closure (| @@ -7208,7 +7193,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| left |), M.call_closure (| @@ -7229,7 +7214,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7242,8 +7227,8 @@ Module slice. |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7254,15 +7239,14 @@ Module slice. (* MutToConstPointer *) M.pointer_coercion (M.read (| v_mid |)); M.read (| buf |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| mid |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| mid |)) ] |) |) in - let _ := + let~ _ := M.write (| hole, Value.StructRecord @@ -7278,18 +7262,17 @@ Module slice. |), [ M.read (| buf |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| mid |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| mid |)) ] |)); ("dest", M.read (| v_mid |)) ] |) in M.alloc (| Value.Tuple [] |) in - let left := + let~ left := M.alloc (| M.SubPointer.get_struct_record_field (| hole, @@ -7297,7 +7280,7 @@ Module slice. "dest" |) |) in - let right := + let~ right := M.alloc (| M.SubPointer.get_struct_record_field (| hole, @@ -7305,7 +7288,7 @@ Module slice. "end" |) |) in - let out := M.copy (| v_end |) in + let~ out := M.copy (| v_end |) in M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7331,7 +7314,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let is_l := + let~ is_l := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7377,7 +7360,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| left |), M.call_closure (| @@ -7392,7 +7375,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| right |), M.call_closure (| @@ -7407,7 +7390,7 @@ Module slice. ] |) |) in - let to_copy := + let~ to_copy := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -7425,7 +7408,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| out, M.call_closure (| @@ -7437,7 +7420,7 @@ Module slice. [ M.read (| out |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7458,7 +7441,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7513,7 +7496,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7541,7 +7524,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::copy_nonoverlapping", [ T ] |), @@ -7873,7 +7856,7 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7882,7 +7865,7 @@ Module slice. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7920,14 +7903,14 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7949,7 +7932,7 @@ Module slice. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7965,7 +7948,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -7990,7 +7973,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let buf := + let~ buf := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8001,13 +7984,13 @@ Module slice. [ ElemAllocF ] |), [ - BinOp.Panic.div (| Integer.Usize, M.read (| len |), Value.Integer 2 |); + BinOp.Wrap.div Integer.Usize (M.read (| len |)) (Value.Integer 2); M.read (| elem_alloc_fn |); M.read (| elem_dealloc_fn |) ] |) |) in - let buf_ptr := + let~ buf_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8026,7 +8009,7 @@ Module slice. ] |) |) in - let runs := + let~ runs := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8039,9 +8022,9 @@ Module slice. [ M.read (| run_alloc_fn |); M.read (| run_dealloc_fn |) ] |) |) in - let end_ := M.alloc (| Value.Integer 0 |) in - let start := M.alloc (| Value.Integer 0 |) in - let _ := + let~ end_ := M.alloc (| Value.Integer 0 |) in + let~ start := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -8097,17 +8080,16 @@ Module slice. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let streak_end := M.copy (| γ0_0 |) in let was_reversed := M.copy (| γ0_1 |) in - let _ := + let~ _ := let β := end_ in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| streak_end |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| streak_end |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8119,7 +8101,7 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8157,7 +8139,7 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| end_, M.call_closure (| @@ -8173,7 +8155,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8190,16 +8172,15 @@ Module slice. [ ("start", M.read (| start |)); ("len", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - M.read (| start |) - |)) + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (M.read (| start |))) ] ] |) |) in - let _ := M.write (| start, M.read (| end_ |) |) in + let~ _ := M.write (| start, M.read (| end_ |) |) in M.loop (| ltac:(M.monadic (M.match_operator (| @@ -8237,7 +8218,7 @@ Module slice. 0 |) in let r := M.copy (| γ0_0 |) in - let left := + let~ left := M.copy (| M.call_closure (| M.get_trait_method (| @@ -8253,7 +8234,7 @@ Module slice. [ runs; M.read (| r |) ] |) |) in - let right := + let~ right := M.copy (| M.call_closure (| M.get_trait_method (| @@ -8268,15 +8249,14 @@ Module slice. |), [ runs; - BinOp.Panic.add (| - Integer.Usize, - M.read (| r |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| r |)) + (Value.Integer 1) ] |) |) in - let merge_slice := + let~ merge_slice := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8304,29 +8284,28 @@ Module slice. |) |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| right, "core::slice::sort::TimSortRun", "start" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| right, "core::slice::sort::TimSortRun", "len" |) - |) - |)) + |))) ] ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -8348,7 +8327,7 @@ Module slice. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_trait_method (| @@ -8363,11 +8342,10 @@ Module slice. |), [ runs; - BinOp.Panic.add (| - Integer.Usize, - M.read (| r |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| r |)) + (Value.Integer 1) ] |), Value.StructRecord @@ -8382,26 +8360,25 @@ Module slice. |) |)); ("len", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| left, "core::slice::sort::TimSortRun", "len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| right, "core::slice::sort::TimSortRun", "len" |) - |) - |)) + |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8421,7 +8398,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -8441,7 +8418,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -8452,7 +8429,7 @@ Module slice. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8461,7 +8438,7 @@ Module slice. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8592,7 +8569,7 @@ Module slice. (let runs := M.alloc (| runs |) in let stop := M.alloc (| stop |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8618,41 +8595,38 @@ Module slice. LogicalOp.or (| LogicalOp.or (| BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) |) |), "core::slice::sort::TimSortRun", "start" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) |) |), "core::slice::sort::TimSortRun", "len" |) - |) - |)) + |))) (M.read (| stop |)), ltac:(M.monadic (BinOp.Pure.le @@ -8661,11 +8635,10 @@ Module slice. M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 2 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 2) |) |), "core::slice::sort::TimSortRun", @@ -8677,11 +8650,10 @@ Module slice. M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) |) |), "core::slice::sort::TimSortRun", @@ -8699,52 +8671,48 @@ Module slice. M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 3 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 3) |) |), "core::slice::sort::TimSortRun", "len" |) |)) - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 2 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 2) |) |), "core::slice::sort::TimSortRun", "len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) |) |), "core::slice::sort::TimSortRun", "len" |) - |) - |)))) + |))))) |))) |), ltac:(M.monadic @@ -8757,52 +8725,48 @@ Module slice. M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 4 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 4) |) |), "core::slice::sort::TimSortRun", "len" |) |)) - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 3 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 3) |) |), "core::slice::sort::TimSortRun", "len" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 2 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 2) |) |), "core::slice::sort::TimSortRun", "len" |) - |) - |)))) + |))))) |))) |))) |) @@ -8825,11 +8789,10 @@ Module slice. M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 3 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 3) |) |), "core::slice::sort::TimSortRun", @@ -8841,11 +8804,10 @@ Module slice. M.SubPointer.get_array_field (| M.read (| runs |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (Value.Integer 1) |) |), "core::slice::sort::TimSortRun", @@ -8862,12 +8824,7 @@ Module slice. M.alloc (| Value.StructTuple "core::option::Option::Some" - [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 3 - |) + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (Value.Integer 3) ] |))); fun γ => @@ -8875,12 +8832,7 @@ Module slice. (M.alloc (| Value.StructTuple "core::option::Option::Some" - [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - Value.Integer 2 - |) + [ BinOp.Wrap.sub Integer.Usize (M.read (| n |)) (Value.Integer 2) ] |))) ] @@ -8997,7 +8949,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9196,7 +9148,7 @@ Module slice. (let self := M.alloc (| self |) in let val := M.alloc (| val |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9223,7 +9175,7 @@ Module slice. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let old_capacity := + let~ old_capacity := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9231,7 +9183,7 @@ Module slice. "capacity" |) |) in - let old_buf_ptr := + let~ old_buf_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9252,26 +9204,25 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "capacity" |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "capacity" |) - |), - Value.Integer 2 - |) + |)) + (Value.Integer 2) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9331,8 +9282,8 @@ Module slice. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -9365,7 +9316,7 @@ Module slice. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9398,8 +9349,8 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9447,7 +9398,7 @@ Module slice. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9456,7 +9407,7 @@ Module slice. |) in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) @@ -9492,7 +9443,7 @@ Module slice. (let self := M.alloc (| self |) in let index := M.alloc (| index |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9540,8 +9491,8 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let ptr := + let~ _ := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9572,7 +9523,7 @@ Module slice. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -9593,26 +9544,24 @@ Module slice. [ M.read (| ptr |); Value.Integer 1 ] |)); M.read (| ptr |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::slice::sort::merge_sort::RunVec", "len" |) - |), - M.read (| index |) - |), - Value.Integer 1 - |) + |)) + (M.read (| index |))) + (Value.Integer 1) ] |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9621,7 +9570,7 @@ Module slice. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) @@ -9749,7 +9698,7 @@ Module slice. ltac:(M.monadic (M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9885,7 +9834,7 @@ Module slice. ltac:(M.monadic (M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10005,7 +9954,7 @@ Module slice. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10205,14 +10154,14 @@ Module slice. let end_ := M.alloc (| end_ |) in let is_less := M.alloc (| is_less |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10244,11 +10193,9 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let start_end_diff := - M.alloc (| - BinOp.Panic.sub (| Integer.Usize, M.read (| end_ |), M.read (| start |) |) - |) in - let _ := + let~ start_end_diff := + M.alloc (| BinOp.Wrap.sub Integer.Usize (M.read (| end_ |)) (M.read (| start |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10270,33 +10217,32 @@ Module slice. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| end_, M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| start |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| start |)) + (M.read (| M.get_constant (| "core::slice::sort::provide_sorted_batch::MIN_INSERTION_RUN" |) - |) - |); + |)); M.read (| len |) ] |) |) in - let presorted_start := + let~ presorted_start := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), [ M.read (| start_end_diff |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -10386,14 +10332,14 @@ Module slice. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10414,8 +10360,8 @@ Module slice. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let end_ := M.alloc (| Value.Integer 2 |) in - let assume_reverse := + let~ end_ := M.alloc (| Value.Integer 2 |) in + let~ assume_reverse := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10457,7 +10403,7 @@ Module slice. (let γ := M.use assume_reverse in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -10505,11 +10451,10 @@ Module slice. |), [ M.read (| v |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (Value.Integer 1) ] |) ] @@ -10522,15 +10467,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := end_ in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -10538,7 +10482,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -10552,7 +10496,7 @@ Module slice. M.alloc (| Value.Tuple [ M.read (| end_ |); Value.Bool true ] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -10601,11 +10545,10 @@ Module slice. |), [ M.read (| v |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| end_ |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| end_ |)) + (Value.Integer 1) ] |) ] @@ -10618,15 +10561,14 @@ Module slice. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := end_ in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -10634,7 +10576,7 @@ Module slice. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/slice/specialize.v b/CoqOfRust/core/slice/specialize.v index 593b3ab78..03ca5d717 100644 --- a/CoqOfRust/core/slice/specialize.v +++ b/CoqOfRust/core/slice/specialize.v @@ -54,7 +54,7 @@ Module slice. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let last := M.copy (| γ1_0 |) in let elems := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -75,7 +75,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -94,7 +94,12 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -106,7 +111,7 @@ Module slice. 0 |) in let el := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -190,7 +195,7 @@ Module slice. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -207,7 +212,9 @@ Module slice. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -219,7 +226,7 @@ Module slice. 0 |) in let item := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| item |), M.read (| value |) |) in M.alloc (| Value.Tuple [] |))) ] diff --git a/CoqOfRust/core/str/count.v b/CoqOfRust/core/str/count.v index 7d7f09d1e..10b84e14c 100644 --- a/CoqOfRust/core/str/count.v +++ b/CoqOfRust/core/str/count.v @@ -45,11 +45,10 @@ Module str. M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| s |) ] |)) - (BinOp.Panic.mul (| - Integer.Usize, - M.read (| M.get_constant (| "core::str::count::USIZE_SIZE" |) |), - M.read (| M.get_constant (| "core::str::count::UNROLL_INNER" |) |) - |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| M.get_constant (| "core::str::count::USIZE_SIZE" |) |)) + (M.read (| M.get_constant (| "core::str::count::UNROLL_INNER" |) |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| @@ -184,7 +183,7 @@ Module str. let head := M.copy (| γ0_0 |) in let body := M.copy (| γ0_1 |) in let tail := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -273,27 +272,26 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let total := + let~ total := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_function (| "core::str::count::char_count_general_case", [] |), [ M.read (| head |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::str::count::char_count_general_case", [] |), [ M.read (| tail |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -332,7 +330,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -351,7 +349,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -363,7 +366,7 @@ Module str. 0 |) in let chunk := M.copy (| γ0_0 |) in - let counts := M.alloc (| Value.Integer 0 |) in + let~ counts := M.alloc (| Value.Integer 0 |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -393,7 +396,7 @@ Module str. let unrolled_chunks := M.copy (| γ0_0 |) in let remainder := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -424,7 +427,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -452,7 +455,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -510,7 +518,7 @@ Module str. |) in M.loop (| ltac:(M.monadic - (let + (let~ _ := M.match_operator (| M.alloc (| @@ -537,7 +545,13 @@ Module str. fun γ => ltac:(M.monadic - (M.alloc (| + (let + _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -564,19 +578,19 @@ Module str. M.copy (| γ0_0 |) in - let + let~ _ := let β := counts in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::str::count::contains_non_continuation_byte", [] @@ -586,8 +600,7 @@ Module str. word |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple @@ -610,21 +623,20 @@ Module str. |))) ] |)) in - let _ := + let~ _ := let β := total in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_function (| "core::str::count::sum_bytes_in_usize", [] |), [ M.read (| counts |) ] - |) - |) + |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -655,11 +667,11 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let counts := + let~ counts := M.alloc (| Value.Integer 0 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -697,7 +709,7 @@ Module str. |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -723,7 +735,13 @@ Module str. fun γ => ltac:(M.monadic - (M.alloc (| + (let + _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -750,19 +768,19 @@ Module str. M.copy (| γ0_0 |) in - let + let~ _ := let β := counts in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::str::count::contains_non_continuation_byte", [] @@ -772,8 +790,7 @@ Module str. word |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple @@ -788,14 +805,14 @@ Module str. |))) ] |)) in - let _ := + let~ _ := let β := total in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_function (| "core::str::count::sum_bytes_in_usize", [] @@ -805,8 +822,7 @@ Module str. counts |) ] - |) - |) + |)) |) in M.break (||) |) @@ -853,8 +869,8 @@ Module str. (let w := M.alloc (| w |) in BinOp.Pure.bit_and (BinOp.Pure.bit_or - (BinOp.Panic.shr (| UnOp.Pure.not (M.read (| w |)), Value.Integer 7 |)) - (BinOp.Panic.shr (| M.read (| w |), Value.Integer 6 |))) + (BinOp.Wrap.shr (UnOp.Pure.not (M.read (| w |))) (Value.Integer 7)) + (BinOp.Wrap.shr (M.read (| w |)) (Value.Integer 6))) (M.read (| M.get_constant (| "core::str::count::contains_non_continuation_byte::LSB" |) |)))) @@ -893,25 +909,24 @@ Module str. ltac:(M.monadic (let values := M.alloc (| values |) in M.read (| - let pair_sum := + let~ pair_sum := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Pure.bit_and + BinOp.Wrap.add + Integer.Usize + (BinOp.Pure.bit_and (M.read (| values |)) (M.read (| M.get_constant (| "core::str::count::sum_bytes_in_usize::SKIP_BYTES" |) - |)), - BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| values |), Value.Integer 8 |)) + |))) + (BinOp.Pure.bit_and + (BinOp.Wrap.shr (M.read (| values |)) (Value.Integer 8)) (M.read (| M.get_constant (| "core::str::count::sum_bytes_in_usize::SKIP_BYTES" |) - |)) - |) + |))) |) in M.alloc (| - BinOp.Panic.shr (| - M.call_closure (| + BinOp.Wrap.shr + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_mul", [] |), [ M.read (| pair_sum |); @@ -919,17 +934,14 @@ Module str. M.get_constant (| "core::str::count::sum_bytes_in_usize::LSB_SHORTS" |) |) ] - |), - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.get_constant (| "core::str::count::USIZE_SIZE" |) |), - Value.Integer 2 - |), - Value.Integer 8 - |) - |) + |)) + (BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "core::str::count::USIZE_SIZE" |) |)) + (Value.Integer 2)) + (Value.Integer 8)) |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/core/str/error.v b/CoqOfRust/core/str/error.v index 876e702d1..558501311 100644 --- a/CoqOfRust/core/str/error.v +++ b/CoqOfRust/core/str/error.v @@ -287,7 +287,8 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) diff --git a/CoqOfRust/core/str/iter.v b/CoqOfRust/core/str/iter.v index ab73ba537..65f9315ef 100644 --- a/CoqOfRust/core/str/iter.v +++ b/CoqOfRust/core/str/iter.v @@ -195,7 +195,7 @@ Module str. (let self := M.alloc (| self |) in let remainder := M.alloc (| remainder |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -212,7 +212,7 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let chunks := + let~ chunks := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -238,8 +238,8 @@ Module str. ] |) |) in - let bytes_skipped := M.alloc (| Value.Integer 0 |) in - let _ := + let~ bytes_skipped := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -285,23 +285,22 @@ Module str. 0 |) in let chunk := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := bytes_skipped in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| M.get_constant (| "core::str::iter::advance_by::CHUNK_SIZE" |) - |) - |) + |)) |) in - let start_bytes := + let~ start_bytes := M.alloc (| repeat (Value.Bool false) 32 |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -336,7 +335,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -356,7 +355,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -370,7 +374,7 @@ Module str. 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| start_bytes, @@ -399,14 +403,14 @@ Module str. |))) ] |)) in - let _ := + let~ _ := let β := remainder in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.rust_cast + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_trait_method (| "core::iter::traits::iterator::Iterator", @@ -472,8 +476,7 @@ Module str. ] |) ] - |)) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -481,7 +484,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -492,7 +495,7 @@ Module str. ] |))) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -559,7 +562,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let b := + let~ b := M.copy (| M.SubPointer.get_array_field (| M.call_closure (| @@ -581,7 +584,7 @@ Module str. M.alloc (| Value.Integer 0 |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -610,7 +613,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -652,7 +655,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -666,7 +669,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -704,13 +707,13 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := remainder in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let b := + let~ b := M.copy (| M.SubPointer.get_array_field (| M.call_closure (| @@ -730,7 +733,7 @@ Module str. M.alloc (| Value.Integer 0 |) |) |) in - let slurp := + let~ slurp := M.alloc (| M.call_closure (| M.get_function (| @@ -740,7 +743,7 @@ Module str. [ M.read (| b |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -779,7 +782,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -839,7 +842,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -861,11 +864,10 @@ Module str. M.alloc (| Value.Tuple [ - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| Integer.Usize, M.read (| len |), Value.Integer 3 |), - Value.Integer 4 - |); + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 3)) + (Value.Integer 4); Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] ] |) @@ -933,7 +935,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1023,7 +1025,7 @@ Module str. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1127,7 +1129,7 @@ Module str. val)) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1485,7 +1487,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pre_len := + let~ pre_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1530,7 +1532,8 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1540,7 +1543,7 @@ Module str. 0 |) in let ch := M.copy (| γ0_0 |) in - let index := + let~ index := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1548,7 +1551,7 @@ Module str. "front_offset" |) |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1571,7 +1574,7 @@ Module str. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1580,15 +1583,10 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| pre_len |), - M.read (| len |) - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.sub Integer.Usize (M.read (| pre_len |)) (M.read (| len |))) |) in M.alloc (| Value.StructTuple @@ -1756,18 +1754,18 @@ Module str. ltac:(M.monadic (let ch := M.copy (| γ |) in M.read (| - let index := + let~ index := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::CharIndices", "front_offset" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply @@ -1788,8 +1786,7 @@ Module str. "iter" |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [ M.read (| index |); M.read (| ch |) ] |) |))) @@ -2620,7 +2617,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let s := M.copy (| self |) in + let~ s := M.copy (| self |) in M.alloc (| M.struct_record_update (M.read (| M.read (| s |) |)) @@ -2838,7 +2835,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2858,7 +2855,7 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2885,23 +2882,22 @@ Module str. |), ltac:(M.monadic (BinOp.Pure.gt - (BinOp.Panic.sub (| - Integer.Usize, - M.read (| + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "end" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::iter::SplitInternal", "start" |) - |) - |)) + |))) (Value.Integer 0))) |) |)) in @@ -2913,7 +2909,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let string := + let~ string := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3016,7 +3012,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3041,7 +3037,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let haystack := + let~ haystack := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3092,7 +3088,7 @@ Module str. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let a := M.copy (| γ1_0 |) in let b := M.copy (| γ1_1 |) in - let elt := + let~ elt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3119,7 +3115,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3133,7 +3129,8 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], @@ -3183,7 +3180,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3208,7 +3205,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let haystack := + let~ haystack := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3258,7 +3255,7 @@ Module str. let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let b := M.copy (| γ1_1 |) in - let elt := + let~ elt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3285,7 +3282,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3299,7 +3296,8 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::str::iter::SplitInternal") [ P ], @@ -3366,7 +3364,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3391,7 +3389,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3411,7 +3409,7 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3507,7 +3505,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let haystack := + let~ haystack := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3558,7 +3556,7 @@ Module str. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let a := M.copy (| γ1_0 |) in let b := M.copy (| γ1_1 |) in - let elt := + let~ elt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3585,7 +3583,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3599,7 +3597,8 @@ Module str. |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3711,7 +3710,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3736,7 +3735,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3756,7 +3755,7 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3852,7 +3851,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let haystack := + let~ haystack := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3902,7 +3901,7 @@ Module str. let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let b := M.copy (| γ1_1 |) in - let elt := + let~ elt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3929,7 +3928,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3943,7 +3942,8 @@ Module str. |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4023,7 +4023,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5134,7 +5134,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let s := M.copy (| self |) in + let~ s := M.copy (| self |) in M.alloc (| M.struct_record_update (M.read (| M.read (| s |) |)) @@ -5308,7 +5308,7 @@ Module str. ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5335,7 +5335,7 @@ Module str. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5344,7 +5344,7 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -5413,7 +5413,7 @@ Module str. ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5440,7 +5440,7 @@ Module str. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5449,7 +5449,7 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| M.call_closure (| @@ -5945,7 +5945,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let s := M.copy (| self |) in + let~ s := M.copy (| self |) in M.alloc (| Value.StructTuple "core::str::iter::MatchIndicesInternal" @@ -6723,7 +6723,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let s := M.copy (| self |) in + let~ s := M.copy (| self |) in M.alloc (| Value.StructTuple "core::str::iter::MatchesInternal" @@ -8599,7 +8599,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9056,7 +9056,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9080,7 +9080,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let tmp := + let~ tmp := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9088,7 +9088,7 @@ Module str. "extra" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9108,7 +9108,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let buf := M.alloc (| repeat (Value.Integer 0) 2 |) in + let~ buf := M.alloc (| repeat (Value.Integer 0) 2 |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9146,7 +9146,7 @@ Module str. ltac:(M.monadic (let ch := M.copy (| γ |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9169,7 +9169,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9187,7 +9187,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -9249,7 +9249,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9294,15 +9294,10 @@ Module str. M.alloc (| Value.Tuple [ - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 2 - |), - Value.Integer 3 - |); + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 2)) + (Value.Integer 3); Value.StructTuple "core::option::Option::Some" [ M.read (| len |) ] ] |))); @@ -9311,28 +9306,16 @@ Module str. (M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 2 - |), - Value.Integer 3 - |), - Value.Integer 1 - |); + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 2)) + (Value.Integer 3)) + (Value.Integer 1); Value.StructTuple "core::option::Option::Some" - [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |) - ] + [ BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 1) ] ] |))) ] diff --git a/CoqOfRust/core/str/lossy.v b/CoqOfRust/core/str/lossy.v index c515dcf6a..a447ab8da 100644 --- a/CoqOfRust/core/str/lossy.v +++ b/CoqOfRust/core/str/lossy.v @@ -344,7 +344,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -420,7 +420,7 @@ Module str. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -458,7 +458,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -475,7 +475,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -487,8 +492,8 @@ Module str. 0 |) in let chunk := M.copy (| γ0_0 |) in - let _ := - let valid := + let~ _ := + let~ valid := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -499,8 +504,8 @@ Module str. [ chunk ] |) |) in - let from := M.alloc (| Value.Integer 0 |) in - let _ := + let~ from := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -530,7 +535,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -548,7 +553,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -577,7 +587,7 @@ Module str. M.copy (| γ1_0 |) in let c := M.copy (| γ1_1 |) in - let esc := + let~ esc := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -618,7 +628,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -760,7 +770,7 @@ Module str. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -790,7 +800,7 @@ Module str. |) in M.loop (| ltac:(M.monadic - (let + (let~ _ := M.match_operator (| M.alloc (| @@ -812,7 +822,13 @@ Module str. fun γ => ltac:(M.monadic - (M.alloc (| + (let + _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -834,7 +850,7 @@ Module str. M.copy (| γ0_0 |) in - let + let~ _ := M.match_operator (| M.alloc (| @@ -963,15 +979,15 @@ Module str. |))) ] |)) in - let _ := + let~ _ := M.write (| from, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "char", @@ -983,8 +999,7 @@ Module str. c |) ] - |) - |) + |)) |) in M.alloc (| Value.Tuple [] @@ -1002,7 +1017,7 @@ Module str. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1141,7 +1156,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1161,7 +1176,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -1176,7 +1196,7 @@ Module str. |) in let γ0_0 := M.read (| γ0_0 |) in let b := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1600,7 +1620,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1638,9 +1658,9 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let i := M.alloc (| Value.Integer 0 |) in - let valid_up_to := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ valid_up_to := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1675,7 +1695,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let byte := + let~ byte := M.copy (| M.call_closure (| M.get_associated_function (| @@ -1695,17 +1715,13 @@ Module str. ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1726,7 +1742,7 @@ Module str. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let w := + (let~ w := M.alloc (| M.call_closure (| M.get_function (| @@ -1746,7 +1762,7 @@ Module str. M.read (| γ |), Value.Integer 2 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1796,15 +1812,14 @@ Module str. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1814,7 +1829,7 @@ Module str. M.read (| γ |), Value.Integer 3 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -1911,17 +1926,16 @@ Module str. |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1971,15 +1985,14 @@ Module str. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1989,7 +2002,7 @@ Module str. M.read (| γ |), Value.Integer 4 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -2073,17 +2086,16 @@ Module str. |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2133,17 +2145,16 @@ Module str. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2193,15 +2204,14 @@ Module str. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2213,14 +2223,14 @@ Module str. |))) ] |) in - let _ := M.write (| valid_up_to, M.read (| i |) |) in + let~ _ := M.write (| valid_up_to, M.read (| i |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -2258,7 +2268,7 @@ Module str. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let inspected := M.copy (| γ0_0 |) in let remaining := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/core/str/mod.v b/CoqOfRust/core/str/mod.v index 3937d9fa1..ea93b695f 100644 --- a/CoqOfRust/core/str/mod.v +++ b/CoqOfRust/core/str/mod.v @@ -150,7 +150,7 @@ Module str. let begin := M.alloc (| begin |) in let end_ := M.alloc (| end_ |) in M.read (| - let trunc_len := + let~ trunc_len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "floor_char_boundary", [] |), @@ -162,7 +162,7 @@ Module str. ] |) |) in - let s_trunc := + let~ s_trunc := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -180,7 +180,7 @@ Module str. ] |) |) in - let ellipsis := + let~ ellipsis := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -203,7 +203,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -232,7 +232,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let oob_index := + let~ oob_index := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -326,7 +326,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -409,7 +409,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let index := + let~ index := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -435,14 +435,14 @@ Module str. ] |) |) in - let char_start := + let~ char_start := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "floor_char_boundary", [] |), [ M.read (| s |); M.read (| index |) ] |) |) in - let ch := + let~ ch := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -491,21 +491,20 @@ Module str. ] |) |) in - let char_range := + let~ char_range := M.alloc (| Value.StructRecord "core::ops::range::Range" [ ("start", M.read (| char_start |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| char_start |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| char_start |)) + (M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), [ M.read (| ch |) ] - |) - |)) + |))) ] |) in M.alloc (| @@ -674,7 +673,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -713,7 +712,8 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| BinOp.Pure.eq (M.read (| index |)) (M.call_closure (| @@ -797,14 +797,14 @@ Module str. |))); fun γ => ltac:(M.monadic - (let lower_bound := + (let~ lower_bound := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_sub", [] |), [ M.read (| index |); Value.Integer 3 ] |) |) in - let new_index := + let~ new_index := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -890,18 +890,17 @@ Module str. |) |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| lower_bound |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| lower_bound |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::option::Option") [ Ty.path "usize" ], "unwrap_unchecked", [] |), [ M.read (| new_index |) ] - |) - |) + |)) |))) ] |) @@ -956,16 +955,12 @@ Module str. |))); fun γ => ltac:(M.monadic - (let upper_bound := + (let~ upper_bound := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "usize", [], "min", [] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| index |), - Value.Integer 4 - |); + BinOp.Wrap.add Integer.Usize (M.read (| index |)) (Value.Integer 4); M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] @@ -1074,11 +1069,10 @@ Module str. fun γ => ltac:(M.monadic (let pos := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.Usize, - M.read (| pos |), - M.read (| index |) - |))) + BinOp.Wrap.add + Integer.Usize + (M.read (| pos |)) + (M.read (| index |)))) ] |) | _ => M.impossible (||) @@ -1484,14 +1478,14 @@ Module str. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] |) |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_mut_ptr", [] |), @@ -1530,11 +1524,7 @@ Module str. |), [ M.read (| ptr |); M.read (| mid |) ] |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| mid |) - |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (M.read (| mid |)) ] |) ] @@ -1716,7 +1706,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let inner := + let~ inner := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3034,9 +3024,9 @@ Module str. (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in M.read (| - let i := M.alloc (| Value.Integer 0 |) in - let j := M.alloc (| Value.Integer 0 |) in - let matcher := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ j := M.alloc (| Value.Integer 0 |) in + let~ matcher := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3049,7 +3039,7 @@ Module str. [ M.read (| pat |); M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3078,13 +3068,13 @@ Module str. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let a := M.copy (| γ1_0 |) in let b := M.copy (| γ1_1 |) in - let _ := M.write (| i, M.read (| a |) |) in - let _ := M.write (| j, M.read (| b |) |) in + let~ _ := M.write (| i, M.read (| a |) |) in + let~ _ := M.write (| j, M.read (| b |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3112,7 +3102,7 @@ Module str. let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let b := M.copy (| γ1_1 |) in - let _ := M.write (| j, M.read (| b |) |) in + let~ _ := M.write (| j, M.read (| b |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] @@ -3156,14 +3146,14 @@ Module str. (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in M.read (| - let i := + let~ i := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| self |) ] |) |) in - let matcher := + let~ matcher := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3176,7 +3166,7 @@ Module str. [ M.read (| pat |); M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3204,7 +3194,7 @@ Module str. let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let a := M.copy (| γ1_0 |) in - let _ := M.write (| i, M.read (| a |) |) in + let~ _ := M.write (| i, M.read (| a |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] @@ -3303,8 +3293,8 @@ Module str. (let self := M.alloc (| self |) in let pat := M.alloc (| pat |) in M.read (| - let j := M.alloc (| Value.Integer 0 |) in - let matcher := + let~ j := M.alloc (| Value.Integer 0 |) in + let~ matcher := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3317,7 +3307,7 @@ Module str. [ M.read (| pat |); M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3345,7 +3335,7 @@ Module str. let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let b := M.copy (| γ1_1 |) in - let _ := M.write (| j, M.read (| b |) |) in + let~ _ := M.write (| j, M.read (| b |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] @@ -3543,7 +3533,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes_mut", [] |), @@ -3580,7 +3570,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let me := + let~ me := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes_mut", [] |), @@ -3730,7 +3720,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let chars := + let~ chars := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "chars", [] |), diff --git a/CoqOfRust/core/str/pattern.v b/CoqOfRust/core/str/pattern.v index fb576e630..4862a5213 100644 --- a/CoqOfRust/core/str/pattern.v +++ b/CoqOfRust/core/str/pattern.v @@ -233,7 +233,7 @@ Module str. |) in let start := M.copy (| γ0_0 |) in let len := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -245,7 +245,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ start; M.alloc (| Value.Integer 0 |) ] @@ -278,7 +278,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -421,7 +421,7 @@ Module str. |) in let start := M.copy (| γ0_0 |) in let end_ := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -433,7 +433,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -479,7 +479,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -691,7 +691,7 @@ Module str. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -701,7 +701,7 @@ Module str. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -908,6 +908,7 @@ Module str. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::str::pattern::SearchStep::Done" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -988,7 +989,12 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Done" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1065,7 +1071,12 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Done" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1146,7 +1157,12 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Done" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1223,7 +1239,12 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Done" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1382,7 +1403,7 @@ Module str. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let names := + let~ names := M.alloc (| M.alloc (| Value.Array @@ -1396,7 +1417,7 @@ Module str. ] |) |) in - let values := + let~ values := M.alloc (| (* Unsize *) M.pointer_coercion @@ -1534,7 +1555,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let old_finger := + let~ old_finger := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1542,7 +1563,7 @@ Module str. "finger" |) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1574,14 +1595,14 @@ Module str. ] |) |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "chars", [] |), [ M.read (| slice |) ] |) |) in - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1625,7 +1646,7 @@ Module str. 0 |) in let ch := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1634,13 +1655,13 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_len |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| old_len |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], @@ -1655,9 +1676,7 @@ Module str. "iter" |) ] - |) - |) - |) + |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1777,7 +1796,7 @@ Module str. M.read (| M.loop (| ltac:(M.monadic - (let bytes := + (let~ bytes := M.copy (| M.match_operator (| M.alloc (| @@ -1895,7 +1914,7 @@ Module str. ] |) |) in - let last_byte := + let~ last_byte := M.copy (| M.call_closure (| M.get_associated_function (| @@ -1911,17 +1930,16 @@ Module str. "core::str::pattern::CharSearcher", "utf8_encoded" |)); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "utf8_size" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in @@ -1944,7 +1962,7 @@ Module str. 0 |) in let index := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1953,15 +1971,13 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| index |), - Value.Integer 1 - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| index |)) + (Value.Integer 1)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1992,25 +2008,24 @@ Module str. M.read (| γ |), Value.Bool true |) in - let found_char := + let~ found_char := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "finger" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "utf8_size" |) - |) - |) + |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2187,7 +2202,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2260,7 +2275,7 @@ Module str. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let old_finger := + let~ old_finger := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2268,7 +2283,7 @@ Module str. "finger_back" |) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2300,14 +2315,14 @@ Module str. ] |) |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "chars", [] |), [ M.read (| slice |) ] |) |) in - let old_len := + let~ old_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2351,7 +2366,7 @@ Module str. 0 |) in let ch := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2360,13 +2375,13 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| old_len |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| old_len |)) + (M.call_closure (| M.get_trait_method (| "core::iter::traits::exact_size::ExactSizeIterator", Ty.apply (Ty.path "core::slice::iter::Iter") [ Ty.path "u8" ], @@ -2381,9 +2396,7 @@ Module str. "iter" |) ] - |) - |) - |) + |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2507,7 +2520,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let haystack := + let~ haystack := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes", [] |), @@ -2527,7 +2540,7 @@ Module str. M.read (| M.loop (| ltac:(M.monadic - (let bytes := + (let~ bytes := M.copy (| M.match_operator (| M.alloc (| @@ -2633,7 +2646,7 @@ Module str. ] |) |) in - let last_byte := + let~ last_byte := M.copy (| M.call_closure (| M.get_associated_function (| @@ -2649,17 +2662,16 @@ Module str. "core::str::pattern::CharSearcher", "utf8_encoded" |)); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "utf8_size" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) |) in @@ -2682,35 +2694,33 @@ Module str. 0 |) in let index := M.copy (| γ0_0 |) in - let index := + let~ index := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "finger" |) - |), - M.read (| index |) - |) + |)) + (M.read (| index |)) |) in - let shift := + let~ shift := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "utf8_size" |) - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2728,13 +2738,12 @@ Module str. M.read (| γ |), Value.Bool true |) in - let found_char := + let~ found_char := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| index |), - M.read (| shift |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| index |)) + (M.read (| shift |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2764,17 +2773,16 @@ Module str. ("start", M.read (| found_char |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| found_char |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| found_char |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::CharSearcher", "utf8_size" |) - |) - |)) + |))) ] ] |) @@ -2872,7 +2880,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2894,9 +2902,9 @@ Module str. "finger_back" |) |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self @@ -2904,8 +2912,8 @@ Module str. "core::str::pattern::CharSearcher", "finger_back" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self @@ -2913,8 +2921,7 @@ Module str. "core::str::pattern::CharSearcher", "utf8_size" |) - |) - |) + |)) ] ] |) @@ -2933,7 +2940,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2948,7 +2955,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3030,8 +3037,8 @@ Module str. (let self := M.alloc (| self |) in let haystack := M.alloc (| haystack |) in M.read (| - let utf8_encoded := M.alloc (| repeat (Value.Integer 0) 4 |) in - let utf8_size := + let~ utf8_encoded := M.alloc (| repeat (Value.Integer 0) 4 |) in + let~ utf8_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), @@ -3109,7 +3116,7 @@ Module str. |))); fun γ => ltac:(M.monadic - (let buffer := M.alloc (| repeat (Value.Integer 0) 4 |) in + (let~ buffer := M.alloc (| repeat (Value.Integer 0) 4 |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3790,7 +3797,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let s := + let~ s := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3798,7 +3805,7 @@ Module str. "char_indices" |) |) in - let pre_len := + let~ pre_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3821,7 +3828,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3850,7 +3857,7 @@ Module str. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let c := M.copy (| γ1_1 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3873,13 +3880,12 @@ Module str. ] |) |) in - let char_len := + let~ char_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| pre_len |), - M.read (| len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| pre_len |)) + (M.read (| len |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3920,11 +3926,10 @@ Module str. "core::str::pattern::SearchStep::Match" [ M.read (| i |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| char_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| char_len |)) ] |) |) @@ -3940,11 +3945,10 @@ Module str. "core::str::pattern::SearchStep::Reject" [ M.read (| i |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| char_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| char_len |)) ] |) |) @@ -4003,7 +4007,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let s := + let~ s := M.alloc (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -4011,7 +4015,7 @@ Module str. "char_indices" |) |) in - let pre_len := + let~ pre_len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4034,7 +4038,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4063,7 +4067,7 @@ Module str. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let c := M.copy (| γ1_1 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4086,13 +4090,12 @@ Module str. ] |) |) in - let char_len := + let~ char_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| pre_len |), - M.read (| len |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| pre_len |)) + (M.read (| len |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4133,11 +4136,10 @@ Module str. "core::str::pattern::SearchStep::Match" [ M.read (| i |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| char_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| char_len |)) ] |) |) @@ -4153,11 +4155,10 @@ Module str. "core::str::pattern::SearchStep::Reject" [ M.read (| i |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| char_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| char_len |)) ] |) |) @@ -7035,7 +7036,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7082,7 +7083,8 @@ Module str. [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7146,7 +7148,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7420,15 +7422,15 @@ Module str. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let i := + let~ i := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "str", "len", [] |), [ M.read (| haystack |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", @@ -7440,8 +7442,7 @@ Module str. [ M.read (| self |) ] |) ] - |) - |) + |)) |) in M.alloc (| Value.StructTuple @@ -8196,7 +8197,7 @@ Module str. 0 |) in let searcher := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8228,7 +8229,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_match := + let~ is_match := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -8236,7 +8237,7 @@ Module str. "is_match_fw" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -8252,7 +8253,7 @@ Module str. |) |)) |) in - let pos := + let~ pos := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -8323,6 +8324,8 @@ Module str. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -8343,7 +8346,7 @@ Module str. 0 |) in let ch := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -8352,18 +8355,17 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), [ M.read (| ch |) ] - |) - |) + |)) |) in M.alloc (| Value.StructTuple @@ -8390,7 +8392,7 @@ Module str. 0 |) in let searcher := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8443,7 +8445,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_long := + let~ is_long := M.alloc (| BinOp.Pure.eq (M.read (| @@ -8510,7 +8512,7 @@ Module str. |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -8545,15 +8547,14 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := b in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -8561,7 +8562,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -8574,7 +8575,7 @@ Module str. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -8661,7 +8662,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::StrSearcherImpl::Empty" + |) in + M.alloc (| M.never_to_any (| M.read (| M.loop (| @@ -8712,7 +8718,12 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Done" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -8723,7 +8734,14 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Reject" + |) in + M.alloc (| Value.Tuple [] |))) ] |))) |) @@ -8739,7 +8757,7 @@ Module str. 0 |) in let searcher := M.alloc (| γ0_0 |) in - let is_long := + let~ is_long := M.alloc (| BinOp.Pure.eq (M.read (| @@ -8949,7 +8967,7 @@ Module str. 0 |) in let searcher := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8981,7 +8999,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_match := + let~ is_match := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -8989,7 +9007,7 @@ Module str. "is_match_bw" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -9005,7 +9023,7 @@ Module str. |) |)) |) in - let end_ := + let~ end_ := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -9076,6 +9094,8 @@ Module str. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -9096,7 +9116,7 @@ Module str. 0 |) in let ch := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -9105,18 +9125,17 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.path "char", "len_utf8", [] |), [ M.read (| ch |) ] - |) - |) + |)) |) in M.alloc (| Value.StructTuple @@ -9143,7 +9162,7 @@ Module str. 0 |) in let searcher := M.alloc (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9181,7 +9200,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_long := + let~ is_long := M.alloc (| BinOp.Pure.eq (M.read (| @@ -9248,7 +9267,7 @@ Module str. |) in let a := M.copy (| γ0_0 |) in let b := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -9283,15 +9302,14 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := a in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -9299,7 +9317,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -9312,7 +9330,7 @@ Module str. ] |))) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| searcher |), @@ -9398,7 +9416,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::StrSearcherImpl::Empty" + |) in + M.alloc (| M.never_to_any (| M.read (| M.loop (| @@ -9449,7 +9472,12 @@ Module str. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Done" + |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -9460,7 +9488,14 @@ Module str. |) |) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "core::str::pattern::SearchStep::Reject" + |) in + M.alloc (| Value.Tuple [] |))) ] |))) |) @@ -9476,7 +9511,7 @@ Module str. 0 |) in let searcher := M.alloc (| γ0_0 |) in - let is_long := + let~ is_long := M.alloc (| BinOp.Pure.eq (M.read (| @@ -9752,7 +9787,7 @@ Module str. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let names := + let~ names := M.alloc (| M.alloc (| Value.Array @@ -9768,7 +9803,7 @@ Module str. ] |) |) in - let values := + let~ values := M.alloc (| (* Unsize *) M.pointer_coercion @@ -10080,11 +10115,10 @@ Module str. [ ("start", M.read (| period |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| period |), - M.read (| crit_pos |) - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| period |)) + (M.read (| crit_pos |))) ] ] |) @@ -10096,19 +10130,19 @@ Module str. M.read (| γ |), Value.Bool true |) in - let crit_pos_back := + let~ crit_pos_back := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] @@ -10141,8 +10175,7 @@ Module str. ] |) ] - |) - |) + |)) |) in M.alloc (| Value.StructRecord @@ -10209,18 +10242,18 @@ Module str. ("crit_pos", M.read (| crit_pos |)); ("crit_pos_back", M.read (| crit_pos |)); ("period", - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "usize" ] |), [ M.read (| crit_pos |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") @@ -10229,13 +10262,11 @@ Module str. [] |), [ M.read (| needle |) ] - |), - M.read (| crit_pos |) - |) + |)) + (M.read (| crit_pos |)) ] - |), - Value.Integer 1 - |)); + |)) + (Value.Integer 1)); ("byteset", M.call_closure (| M.get_associated_function (| @@ -10324,10 +10355,11 @@ Module str. (let γ := M.read (| γ |) in let b := M.copy (| γ |) in BinOp.Pure.bit_or - (BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Pure.bit_and (M.read (| b |)) (Value.Integer 63) - |)) + (BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Pure.bit_and + (M.read (| b |)) + (Value.Integer 63))) (M.read (| a |)))) ] |))) @@ -10356,16 +10388,15 @@ Module str. let byte := M.alloc (| byte |) in BinOp.Pure.ne (BinOp.Pure.bit_and - (BinOp.Panic.shr (| - M.read (| + (BinOp.Wrap.shr + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "byteset" |) - |), - M.rust_cast (BinOp.Pure.bit_and (M.read (| byte |)) (Value.Integer 63)) - |)) + |)) + (M.rust_cast (BinOp.Pure.bit_and (M.read (| byte |)) (Value.Integer 63)))) (Value.Integer 1)) (Value.Integer 0))) | _, _ => M.impossible @@ -10456,7 +10487,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let old_pos := + let~ old_pos := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10464,27 +10495,26 @@ Module str. "position" |) |) in - let needle_last := + let~ needle_last := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in M.alloc (| M.never_to_any (| M.read (| M.loop (| ltac:(M.monadic - (let tail_byte := + (let~ tail_byte := M.copy (| M.match_operator (| M.alloc (| @@ -10496,17 +10526,16 @@ Module str. |), [ M.read (| haystack |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "position" |) - |), - M.read (| needle_last |) - |) + |)) + (M.read (| needle_last |)) ] |) |), @@ -10524,10 +10553,12 @@ Module str. b)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10570,7 +10601,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10637,7 +10668,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10664,7 +10695,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10673,20 +10704,19 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10702,7 +10732,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10723,7 +10753,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let start := + let~ start := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10770,7 +10800,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -10808,7 +10838,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -10827,7 +10857,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -10860,17 +10895,16 @@ Module str. M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "position" |) - |), - M.read (| i |) - |) + |)) + (M.read (| i |)) |) |) |)) @@ -10883,7 +10917,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -10892,27 +10926,24 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| i |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| i |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "crit_pos" |) - |) - |), - Value.Integer 1 - |) - |) + |))) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -10933,7 +10964,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -10969,7 +11000,7 @@ Module str. |))) ] |)) in - let start := + let~ start := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -10993,7 +11024,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -11047,7 +11078,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -11070,7 +11101,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -11103,17 +11139,16 @@ Module str. M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "position" |) - |), - M.read (| i |) - |) + |)) + (M.read (| i |)) |) |) |)) @@ -11126,7 +11161,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11135,19 +11170,18 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "period" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -11168,7 +11202,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -11177,9 +11211,9 @@ Module str. "core::str::pattern::TwoWaySearcher", "memory" |), - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -11196,8 +11230,8 @@ Module str. needle |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self @@ -11205,8 +11239,7 @@ Module str. "core::str::pattern::TwoWaySearcher", "period" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] @@ -11233,7 +11266,7 @@ Module str. |))) ] |)) in - let match_pos := + let~ match_pos := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11241,7 +11274,7 @@ Module str. "position" |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11250,20 +11283,19 @@ Module str. |) in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11279,7 +11311,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11303,18 +11335,17 @@ Module str. |), [ M.read (| match_pos |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| match_pos |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| match_pos |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |) - |) + |)) ] |) |))) @@ -11414,7 +11445,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let old_end := + let~ old_end := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11427,7 +11458,7 @@ Module str. M.read (| M.loop (| ltac:(M.monadic - (let front_byte := + (let~ front_byte := M.copy (| M.match_operator (| M.alloc (| @@ -11480,10 +11511,12 @@ Module str. b)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11510,7 +11543,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11577,7 +11610,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11604,7 +11637,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11613,20 +11646,19 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11642,7 +11674,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11672,7 +11704,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let crit := + let~ crit := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -11719,7 +11751,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -11766,7 +11798,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -11789,7 +11821,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -11822,11 +11859,11 @@ Module str. M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self @@ -11834,8 +11871,8 @@ Module str. "core::str::pattern::TwoWaySearcher", "end" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -11850,10 +11887,8 @@ Module str. needle |) ] - |) - |), - M.read (| i |) - |) + |))) + (M.read (| i |)) |) |) |)) @@ -11866,7 +11901,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -11875,23 +11910,21 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "crit_pos_back" |) - |), - M.read (| i |) - |) - |) + |)) + (M.read (| i |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -11912,7 +11945,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -11965,7 +11998,7 @@ Module str. |))) ] |)) in - let needle_end := + let~ needle_end := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -11998,7 +12031,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -12035,7 +12068,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -12054,7 +12087,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -12087,11 +12125,11 @@ Module str. M.SubPointer.get_array_field (| M.read (| haystack |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self @@ -12099,8 +12137,8 @@ Module str. "core::str::pattern::TwoWaySearcher", "end" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path @@ -12115,10 +12153,8 @@ Module str. needle |) ] - |) - |), - M.read (| i |) - |) + |))) + (M.read (| i |)) |) |) |)) @@ -12131,7 +12167,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12140,19 +12176,18 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "period" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -12173,7 +12208,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -12217,28 +12252,27 @@ Module str. |))) ] |)) in - let match_pos := + let~ match_pos := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::str::pattern::TwoWaySearcher", "end" |) - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |) - |) + |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12247,20 +12281,19 @@ Module str. |) in M.write (| β, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| β |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12276,7 +12309,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -12307,18 +12340,17 @@ Module str. |), [ M.read (| match_pos |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| match_pos |), - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.read (| match_pos |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |) - |) + |)) ] |) |))) @@ -12375,11 +12407,11 @@ Module str. (let arr := M.alloc (| arr |) in let order_greater := M.alloc (| order_greater |) in M.read (| - let left := M.alloc (| Value.Integer 0 |) in - let right := M.alloc (| Value.Integer 1 |) in - let offset := M.alloc (| Value.Integer 0 |) in - let period := M.alloc (| Value.Integer 1 |) in - let _ := + let~ left := M.alloc (| Value.Integer 0 |) in + let~ right := M.alloc (| Value.Integer 1 |) in + let~ offset := M.alloc (| Value.Integer 0 |) in + let~ period := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -12397,11 +12429,10 @@ Module str. |), [ M.read (| arr |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| right |), - M.read (| offset |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| right |)) + (M.read (| offset |)) ] |) |) in @@ -12413,16 +12444,15 @@ Module str. |) in let γ0_0 := M.read (| γ0_0 |) in let a := M.copy (| γ0_0 |) in - let b := + let~ b := M.copy (| M.SubPointer.get_array_field (| M.read (| arr |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| left |), - M.read (| offset |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| left |)) + (M.read (| offset |)) |) |) |) in @@ -12452,29 +12482,26 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := right in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (Value.Integer 1)) |) in - let _ := M.write (| offset, Value.Integer 0 |) in - let _ := + let~ _ := M.write (| offset, Value.Integer 0 |) in + let~ _ := M.write (| period, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| right |), - M.read (| left |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| right |)) + (M.read (| left |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -12503,11 +12530,10 @@ Module str. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - Value.Integer 1 - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (Value.Integer 1)) (M.read (| period |)) |)) in let _ := @@ -12515,53 +12541,49 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := right in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.write (| offset, Value.Integer 0 |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := offset in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |))); fun γ => ltac:(M.monadic - (let _ := M.write (| left, M.read (| right |) |) in - let _ := + (let~ _ := M.write (| left, M.read (| right |) |) in + let~ _ := let β := right in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := M.write (| offset, Value.Integer 0 |) in - let _ := M.write (| period, Value.Integer 1 |) in + let~ _ := M.write (| offset, Value.Integer 0 |) in + let~ _ := M.write (| period, Value.Integer 1 |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -12572,7 +12594,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -12637,11 +12659,11 @@ Module str. let known_period := M.alloc (| known_period |) in let order_greater := M.alloc (| order_greater |) in M.read (| - let left := M.alloc (| Value.Integer 0 |) in - let right := M.alloc (| Value.Integer 1 |) in - let offset := M.alloc (| Value.Integer 0 |) in - let period := M.alloc (| Value.Integer 1 |) in - let n := + let~ left := M.alloc (| Value.Integer 0 |) in + let~ right := M.alloc (| Value.Integer 1 |) in + let~ offset := M.alloc (| Value.Integer 0 |) in + let~ period := M.alloc (| Value.Integer 1 |) in + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12652,7 +12674,7 @@ Module str. [ M.read (| arr |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -12664,58 +12686,51 @@ Module str. M.use (M.alloc (| BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.Usize, - M.read (| right |), - M.read (| offset |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| right |)) + (M.read (| offset |))) (M.read (| n |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let a := + let~ a := M.copy (| M.SubPointer.get_array_field (| M.read (| arr |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.read (| right |) - |), - M.read (| offset |) - |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.read (| right |))) + (M.read (| offset |))) |) |) |) in - let b := + let~ b := M.copy (| M.SubPointer.get_array_field (| M.read (| arr |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| n |), - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.read (| left |) - |), - M.read (| offset |) - |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| n |)) + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.read (| left |))) + (M.read (| offset |))) |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12742,29 +12757,26 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := right in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (Value.Integer 1)) |) in - let _ := M.write (| offset, Value.Integer 0 |) in - let _ := + let~ _ := M.write (| offset, Value.Integer 0 |) in + let~ _ := M.write (| period, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| right |), - M.read (| left |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| right |)) + (M.read (| left |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -12793,11 +12805,10 @@ Module str. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - Value.Integer 1 - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (Value.Integer 1)) (M.read (| period |)) |)) in let _ := @@ -12805,53 +12816,49 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := right in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.write (| offset, Value.Integer 0 |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := offset in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] |))); fun γ => ltac:(M.monadic - (let _ := M.write (| left, M.read (| right |) |) in - let _ := + (let~ _ := M.write (| left, M.read (| right |) |) in + let~ _ := let β := right in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := M.write (| offset, Value.Integer 0 |) in - let _ := M.write (| period, Value.Integer 1 |) in + let~ _ := M.write (| offset, Value.Integer 0 |) in + let~ _ := M.write (| period, Value.Integer 1 |) in M.alloc (| Value.Tuple [] |))) ] |))) @@ -12883,7 +12890,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -12892,7 +12899,7 @@ Module str. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12901,7 +12908,7 @@ Module str. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13223,21 +13230,21 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let needle := + let~ needle := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes", [] |), [ M.read (| needle |) ] |) |) in - let haystack := + let~ haystack := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "as_bytes", [] |), [ M.read (| haystack |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13246,7 +13253,7 @@ Module str. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13291,29 +13298,28 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let first_probe := + let~ first_probe := M.copy (| M.SubPointer.get_array_field (| M.read (| needle |), M.alloc (| Value.Integer 0 |) |) |) in - let last_byte_offset := + let~ last_byte_offset := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| needle |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) in - let second_probe_offset := + let~ second_probe_offset := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -13433,7 +13439,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13451,13 +13457,12 @@ Module str. |), [ M.read (| haystack |) ] |)) - (BinOp.Panic.add (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) - |), - M.read (| last_byte_offset |) - |)) + |)) + (M.read (| last_byte_offset |))) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -13560,7 +13565,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let first_probe := + let~ first_probe := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13571,7 +13576,7 @@ Module str. [ M.read (| first_probe |) ] |) |) in - let second_probe := + let~ second_probe := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13589,7 +13594,7 @@ Module str. ] |) |) in - let trimmed_needle := + let~ trimmed_needle := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13607,7 +13612,7 @@ Module str. ] |) |) in - let check_mask := + let~ check_mask := M.alloc (| M.closure (fun γ => @@ -13634,7 +13639,7 @@ Module str. (let skip := M.copy (| γ |) in M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13660,8 +13665,8 @@ Module str. (M.alloc (| Value.Tuple [] |))) ] |) in - let mask := M.copy (| mask |) in - let _ := + let~ mask := M.copy (| mask |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -13681,7 +13686,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let trailing := + let~ trailing := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13692,23 +13697,21 @@ Module str. [ M.read (| mask |) ] |) |) in - let offset := + let~ offset := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| idx |), - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| idx |)) + (M.rust_cast (M.read (| trailing - |)) - |), - Value.Integer 1 - |) + |)))) + (Value.Integer 1) |) in - let _ := - let sub := + let~ _ := + let~ sub := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13832,19 +13835,18 @@ Module str. |))) ] |) in - let _ := + let~ _ := let β := mask in M.write (| β, BinOp.Pure.bit_and (M.read (| β |)) (UnOp.Pure.not - (BinOp.Panic.shl (| - Value.Integer 1, - M.read (| + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| trailing - |) - |))) + |)))) |) in M.alloc (| Value.Tuple [] @@ -13854,7 +13856,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| @@ -13883,7 +13885,7 @@ Module str. | _ => M.impossible (||) end)) |) in - let test_chunk := + let~ test_chunk := M.alloc (| M.closure (fun γ => @@ -13898,7 +13900,7 @@ Module str. (let idx := M.copy (| γ |) in M.never_to_any (| M.read (| - let a := + let~ a := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13951,7 +13953,7 @@ Module str. ] |) |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14016,7 +14018,7 @@ Module str. ] |) |) in - let eq_first := + let~ eq_first := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14031,7 +14033,7 @@ Module str. [ M.read (| a |); M.read (| first_probe |) ] |) |) in - let eq_last := + let~ eq_last := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14046,7 +14048,7 @@ Module str. [ M.read (| b |); M.read (| second_probe |) ] |) |) in - let both := + let~ both := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14065,7 +14067,7 @@ Module str. [ M.read (| eq_first |); M.read (| eq_last |) ] |) |) in - let mask := + let~ mask := M.alloc (| M.rust_cast (M.call_closure (| @@ -14087,9 +14089,9 @@ Module str. | _ => M.impossible (||) end)) |) in - let i := M.alloc (| Value.Integer 0 |) in - let result := M.alloc (| Value.Bool false |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ result := M.alloc (| Value.Bool false |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -14102,25 +14104,22 @@ Module str. (M.alloc (| LogicalOp.and (| BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| last_byte_offset |) - |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| last_byte_offset |))) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| M.get_constant (| "core::str::pattern::simd_contains::UNROLL" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) - |) - |) - |)) + |)))) (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -14137,8 +14136,8 @@ Module str. M.read (| γ |), Value.Bool true |) in - let masks := M.alloc (| repeat (Value.Integer 0) 4 |) in - let _ := + let~ masks := M.alloc (| repeat (Value.Integer 0) 4 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -14173,7 +14172,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -14192,7 +14191,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -14206,7 +14210,7 @@ Module str. 0 |) in let j := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| masks, @@ -14226,19 +14230,17 @@ Module str. test_chunk; Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| j |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| j |)) + (M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) - |) - |) - |) + |))) ] ] |) @@ -14250,7 +14252,7 @@ Module str. |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -14285,7 +14287,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -14304,7 +14306,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -14318,7 +14325,7 @@ Module str. 0 |) in let j := M.copy (| γ0_0 |) in - let mask := + let~ mask := M.copy (| M.SubPointer.get_array_field (| masks, @@ -14342,7 +14349,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := result in M.write (| β, @@ -14376,19 +14383,17 @@ Module str. check_mask; Value.Tuple [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| j |), - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| j |)) + (M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) - |) - |) - |); + |))); M.read (| mask |); M.read (| result |) ] @@ -14407,25 +14412,23 @@ Module str. |))) ] |)) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.mul (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.mul + Integer.Usize + (M.read (| M.get_constant (| "core::str::pattern::simd_contains::UNROLL" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) - |) - |) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -14433,7 +14436,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -14444,7 +14447,7 @@ Module str. ] |))) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -14457,17 +14460,15 @@ Module str. (M.alloc (| LogicalOp.and (| BinOp.Pure.lt - (BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.read (| last_byte_offset |) - |), - M.read (| + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.read (| last_byte_offset |))) + (M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) - |) - |)) + |))) (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -14484,7 +14485,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let mask := + let~ mask := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14497,7 +14498,7 @@ Module str. [ test_chunk; Value.Tuple [ M.read (| i |) ] ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14513,7 +14514,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := result in M.write (| β, @@ -14558,15 +14559,16 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| + M.get_constant (| "core::core_simd::vector::LEN" |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -14574,7 +14576,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -14585,26 +14587,24 @@ Module str. ] |))) |) in - let i := + let~ i := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| haystack |) ] - |), - M.read (| last_byte_offset |) - |), - M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) |) - |) + |)) + (M.read (| last_byte_offset |))) + (M.read (| M.get_constant (| "core::core_simd::vector::LEN" |) |)) |) in - let mask := + let~ mask := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14617,7 +14617,7 @@ Module str. [ test_chunk; Value.Tuple [ M.read (| i |) ] ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14628,7 +14628,7 @@ Module str. (M.alloc (| BinOp.Pure.ne (M.read (| mask |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := result in M.write (| β, @@ -14737,7 +14737,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14746,7 +14746,7 @@ Module str. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -14801,7 +14801,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -14835,7 +14835,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14860,7 +14860,7 @@ Module str. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -14917,7 +14917,7 @@ Module str. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -14944,7 +14944,12 @@ Module str. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -15056,18 +15061,17 @@ Module str. |), [ M.read (| px |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| x |) ] - |), - Value.Integer 4 - |) + |)) + (Value.Integer 4) ] |); M.call_closure (| @@ -15078,18 +15082,17 @@ Module str. |), [ M.read (| py |); - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| y |) ] - |), - Value.Integer 4 - |) + |)) + (Value.Integer 4) ] |) ] @@ -15101,7 +15104,7 @@ Module str. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let pxend := M.copy (| γ0_0 |) in let pyend := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -15121,7 +15124,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let vx := + let~ vx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15132,7 +15135,7 @@ Module str. [ M.rust_cast (M.read (| px |)) ] |) |) in - let vy := + let~ vy := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15143,7 +15146,7 @@ Module str. [ M.rust_cast (M.read (| py |)) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15173,7 +15176,7 @@ Module str. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| px, M.call_closure (| @@ -15185,7 +15188,7 @@ Module str. [ M.read (| px |); Value.Integer 4 ] |) |) in - let _ := + let~ _ := M.write (| py, M.call_closure (| @@ -15203,7 +15206,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -15216,7 +15219,7 @@ Module str. ] |))) |) in - let vx := + let~ vx := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15227,7 +15230,7 @@ Module str. [ M.rust_cast (M.read (| pxend |)) ] |) |) in - let vy := + let~ vy := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/core/str/traits.v b/CoqOfRust/core/str/traits.v index a9b2a3200..6ed8a307b 100644 --- a/CoqOfRust/core/str/traits.v +++ b/CoqOfRust/core/str/traits.v @@ -615,8 +615,8 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let slice := M.alloc (| M.rust_cast (M.read (| slice |)) |) in - let _ := + let~ slice := M.alloc (| M.rust_cast (M.read (| slice |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -715,7 +715,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -744,25 +744,24 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |) - |) + |)) |) in M.alloc (| M.rust_cast @@ -797,8 +796,8 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let slice := M.alloc (| M.rust_cast (M.read (| slice |)) |) in - let _ := + let~ slice := M.alloc (| M.rust_cast (M.read (| slice |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -897,7 +896,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -924,25 +923,24 @@ Module str. ] |) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "end" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::ops::range::Range", "start" |) - |) - |) + |)) |) in M.alloc (| M.rust_cast @@ -1024,7 +1022,8 @@ Module str. M.alloc (| M.read (| s |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::str::slice_error_fail", [] |), @@ -1422,7 +1421,7 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1469,7 +1468,7 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1825,7 +1824,7 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let end_ := + let~ end_ := M.copy (| M.SubPointer.get_struct_record_field (| self, @@ -1859,7 +1858,8 @@ Module str. M.alloc (| M.read (| s |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::str::slice_error_fail", [] |), @@ -2126,7 +2126,7 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2182,7 +2182,7 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2290,7 +2290,8 @@ Module str. M.alloc (| M.read (| s |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::str::slice_error_fail", [] |), @@ -2635,7 +2636,7 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2713,7 +2714,7 @@ Module str. (let self := M.alloc (| self |) in let slice := M.alloc (| slice |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/str/validations.v b/CoqOfRust/core/str/validations.v index a18ac1c83..a7843cadd 100644 --- a/CoqOfRust/core/str/validations.v +++ b/CoqOfRust/core/str/validations.v @@ -17,7 +17,7 @@ Module str. M.rust_cast (BinOp.Pure.bit_and (M.read (| byte |)) - (BinOp.Panic.shr (| Value.Integer 127, M.read (| width |) |))))) + (BinOp.Wrap.shr (Value.Integer 127) (M.read (| width |)))))) | _, _ => M.impossible end. @@ -36,7 +36,7 @@ Module str. (let ch := M.alloc (| ch |) in let byte := M.alloc (| byte |) in BinOp.Pure.bit_or - (BinOp.Panic.shl (| M.read (| ch |), Value.Integer 6 |)) + (BinOp.Wrap.shl (M.read (| ch |)) (Value.Integer 6)) (M.rust_cast (BinOp.Pure.bit_and (M.read (| byte |)) @@ -109,7 +109,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let x := + let~ x := M.copy (| M.read (| M.match_operator (| @@ -186,7 +186,7 @@ Module str. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -211,14 +211,14 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let init := + let~ init := M.alloc (| M.call_closure (| M.get_function (| "core::str::validations::utf8_first_byte", [] |), [ M.read (| x |); Value.Integer 2 ] |) |) in - let y := + let~ y := M.copy (| M.call_closure (| M.get_associated_function (| @@ -242,14 +242,14 @@ Module str. ] |) |) in - let ch := + let~ ch := M.alloc (| M.call_closure (| M.get_function (| "core::str::validations::utf8_acc_cont_byte", [] |), [ M.read (| init |); M.read (| y |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -260,7 +260,7 @@ Module str. (M.alloc (| BinOp.Pure.ge (M.read (| x |)) (Value.Integer 224) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let z := + let~ z := M.copy (| M.call_closure (| M.get_associated_function (| @@ -284,7 +284,7 @@ Module str. ] |) |) in - let y_z := + let~ y_z := M.alloc (| M.call_closure (| M.get_function (| @@ -302,11 +302,11 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| ch, BinOp.Pure.bit_or - (BinOp.Panic.shl (| M.read (| init |), Value.Integer 12 |)) + (BinOp.Wrap.shl (M.read (| init |)) (Value.Integer 12)) (M.read (| y_z |)) |) in M.match_operator (| @@ -324,7 +324,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let w := + let~ w := M.copy (| M.call_closure (| M.get_associated_function (| @@ -348,14 +348,13 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| ch, BinOp.Pure.bit_or - (BinOp.Panic.shl (| - BinOp.Pure.bit_and (M.read (| init |)) (Value.Integer 7), - Value.Integer 18 - |)) + (BinOp.Wrap.shl + (BinOp.Pure.bit_and (M.read (| init |)) (Value.Integer 7)) + (Value.Integer 18)) (M.call_closure (| M.get_function (| "core::str::validations::utf8_acc_cont_byte", @@ -425,7 +424,7 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let w := + let~ w := M.copy (| M.match_operator (| M.read (| @@ -530,8 +529,8 @@ Module str. ] |) |) in - let ch := M.copy (| Value.DeclaredButUndefined |) in - let z := + let~ ch := M.copy (| Value.DeclaredButUndefined |) in + let~ z := M.copy (| M.call_closure (| M.get_associated_function (| @@ -555,7 +554,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| ch, M.call_closure (| @@ -563,7 +562,7 @@ Module str. [ M.read (| z |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -582,7 +581,7 @@ Module str. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let y := + let~ y := M.copy (| M.call_closure (| M.get_associated_function (| @@ -606,7 +605,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| ch, M.call_closure (| @@ -614,7 +613,7 @@ Module str. [ M.read (| y |); Value.Integer 3 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -636,7 +635,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let x := + let~ x := M.copy (| M.call_closure (| M.get_associated_function (| @@ -660,7 +659,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.write (| ch, M.call_closure (| @@ -671,7 +670,7 @@ Module str. [ M.read (| x |); Value.Integer 4 ] |) |) in - let _ := + let~ _ := M.write (| ch, M.call_closure (| @@ -686,7 +685,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| ch, M.call_closure (| @@ -701,7 +700,7 @@ Module str. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| ch, M.call_closure (| @@ -875,8 +874,8 @@ Module str. M.catch_return (| ltac:(M.monadic (M.read (| - let index := M.alloc (| Value.Integer 0 |) in - let len := + let~ index := M.alloc (| Value.Integer 0 |) in + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -887,18 +886,18 @@ Module str. [ M.read (| v |) ] |) |) in - let usize_bytes := + let~ usize_bytes := M.alloc (| M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] |) |) in - let ascii_block_size := + let~ ascii_block_size := M.alloc (| - BinOp.Panic.mul (| Integer.Usize, Value.Integer 2, M.read (| usize_bytes |) |) + BinOp.Wrap.mul Integer.Usize (Value.Integer 2) (M.read (| usize_bytes |)) |) in - let blocks_end := + let~ blocks_end := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -913,21 +912,19 @@ Module str. let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| ascii_block_size |) - |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| ascii_block_size |))) + (Value.Integer 1) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) ] |) |) in - let align := + let~ align := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -948,7 +945,7 @@ Module str. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -966,8 +963,8 @@ Module str. M.read (| γ |), Value.Bool true |) in - let old_offset := M.copy (| index |) in - let first := + let~ old_offset := M.copy (| index |) in + let~ first := M.copy (| M.SubPointer.get_array_field (| M.read (| v |), index |) |) in @@ -986,7 +983,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let w := + let~ w := M.alloc (| M.call_closure (| M.get_function (| @@ -996,7 +993,7 @@ Module str. [ M.read (| first |) ] |) |) in - let _ := + let~ _ := M.match_operator (| w, [ @@ -1018,17 +1015,16 @@ Module str. BinOp.Pure.ge (M.rust_cast (M.read (| - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -1129,24 +1125,23 @@ Module str. M.read (| γ |), Value.Integer 3 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.read (| first |); M.read (| - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1319,17 +1314,16 @@ Module str. BinOp.Pure.ge (M.rust_cast (M.read (| - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -1430,24 +1424,23 @@ Module str. M.read (| γ |), Value.Integer 4 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.read (| first |); M.read (| - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1596,7 +1589,7 @@ Module str. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1608,17 +1601,16 @@ Module str. BinOp.Pure.ge (M.rust_cast (M.read (| - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -1725,17 +1717,16 @@ Module str. BinOp.Pure.ge (M.rust_cast (M.read (| - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -1855,15 +1846,14 @@ Module str. |))) ] |) in - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -1884,9 +1874,9 @@ Module str. |)), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.Usize, - M.call_closure (| + (BinOp.Wrap.rem + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_sub", @@ -1896,9 +1886,8 @@ Module str. M.read (| align |); M.read (| index |) ] - |), - M.read (| usize_bytes |) - |)) + |)) + (M.read (| usize_bytes |))) (Value.Integer 0))) |) |)) in @@ -1907,7 +1896,7 @@ Module str. M.read (| γ |), Value.Bool true |) in - let ptr := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1918,7 +1907,7 @@ Module str. [ M.read (| v |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1938,8 +1927,8 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := - let block := + let~ _ := + let~ block := M.alloc (| M.rust_cast (M.call_closure (| @@ -1956,7 +1945,7 @@ Module str. ] |)) |) in - let zu := + let~ zu := M.alloc (| M.call_closure (| M.get_function (| @@ -1970,7 +1959,7 @@ Module str. ] |) |) in - let zv := + let~ zv := M.alloc (| M.call_closure (| M.get_function (| @@ -2027,15 +2016,14 @@ Module str. |))) ] |) in - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - M.read (| ascii_block_size |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (M.read (| ascii_block_size |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2043,7 +2031,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -2086,15 +2074,14 @@ Module str. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -2102,7 +2089,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) @@ -2117,15 +2104,14 @@ Module str. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := index in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -2137,7 +2123,7 @@ Module str. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in diff --git a/CoqOfRust/core/sync/atomic.v b/CoqOfRust/core/sync/atomic.v index 42570a5d1..6caedb0a2 100644 --- a/CoqOfRust/core/sync/atomic.v +++ b/CoqOfRust/core/sync/atomic.v @@ -205,22 +205,32 @@ Module sync. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.read (| Value.String "Relaxed" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in M.alloc (| M.read (| Value.String "Release" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.read (| Value.String "Acquire" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in M.alloc (| M.read (| Value.String "AcqRel" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.read (| Value.String "SeqCst" |) |))) ] |) @@ -293,7 +303,7 @@ Module sync. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -303,7 +313,7 @@ Module sync. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -337,7 +347,7 @@ Module sync. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -608,7 +618,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "u8" ] |), @@ -867,7 +877,7 @@ Module sync. (let γ := M.use (M.get_constant (| "core::sync::atomic::EMULATE_ATOMIC_BOOL" |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let order := + let~ order := M.copy (| M.match_operator (| M.alloc (| @@ -878,6 +888,11 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::sync::atomic::Ordering::SeqCst" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] |))); @@ -885,6 +900,11 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::sync::atomic::Ordering::SeqCst" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] |))); @@ -892,6 +912,11 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::sync::atomic::Ordering::AcqRel" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::AcqRel" [] |))); @@ -899,6 +924,11 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::sync::atomic::Ordering::AcqRel" + |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -932,6 +962,16 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::sync::atomic::Ordering::Release" + |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::sync::atomic::Ordering::Acquire" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::AcqRel" [] |))); @@ -939,6 +979,11 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::sync::atomic::Ordering::Acquire" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))); @@ -946,6 +991,11 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::sync::atomic::Ordering::Acquire" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))); @@ -953,6 +1003,16 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::sync::atomic::Ordering::Release" + |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::sync::atomic::Ordering::Relaxed" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Release" [] |))); @@ -960,6 +1020,11 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::sync::atomic::Ordering::Release" + |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -993,13 +1058,23 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::sync::atomic::Ordering::Relaxed" + |) in + let _ := + M.is_struct_tuple (| + γ0_1, + "core::sync::atomic::Ordering::Relaxed" + |) in M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |))) ] |) |) in - let old := + let~ old := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1170,7 +1245,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1552,7 +1627,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1563,7 +1638,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1640,7 +1715,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1933,7 +2008,7 @@ Module sync. let ptr := M.alloc (| ptr |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2230,7 +2305,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2241,7 +2316,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -2318,7 +2393,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3162,7 +3237,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "i8" ] |), @@ -3667,7 +3742,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3678,7 +3753,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3755,7 +3830,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -4260,7 +4335,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "u8" ] |), @@ -4765,7 +4840,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4776,7 +4851,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4853,7 +4928,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -5358,7 +5433,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "i16" ] |), @@ -5863,7 +5938,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5874,7 +5949,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -5951,7 +6026,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6456,7 +6531,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "u16" ] |), @@ -6961,7 +7036,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6972,7 +7047,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -7049,7 +7124,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -7554,7 +7629,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "i32" ] |), @@ -8059,7 +8134,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8070,7 +8145,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -8147,7 +8222,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -8652,7 +8727,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "u32" ] |), @@ -9157,7 +9232,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9168,7 +9243,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -9245,7 +9320,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -9750,7 +9825,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "i64" ] |), @@ -10255,7 +10330,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10266,7 +10341,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -10343,7 +10418,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -10848,7 +10923,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "u64" ] |), @@ -11353,7 +11428,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11364,7 +11439,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -11441,7 +11516,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -11946,7 +12021,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "isize" ] |), @@ -12454,7 +12529,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12465,7 +12540,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -12542,7 +12617,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -13047,7 +13122,7 @@ Module sync. let val := M.alloc (| val |) in let order := M.alloc (| order |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::sync::atomic::atomic_store", [ Ty.path "usize" ] |), @@ -13555,7 +13630,7 @@ Module sync. M.catch_return (| ltac:(M.monadic (M.read (| - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13566,7 +13641,7 @@ Module sync. [ M.read (| self |); M.read (| fetch_order |) ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -13643,7 +13718,7 @@ Module sync. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -13813,19 +13888,24 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Relaxed" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::SeqCst" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| Value.StructTuple "core::sync::atomic::Ordering::Acquire" [] |))) ] |) |))) @@ -13862,7 +13942,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_store_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -13870,7 +13951,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_store_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -13878,7 +13960,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_store_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -13886,7 +13969,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -13916,7 +14000,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -13979,7 +14064,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_load_relaxed", [ T ] |), [ M.read (| dst |) ] @@ -13987,7 +14073,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_load_acquire", [ T ] |), [ M.read (| dst |) ] @@ -13995,7 +14082,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_load_seqcst", [ T ] |), [ M.read (| dst |) ] @@ -14003,7 +14091,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -14033,7 +14122,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -14097,7 +14187,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xchg_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14105,7 +14196,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xchg_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14113,7 +14205,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xchg_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14121,7 +14214,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xchg_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14129,7 +14223,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xchg_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14170,7 +14265,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xadd_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14178,7 +14274,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xadd_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14186,7 +14283,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xadd_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14194,7 +14292,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xadd_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14202,7 +14301,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xadd_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14243,7 +14343,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xsub_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14251,7 +14352,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xsub_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14259,7 +14361,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xsub_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14267,7 +14370,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xsub_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14275,7 +14379,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xsub_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -14340,6 +14445,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Relaxed" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14353,6 +14462,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Relaxed" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14366,6 +14479,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Relaxed" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14379,6 +14496,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Acquire" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14392,6 +14513,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Acquire" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14405,6 +14530,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Acquire" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14418,6 +14547,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Release" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14431,6 +14564,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Release" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14444,6 +14581,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Release" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14457,6 +14598,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::AcqRel" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14470,6 +14615,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::AcqRel" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14483,6 +14632,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::AcqRel" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14496,6 +14649,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::SeqCst" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14509,6 +14666,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::SeqCst" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14522,6 +14683,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::SeqCst" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14535,6 +14700,8 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::AcqRel" |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -14568,6 +14735,8 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Release" |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -14684,6 +14853,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Relaxed" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14697,6 +14870,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Relaxed" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14710,6 +14887,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Relaxed" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14723,6 +14904,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Acquire" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14736,6 +14921,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Acquire" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14749,6 +14938,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Acquire" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14762,6 +14955,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Release" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14775,6 +14972,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Release" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14788,6 +14989,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::Release" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14801,6 +15006,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::AcqRel" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14814,6 +15023,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::AcqRel" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14827,6 +15040,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::AcqRel" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14840,6 +15057,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::SeqCst" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Relaxed" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14853,6 +15074,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::SeqCst" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Acquire" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14866,6 +15091,10 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::sync::atomic::Ordering::SeqCst" |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::SeqCst" |) in M.alloc (| M.call_closure (| M.get_function (| @@ -14879,6 +15108,8 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::AcqRel" |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -14912,6 +15143,8 @@ Module sync. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in + let _ := + M.is_struct_tuple (| γ0_1, "core::sync::atomic::Ordering::Release" |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -15004,7 +15237,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_and_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15012,7 +15246,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_and_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15020,7 +15255,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_and_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15028,7 +15264,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_and_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15036,7 +15273,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_and_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15077,7 +15315,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_nand_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15085,7 +15324,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_nand_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15093,7 +15333,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_nand_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15101,7 +15342,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_nand_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15109,7 +15351,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_nand_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15150,7 +15393,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_or_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15158,7 +15402,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_or_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15166,7 +15411,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_or_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15174,7 +15420,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_or_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15182,7 +15429,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_or_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15223,7 +15471,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xor_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15231,7 +15480,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xor_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15239,7 +15489,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xor_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15247,7 +15498,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xor_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15255,7 +15507,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_xor_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15296,7 +15549,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_max_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15304,7 +15558,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_max_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15312,7 +15567,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_max_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15320,7 +15576,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_max_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15328,7 +15585,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_max_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15369,7 +15627,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_min_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15377,7 +15636,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_min_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15385,7 +15645,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_min_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15393,7 +15654,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_min_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15401,7 +15663,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_min_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15442,7 +15705,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umax_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15450,7 +15714,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umax_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15458,7 +15723,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umax_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15466,7 +15732,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umax_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15474,7 +15741,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umax_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15515,7 +15783,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umin_relaxed", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15523,7 +15792,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umin_acquire", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15531,7 +15801,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umin_release", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15539,7 +15810,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umin_acqrel", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15547,7 +15819,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_umin_seqcst", [ T ] |), [ M.read (| dst |); M.read (| val |) ] @@ -15586,7 +15859,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_fence_acquire", [] |), [] @@ -15594,7 +15868,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_fence_release", [] |), [] @@ -15602,7 +15877,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_fence_acqrel", [] |), [] @@ -15610,7 +15886,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_fence_seqcst", [] |), [] @@ -15618,7 +15895,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -15679,7 +15957,8 @@ Module sync. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Acquire" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_singlethreadfence_acquire", @@ -15690,7 +15969,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Release" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_singlethreadfence_release", @@ -15701,7 +15981,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::AcqRel" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_singlethreadfence_acqrel", @@ -15712,7 +15993,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::SeqCst" |) in + M.alloc (| M.call_closure (| M.get_function (| "core::intrinsics::atomic_singlethreadfence_seqcst", @@ -15723,7 +16005,8 @@ Module sync. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::sync::atomic::Ordering::Relaxed" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), diff --git a/CoqOfRust/core/task/poll.v b/CoqOfRust/core/task/poll.v index 945068dae..0062d3a27 100644 --- a/CoqOfRust/core/task/poll.v +++ b/CoqOfRust/core/task/poll.v @@ -72,6 +72,7 @@ Module task. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) ] |) @@ -130,6 +131,7 @@ Module task. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -220,7 +222,7 @@ Module task. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -230,7 +232,7 @@ Module task. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -311,7 +313,7 @@ Module task. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -321,7 +323,7 @@ Module task. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -341,7 +343,8 @@ Module task. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), [ fun γ => @@ -406,7 +409,7 @@ Module task. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -416,7 +419,7 @@ Module task. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -502,7 +505,7 @@ Module task. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -512,7 +515,7 @@ Module task. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -612,7 +615,8 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in + M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) ] |) |))) @@ -772,7 +776,8 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in + M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) ] |) |))) @@ -863,7 +868,8 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in + M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) ] |) |))) @@ -992,6 +998,7 @@ Module task. "core::task::poll::Poll::Ready", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::task::poll::Poll::Ready" @@ -999,7 +1006,8 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in + M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) ] |) |))) @@ -1117,6 +1125,7 @@ Module task. "core::task::poll::Poll::Ready", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::task::poll::Poll::Ready" @@ -1124,7 +1133,8 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) + (let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in + M.alloc (| Value.StructTuple "core::task::poll::Poll::Pending" [] |))) ] |) |))) @@ -1262,7 +1272,8 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in + M.alloc (| Value.StructTuple "core::ops::control_flow::ControlFlow::Continue" [ Value.StructTuple "core::task::poll::Poll::Pending" [] ] @@ -1529,6 +1540,7 @@ Module task. "core::task::poll::Poll::Ready", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::option::Option::None" |) in M.alloc (| Value.StructTuple "core::ops::control_flow::ControlFlow::Continue" @@ -1540,7 +1552,8 @@ Module task. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::task::poll::Poll::Pending" |) in + M.alloc (| Value.StructTuple "core::ops::control_flow::ControlFlow::Continue" [ Value.StructTuple "core::task::poll::Poll::Pending" [] ] diff --git a/CoqOfRust/core/task/wake.v b/CoqOfRust/core/task/wake.v index 0d1170665..942eccabd 100644 --- a/CoqOfRust/core/task/wake.v +++ b/CoqOfRust/core/task/wake.v @@ -675,7 +675,7 @@ Module task. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let wake := + let~ wake := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| @@ -693,7 +693,7 @@ Module task. "wake" |) |) in - let data := + let~ data := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -705,14 +705,14 @@ Module task. "data" |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::forget", [ Ty.path "core::task::wake::Waker" ] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.read (| wake |), [ M.read (| data |) ] |) |) in M.alloc (| Value.Tuple [] |) |))) @@ -966,7 +966,7 @@ Module task. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1076,7 +1076,7 @@ Module task. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let vtable_ptr := + let~ vtable_ptr := M.copy (| M.use (M.alloc (| diff --git a/CoqOfRust/core/time.v b/CoqOfRust/core/time.v index f11aea600..3d7c9ba3b 100644 --- a/CoqOfRust/core/time.v +++ b/CoqOfRust/core/time.v @@ -490,6 +490,7 @@ Module time. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -563,7 +564,8 @@ Module time. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -615,7 +617,7 @@ Module time. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), @@ -791,11 +793,10 @@ Module time. M.get_associated_function (| Ty.path "core::time::Duration", "new", [] |), [ M.read (| M.get_constant (| "core::num::MAX" |) |); - BinOp.Panic.sub (| - Integer.U32, - M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) + (Value.Integer 1) ] |) |))). @@ -820,7 +821,7 @@ Module time. (let secs := M.alloc (| secs |) in let nanos := M.alloc (| nanos |) in M.read (| - let secs := + let~ secs := M.copy (| M.match_operator (| M.alloc (| @@ -829,11 +830,10 @@ Module time. [ M.read (| secs |); M.rust_cast - (BinOp.Panic.div (| - Integer.U32, - M.read (| nanos |), - M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) - |)) + (BinOp.Wrap.div + Integer.U32 + (M.read (| nanos |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |))) ] |) |), @@ -850,7 +850,8 @@ Module time. secs)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), @@ -877,13 +878,12 @@ Module time. ] |) |) in - let nanos := + let~ nanos := M.alloc (| - BinOp.Panic.rem (| - Integer.U32, - M.read (| nanos |), - M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |) - |) + BinOp.Wrap.rem + Integer.U32 + (M.read (| nanos |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) |) in M.alloc (| Value.StructRecord @@ -931,21 +931,18 @@ Module time. M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "new", [] |), [ - BinOp.Panic.div (| - Integer.U64, - M.read (| millis |), - M.read (| M.get_constant (| "core::time::MILLIS_PER_SEC" |) |) - |); - BinOp.Panic.mul (| - Integer.U32, - M.rust_cast - (BinOp.Panic.rem (| - Integer.U64, - M.read (| millis |), - M.read (| M.get_constant (| "core::time::MILLIS_PER_SEC" |) |) - |)), - M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| millis |)) + (M.read (| M.get_constant (| "core::time::MILLIS_PER_SEC" |) |)); + BinOp.Wrap.mul + Integer.U32 + (M.rust_cast + (BinOp.Wrap.rem + Integer.U64 + (M.read (| millis |)) + (M.read (| M.get_constant (| "core::time::MILLIS_PER_SEC" |) |)))) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |)) ] |))) | _, _ => M.impossible @@ -966,21 +963,18 @@ Module time. M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "new", [] |), [ - BinOp.Panic.div (| - Integer.U64, - M.read (| micros |), - M.read (| M.get_constant (| "core::time::MICROS_PER_SEC" |) |) - |); - BinOp.Panic.mul (| - Integer.U32, - M.rust_cast - (BinOp.Panic.rem (| - Integer.U64, - M.read (| micros |), - M.read (| M.get_constant (| "core::time::MICROS_PER_SEC" |) |) - |)), - M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| micros |)) + (M.read (| M.get_constant (| "core::time::MICROS_PER_SEC" |) |)); + BinOp.Wrap.mul + Integer.U32 + (M.rust_cast + (BinOp.Wrap.rem + Integer.U64 + (M.read (| micros |)) + (M.read (| M.get_constant (| "core::time::MICROS_PER_SEC" |) |)))) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |)) ] |))) | _, _ => M.impossible @@ -1001,17 +995,15 @@ Module time. M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "new", [] |), [ - BinOp.Panic.div (| - Integer.U64, - M.read (| nanos |), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |); + BinOp.Wrap.div + Integer.U64 + (M.read (| nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |))); M.rust_cast - (BinOp.Panic.rem (| - Integer.U64, - M.read (| nanos |), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |)) + (BinOp.Wrap.rem + Integer.U64 + (M.read (| nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)))) ] |))) | _, _ => M.impossible @@ -1091,9 +1083,9 @@ Module time. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| - Integer.U32, - M.read (| + BinOp.Wrap.div + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1103,9 +1095,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |) - |))) + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |)))) | _, _ => M.impossible end. @@ -1122,9 +1113,9 @@ Module time. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.div (| - Integer.U32, - M.read (| + BinOp.Wrap.div + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1134,9 +1125,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |) - |))) + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |)))) | _, _ => M.impossible end. @@ -1179,24 +1169,23 @@ Module time. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)), - M.rust_cast (M.read (| M.get_constant (| "core::time::MILLIS_PER_SEC" |) |)) - |), - M.rust_cast - (BinOp.Panic.div (| - Integer.U32, - M.read (| + |))) + (M.rust_cast (M.read (| M.get_constant (| "core::time::MILLIS_PER_SEC" |) |)))) + (M.rust_cast + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1206,10 +1195,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |) - |)) - |))) + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |)))))) | _, _ => M.impossible end. @@ -1225,24 +1212,23 @@ Module time. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)), - M.rust_cast (M.read (| M.get_constant (| "core::time::MICROS_PER_SEC" |) |)) - |), - M.rust_cast - (BinOp.Panic.div (| - Integer.U32, - M.read (| + |))) + (M.rust_cast (M.read (| M.get_constant (| "core::time::MICROS_PER_SEC" |) |)))) + (M.rust_cast + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1252,10 +1238,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |) - |)) - |))) + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) |)))))) | _, _ => M.impossible end. @@ -1271,21 +1255,20 @@ Module time. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.mul (| - Integer.U128, - M.rust_cast + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.mul + Integer.U128 + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |), - M.rust_cast + |))) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -1296,8 +1279,7 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) - |))) + |))))) | _, _ => M.impossible end. @@ -1432,11 +1414,11 @@ Module time. 0 |) in let secs := M.copy (| γ0_0 |) in - let nanos := + let~ nanos := M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| + BinOp.Wrap.add + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| self, @@ -1446,8 +1428,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| rhs, @@ -1457,10 +1439,9 @@ Module time. "core::time::Nanoseconds", 0 |) - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1480,17 +1461,16 @@ Module time. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := nanos in M.write (| β, - BinOp.Panic.sub (| - Integer.U32, - M.read (| β |), - M.read (| + BinOp.Wrap.sub + Integer.U32 + (M.read (| β |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |) - |) + |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1515,7 +1495,7 @@ Module time. 0 |) in let new_secs := M.copy (| γ0_0 |) in - let _ := M.write (| secs, M.read (| new_secs |) |) in + let~ _ := M.write (| secs, M.read (| new_secs |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic @@ -1533,7 +1513,7 @@ Module time. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1545,7 +1525,7 @@ Module time. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1647,7 +1627,10 @@ Module time. |) in let res := M.copy (| γ0_0 |) in res)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::time::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::time::MAX" |))) ] |) |))) @@ -1718,7 +1701,7 @@ Module time. 0 |) in let secs := M.copy (| γ0_0 |) in - let nanos := + let~ nanos := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1758,9 +1741,9 @@ Module time. Value.Bool true |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| + BinOp.Wrap.sub + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| self, @@ -1770,8 +1753,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| rhs, @@ -1781,8 +1764,7 @@ Module time. "core::time::Nanoseconds", 0 |) - |) - |) + |)) |))); fun γ => ltac:(M.monadic @@ -1809,13 +1791,13 @@ Module time. 0 |) in let sub_secs := M.copy (| γ0_0 |) in - let _ := M.write (| secs, M.read (| sub_secs |) |) in + let~ _ := M.write (| secs, M.read (| sub_secs |) |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.add (| - Integer.U32, - M.read (| + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.add + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| self, @@ -1825,12 +1807,11 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |) - |), - M.read (| + |))) + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| rhs, @@ -1840,8 +1821,7 @@ Module time. "core::time::Nanoseconds", 0 |) - |) - |) + |)) |))); fun γ => ltac:(M.monadic @@ -1861,7 +1841,7 @@ Module time. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1873,7 +1853,7 @@ Module time. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1975,7 +1955,10 @@ Module time. |) in let res := M.copy (| γ0_0 |) in res)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::time::ZERO" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::time::ZERO" |))) ] |) |))) @@ -2009,11 +1992,11 @@ Module time. M.catch_return (| ltac:(M.monadic (M.read (| - let total_nanos := + let~ total_nanos := M.alloc (| - BinOp.Panic.mul (| - Integer.U64, - M.rust_cast + BinOp.Wrap.mul + Integer.U64 + (M.rust_cast (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -2024,28 +2007,26 @@ Module time. "core::time::Nanoseconds", 0 |) - |)), - M.rust_cast (M.read (| rhs |)) - |) + |))) + (M.rust_cast (M.read (| rhs |))) |) in - let extra_secs := + let~ extra_secs := M.alloc (| - BinOp.Panic.div (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |))) |) in - let nanos := + let~ nanos := M.alloc (| M.rust_cast - (BinOp.Panic.rem (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |)) + (BinOp.Wrap.rem + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2100,7 +2081,7 @@ Module time. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2112,7 +2093,7 @@ Module time. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2225,7 +2206,10 @@ Module time. |) in let res := M.copy (| γ0_0 |) in res)); - fun γ => ltac:(M.monadic (M.get_constant (| "core::time::MAX" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "core::time::MAX" |))) ] |) |))) @@ -2268,28 +2252,26 @@ Module time. M.alloc (| Value.Tuple [ - BinOp.Panic.div (| - Integer.U64, - M.read (| + BinOp.Wrap.div + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::time::Duration", "secs" |) - |), - M.rust_cast (M.read (| rhs |)) - |); - BinOp.Panic.rem (| - Integer.U64, - M.read (| + |)) + (M.rust_cast (M.read (| rhs |))); + BinOp.Wrap.rem + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| self, "core::time::Duration", "secs" |) - |), - M.rust_cast (M.read (| rhs |)) - |) + |)) + (M.rust_cast (M.read (| rhs |))) ] |), [ @@ -2303,9 +2285,9 @@ Module time. M.alloc (| Value.Tuple [ - BinOp.Panic.div (| - Integer.U32, - M.read (| + BinOp.Wrap.div + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| self, @@ -2315,12 +2297,11 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| rhs |) - |); - BinOp.Panic.rem (| - Integer.U32, - M.read (| + |)) + (M.read (| rhs |)); + BinOp.Wrap.rem + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| self, @@ -2330,9 +2311,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| rhs |) - |) + |)) + (M.read (| rhs |)) ] |), [ @@ -2342,35 +2322,31 @@ Module time. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let nanos := M.copy (| γ0_0 |) in let extra_nanos := M.copy (| γ0_1 |) in - let _ := + let~ _ := let β := nanos in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - M.rust_cast - (BinOp.Panic.div (| - Integer.U64, - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.mul (| - Integer.U64, - M.read (| extra_secs |), - M.rust_cast + BinOp.Wrap.add + Integer.U32 + (M.read (| β |)) + (M.rust_cast + (BinOp.Wrap.div + Integer.U64 + (BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.mul + Integer.U64 + (M.read (| extra_secs |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) - |), - M.rust_cast (M.read (| extra_nanos |)) - |), - M.rust_cast (M.read (| rhs |)) - |)) - |) + |)))) + (M.rust_cast (M.read (| extra_nanos |)))) + (M.rust_cast (M.read (| rhs |))))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2382,7 +2358,7 @@ Module time. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2468,19 +2444,19 @@ Module time. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.Usize, - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)), - BinOp.Panic.div (| - Integer.Usize, - M.rust_cast + |))) + (BinOp.Wrap.div + Integer.Usize + (M.rust_cast (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -2491,10 +2467,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |)), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |) - |))) + |))) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)))))) | _, _ => M.impossible end. @@ -2510,19 +2484,19 @@ Module time. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.Usize, - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "core::time::Duration", "secs" |) - |)), - BinOp.Panic.div (| - Integer.Usize, - M.rust_cast + |))) + (BinOp.Wrap.div + Integer.Usize + (M.rust_cast (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -2533,10 +2507,8 @@ Module time. "core::time::Nanoseconds", 0 |) - |)), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |) - |))) + |))) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)))))) | _, _ => M.impossible end. @@ -2694,14 +2666,13 @@ Module time. M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f64", [] |), [ - BinOp.Panic.mul (| - Integer.Usize, - M.read (| rhs |), - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| rhs |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f64", [] |), [ self ] - |) - |) + |)) ] |))) | _, _ => M.impossible @@ -2723,14 +2694,13 @@ Module time. M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f32", [] |), [ - BinOp.Panic.mul (| - Integer.Usize, - M.read (| rhs |), - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| rhs |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f32", [] |), [ self ] - |) - |) + |)) ] |))) | _, _ => M.impossible @@ -2752,14 +2722,13 @@ Module time. M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f64", [] |), [ - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f64", [] |), [ self ] - |), - M.read (| rhs |) - |) + |)) + (M.read (| rhs |)) ] |))) | _, _ => M.impossible @@ -2781,14 +2750,13 @@ Module time. M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "from_secs_f32", [] |), [ - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f32", [] |), [ self ] - |), - M.read (| rhs |) - |) + |)) + (M.read (| rhs |)) ] |))) | _, _ => M.impossible @@ -2807,17 +2775,16 @@ Module time. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f64", [] |), [ self ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f64", [] |), [ rhs ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -2835,17 +2802,16 @@ Module time. ltac:(M.monadic (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in - BinOp.Panic.div (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f32", [] |), [ self ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "core::time::Duration", "as_secs_f32", [] |), [ rhs ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -2871,7 +2837,7 @@ Module time. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2907,14 +2873,14 @@ Module time. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f32", "to_bits", [] |), [ M.read (| secs |) ] |) |) in - let mant := + let~ mant := M.alloc (| BinOp.Pure.bit_or (BinOp.Pure.bit_and @@ -2922,26 +2888,24 @@ Module time. (M.read (| M.get_constant (| "core::time::try_from_secs_f32::MANT_MASK" |) |))) - (BinOp.Panic.add (| - Integer.U32, - M.read (| + (BinOp.Wrap.add + Integer.U32 + (M.read (| M.get_constant (| "core::time::try_from_secs_f32::MANT_MASK" |) - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) |) in - let exp := + let~ exp := M.alloc (| - BinOp.Panic.add (| - Integer.I16, - M.rust_cast + BinOp.Wrap.add + Integer.I16 + (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer 23 |)) + (BinOp.Wrap.shr (M.read (| bits |)) (Value.Integer 23)) (M.read (| M.get_constant (| "core::time::try_from_secs_f32::EXP_MASK" |) - |))), - M.read (| M.get_constant (| "core::time::try_from_secs_f32::MIN_EXP" |) |) - |) + |)))) + (M.read (| M.get_constant (| "core::time::try_from_secs_f32::MIN_EXP" |) |)) |) in M.match_operator (| M.match_operator (| @@ -2974,10 +2938,10 @@ Module time. M.read (| γ |), Value.Bool true |) in - let t := + let~ t := M.alloc (| - BinOp.Panic.shl (| - M.call_closure (| + BinOp.Wrap.shl + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u64", @@ -2986,27 +2950,24 @@ Module time. [] |), [ M.read (| mant |) ] - |), - BinOp.Panic.add (| - Integer.I16, - Value.Integer 41, - M.read (| exp |) - |) - |) + |)) + (BinOp.Wrap.add + Integer.I16 + (Value.Integer 41) + (M.read (| exp |))) |) in - let nanos_offset := + let~ nanos_offset := M.alloc (| - BinOp.Panic.add (| - Integer.I32, - Value.Integer 23, - Value.Integer 41 - |) + BinOp.Wrap.add + Integer.I32 + (Value.Integer 23) + (Value.Integer 41) |) in - let nanos_tmp := + let~ nanos_tmp := M.alloc (| - BinOp.Panic.mul (| - Integer.U128, - M.call_closure (| + BinOp.Wrap.mul + Integer.U128 + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u128", @@ -3019,8 +2980,8 @@ Module time. M.get_constant (| "core::time::NANOS_PER_SEC" |) |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u128", @@ -3029,56 +2990,50 @@ Module time. [] |), [ M.read (| t |) ] - |) - |) + |)) |) in - let nanos := + let~ nanos := M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| nanos_tmp |), - M.read (| nanos_offset |) - |)) + (BinOp.Wrap.shr + (M.read (| nanos_tmp |)) + (M.read (| nanos_offset |))) |) in - let rem_mask := + let~ rem_mask := M.alloc (| - BinOp.Panic.sub (| - Integer.U128, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| nanos_offset |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U128 + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| nanos_offset |))) + (Value.Integer 1) |) in - let rem_msb_mask := + let~ rem_msb_mask := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.sub (| - Integer.I32, - M.read (| nanos_offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.sub + Integer.I32 + (M.read (| nanos_offset |)) + (Value.Integer 1)) |) in - let rem := + let~ rem := M.alloc (| BinOp.Pure.bit_and (M.read (| nanos_tmp |)) (M.read (| rem_mask |)) |) in - let is_tie := + let~ is_tie := M.alloc (| BinOp.Pure.eq (M.read (| rem |)) (M.read (| rem_msb_mask |)) |) in - let is_even := + let~ is_even := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and (M.read (| nanos |)) (Value.Integer 1)) (Value.Integer 0) |) in - let rem_msb := + let~ rem_msb := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and @@ -3086,7 +3041,7 @@ Module time. (M.read (| rem_msb_mask |))) (Value.Integer 0) |) in - let add_ns := + let~ add_ns := M.alloc (| UnOp.Pure.not (LogicalOp.or (| @@ -3098,13 +3053,12 @@ Module time. |))) |)) |) in - let nanos := + let~ nanos := M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| nanos |)) + (M.rust_cast (M.read (| add_ns |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3160,7 +3114,7 @@ Module time. M.read (| γ |), Value.Bool true |) in - let secs := + let~ secs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3171,18 +3125,16 @@ Module time. [] |), [ - BinOp.Panic.shr (| - M.read (| mant |), - BinOp.Panic.sub (| - Integer.I16, - Value.Integer 23, - M.read (| exp |) - |) - |) + BinOp.Wrap.shr + (M.read (| mant |)) + (BinOp.Wrap.sub + Integer.I16 + (Value.Integer 23) + (M.read (| exp |))) ] |) |) in - let t := + let~ t := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3194,10 +3146,9 @@ Module time. |), [ BinOp.Pure.bit_and - (BinOp.Panic.shl (| - M.read (| mant |), - M.read (| exp |) - |)) + (BinOp.Wrap.shl + (M.read (| mant |)) + (M.read (| exp |))) (M.read (| M.get_constant (| "core::time::try_from_secs_f32::MANT_MASK" @@ -3206,12 +3157,12 @@ Module time. ] |) |) in - let nanos_offset := M.alloc (| Value.Integer 23 |) in - let nanos_tmp := + let~ nanos_offset := M.alloc (| Value.Integer 23 |) in + let~ nanos_tmp := M.alloc (| - BinOp.Panic.mul (| - Integer.U64, - M.call_closure (| + BinOp.Wrap.mul + Integer.U64 + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u64", @@ -3226,53 +3177,47 @@ Module time. |) |) ] - |), - M.read (| t |) - |) + |)) + (M.read (| t |)) |) in - let nanos := + let~ nanos := M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| nanos_tmp |), - M.read (| nanos_offset |) - |)) + (BinOp.Wrap.shr + (M.read (| nanos_tmp |)) + (M.read (| nanos_offset |))) |) in - let rem_mask := + let~ rem_mask := M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| nanos_offset |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U64 + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| nanos_offset |))) + (Value.Integer 1) |) in - let rem_msb_mask := + let~ rem_msb_mask := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.sub (| - Integer.I32, - M.read (| nanos_offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.sub + Integer.I32 + (M.read (| nanos_offset |)) + (Value.Integer 1)) |) in - let rem := + let~ rem := M.alloc (| BinOp.Pure.bit_and (M.read (| nanos_tmp |)) (M.read (| rem_mask |)) |) in - let is_tie := + let~ is_tie := M.alloc (| BinOp.Pure.eq (M.read (| rem |)) (M.read (| rem_msb_mask |)) |) in - let is_even := + let~ is_even := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and @@ -3280,7 +3225,7 @@ Module time. (Value.Integer 1)) (Value.Integer 0) |) in - let rem_msb := + let~ rem_msb := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and @@ -3288,7 +3233,7 @@ Module time. (M.read (| rem_msb_mask |))) (Value.Integer 0) |) in - let add_ns := + let~ add_ns := M.alloc (| UnOp.Pure.not (LogicalOp.or (| @@ -3300,13 +3245,12 @@ Module time. |))) |)) |) in - let nanos := + let~ nanos := M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| nanos |)) + (M.rust_cast (M.read (| add_ns |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3344,11 +3288,10 @@ Module time. (M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.U64, - M.read (| secs |), - Value.Integer 1 - |); + BinOp.Wrap.add + Integer.U64 + (M.read (| secs |)) + (Value.Integer 1); Value.Integer 0 ] |))) @@ -3373,10 +3316,10 @@ Module time. M.read (| γ |), Value.Bool true |) in - let secs := + let~ secs := M.alloc (| - BinOp.Panic.shl (| - M.call_closure (| + BinOp.Wrap.shl + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u64", @@ -3385,13 +3328,11 @@ Module time. [] |), [ M.read (| mant |) ] - |), - BinOp.Panic.sub (| - Integer.I16, - M.read (| exp |), - Value.Integer 23 - |) - |) + |)) + (BinOp.Wrap.sub + Integer.I16 + (M.read (| exp |)) + (Value.Integer 23)) |) in M.alloc (| Value.Tuple @@ -3478,7 +3419,7 @@ Module time. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3514,14 +3455,14 @@ Module time. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let bits := + let~ bits := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "f64", "to_bits", [] |), [ M.read (| secs |) ] |) |) in - let mant := + let~ mant := M.alloc (| BinOp.Pure.bit_or (BinOp.Pure.bit_and @@ -3529,26 +3470,24 @@ Module time. (M.read (| M.get_constant (| "core::time::try_from_secs_f64::MANT_MASK" |) |))) - (BinOp.Panic.add (| - Integer.U64, - M.read (| + (BinOp.Wrap.add + Integer.U64 + (M.read (| M.get_constant (| "core::time::try_from_secs_f64::MANT_MASK" |) - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) |) in - let exp := + let~ exp := M.alloc (| - BinOp.Panic.add (| - Integer.I16, - M.rust_cast + BinOp.Wrap.add + Integer.I16 + (M.rust_cast (BinOp.Pure.bit_and - (BinOp.Panic.shr (| M.read (| bits |), Value.Integer 52 |)) + (BinOp.Wrap.shr (M.read (| bits |)) (Value.Integer 52)) (M.read (| M.get_constant (| "core::time::try_from_secs_f64::EXP_MASK" |) - |))), - M.read (| M.get_constant (| "core::time::try_from_secs_f64::MIN_EXP" |) |) - |) + |)))) + (M.read (| M.get_constant (| "core::time::try_from_secs_f64::MIN_EXP" |) |)) |) in M.match_operator (| M.match_operator (| @@ -3581,10 +3520,10 @@ Module time. M.read (| γ |), Value.Bool true |) in - let t := + let~ t := M.alloc (| - BinOp.Panic.shl (| - M.call_closure (| + BinOp.Wrap.shl + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u128", @@ -3593,27 +3532,24 @@ Module time. [] |), [ M.read (| mant |) ] - |), - BinOp.Panic.add (| - Integer.I16, - Value.Integer 44, - M.read (| exp |) - |) - |) + |)) + (BinOp.Wrap.add + Integer.I16 + (Value.Integer 44) + (M.read (| exp |))) |) in - let nanos_offset := + let~ nanos_offset := M.alloc (| - BinOp.Panic.add (| - Integer.I32, - Value.Integer 52, - Value.Integer 44 - |) + BinOp.Wrap.add + Integer.I32 + (Value.Integer 52) + (Value.Integer 44) |) in - let nanos_tmp := + let~ nanos_tmp := M.alloc (| - BinOp.Panic.mul (| - Integer.U128, - M.call_closure (| + BinOp.Wrap.mul + Integer.U128 + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u128", @@ -3626,8 +3562,8 @@ Module time. M.get_constant (| "core::time::NANOS_PER_SEC" |) |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u128", @@ -3636,56 +3572,50 @@ Module time. [] |), [ M.read (| t |) ] - |) - |) + |)) |) in - let nanos := + let~ nanos := M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| nanos_tmp |), - M.read (| nanos_offset |) - |)) + (BinOp.Wrap.shr + (M.read (| nanos_tmp |)) + (M.read (| nanos_offset |))) |) in - let rem_mask := + let~ rem_mask := M.alloc (| - BinOp.Panic.sub (| - Integer.U128, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| nanos_offset |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U128 + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| nanos_offset |))) + (Value.Integer 1) |) in - let rem_msb_mask := + let~ rem_msb_mask := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.sub (| - Integer.I32, - M.read (| nanos_offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.sub + Integer.I32 + (M.read (| nanos_offset |)) + (Value.Integer 1)) |) in - let rem := + let~ rem := M.alloc (| BinOp.Pure.bit_and (M.read (| nanos_tmp |)) (M.read (| rem_mask |)) |) in - let is_tie := + let~ is_tie := M.alloc (| BinOp.Pure.eq (M.read (| rem |)) (M.read (| rem_msb_mask |)) |) in - let is_even := + let~ is_even := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and (M.read (| nanos |)) (Value.Integer 1)) (Value.Integer 0) |) in - let rem_msb := + let~ rem_msb := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and @@ -3693,7 +3623,7 @@ Module time. (M.read (| rem_msb_mask |))) (Value.Integer 0) |) in - let add_ns := + let~ add_ns := M.alloc (| UnOp.Pure.not (LogicalOp.or (| @@ -3705,13 +3635,12 @@ Module time. |))) |)) |) in - let nanos := + let~ nanos := M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| nanos |)) + (M.rust_cast (M.read (| add_ns |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3767,7 +3696,7 @@ Module time. M.read (| γ |), Value.Bool true |) in - let secs := + let~ secs := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3778,18 +3707,16 @@ Module time. [] |), [ - BinOp.Panic.shr (| - M.read (| mant |), - BinOp.Panic.sub (| - Integer.I16, - Value.Integer 52, - M.read (| exp |) - |) - |) + BinOp.Wrap.shr + (M.read (| mant |)) + (BinOp.Wrap.sub + Integer.I16 + (Value.Integer 52) + (M.read (| exp |))) ] |) |) in - let t := + let~ t := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3801,10 +3728,9 @@ Module time. |), [ BinOp.Pure.bit_and - (BinOp.Panic.shl (| - M.read (| mant |), - M.read (| exp |) - |)) + (BinOp.Wrap.shl + (M.read (| mant |)) + (M.read (| exp |))) (M.read (| M.get_constant (| "core::time::try_from_secs_f64::MANT_MASK" @@ -3813,12 +3739,12 @@ Module time. ] |) |) in - let nanos_offset := M.alloc (| Value.Integer 52 |) in - let nanos_tmp := + let~ nanos_offset := M.alloc (| Value.Integer 52 |) in + let~ nanos_tmp := M.alloc (| - BinOp.Panic.mul (| - Integer.U128, - M.call_closure (| + BinOp.Wrap.mul + Integer.U128 + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u128", @@ -3833,53 +3759,47 @@ Module time. |) |) ] - |), - M.read (| t |) - |) + |)) + (M.read (| t |)) |) in - let nanos := + let~ nanos := M.alloc (| M.rust_cast - (BinOp.Panic.shr (| - M.read (| nanos_tmp |), - M.read (| nanos_offset |) - |)) + (BinOp.Wrap.shr + (M.read (| nanos_tmp |)) + (M.read (| nanos_offset |))) |) in - let rem_mask := + let~ rem_mask := M.alloc (| - BinOp.Panic.sub (| - Integer.U128, - BinOp.Panic.shl (| - Value.Integer 1, - M.read (| nanos_offset |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U128 + (BinOp.Wrap.shl + (Value.Integer 1) + (M.read (| nanos_offset |))) + (Value.Integer 1) |) in - let rem_msb_mask := + let~ rem_msb_mask := M.alloc (| - BinOp.Panic.shl (| - Value.Integer 1, - BinOp.Panic.sub (| - Integer.I32, - M.read (| nanos_offset |), - Value.Integer 1 - |) - |) + BinOp.Wrap.shl + (Value.Integer 1) + (BinOp.Wrap.sub + Integer.I32 + (M.read (| nanos_offset |)) + (Value.Integer 1)) |) in - let rem := + let~ rem := M.alloc (| BinOp.Pure.bit_and (M.read (| nanos_tmp |)) (M.read (| rem_mask |)) |) in - let is_tie := + let~ is_tie := M.alloc (| BinOp.Pure.eq (M.read (| rem |)) (M.read (| rem_msb_mask |)) |) in - let is_even := + let~ is_even := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and @@ -3887,7 +3807,7 @@ Module time. (Value.Integer 1)) (Value.Integer 0) |) in - let rem_msb := + let~ rem_msb := M.alloc (| BinOp.Pure.eq (BinOp.Pure.bit_and @@ -3895,7 +3815,7 @@ Module time. (M.read (| rem_msb_mask |))) (Value.Integer 0) |) in - let add_ns := + let~ add_ns := M.alloc (| UnOp.Pure.not (LogicalOp.or (| @@ -3907,13 +3827,12 @@ Module time. |))) |)) |) in - let nanos := + let~ nanos := M.alloc (| - BinOp.Panic.add (| - Integer.U32, - M.read (| nanos |), - M.rust_cast (M.read (| add_ns |)) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| nanos |)) + (M.rust_cast (M.read (| add_ns |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3951,11 +3870,10 @@ Module time. (M.alloc (| Value.Tuple [ - BinOp.Panic.add (| - Integer.U64, - M.read (| secs |), - Value.Integer 1 - |); + BinOp.Wrap.add + Integer.U64 + (M.read (| secs |)) + (Value.Integer 1); Value.Integer 0 ] |))) @@ -3980,10 +3898,10 @@ Module time. M.read (| γ |), Value.Bool true |) in - let secs := + let~ secs := M.alloc (| - BinOp.Panic.shl (| - M.call_closure (| + BinOp.Wrap.shl + (M.call_closure (| M.get_trait_method (| "core::convert::From", Ty.path "u64", @@ -3992,13 +3910,11 @@ Module time. [] |), [ M.read (| mant |) ] - |), - BinOp.Panic.sub (| - Integer.I16, - M.read (| exp |), - Value.Integer 52 - |) - |) + |)) + (BinOp.Wrap.sub + Integer.I16 + (M.read (| exp |)) + (Value.Integer 52)) |) in M.alloc (| Value.Tuple @@ -4123,7 +4039,7 @@ Module time. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4207,7 +4123,7 @@ Module time. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4329,7 +4245,7 @@ Module time. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4413,7 +4329,7 @@ Module time. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -4454,9 +4370,9 @@ Module time. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let total_secs := M.alloc (| Value.Integer 0 |) in - let total_nanos := M.alloc (| Value.Integer 0 |) in - let _ := + let~ total_secs := M.alloc (| Value.Integer 0 |) in + let~ total_nanos := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4477,7 +4393,7 @@ Module time. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4494,7 +4410,9 @@ Module time. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4506,7 +4424,7 @@ Module time. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| total_secs, M.call_closure (| @@ -4541,7 +4459,7 @@ Module time. ] |) |) in - let _ := + let~ _ := M.write (| total_nanos, M.read (| @@ -4584,6 +4502,11 @@ Module time. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + let~ _ := M.write (| total_secs, M.call_closure (| @@ -4603,16 +4526,15 @@ Module time. |), [ M.read (| total_secs |); - BinOp.Panic.div (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast + BinOp.Wrap.div + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) - |) + |))) ] |); M.read (| @@ -4623,19 +4545,18 @@ Module time. |) |) in M.alloc (| - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.rem (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.rem + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) - |), - M.rust_cast + |)))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -4646,8 +4567,7 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) - |) + |))) |))) ] |) @@ -4660,7 +4580,7 @@ Module time. |))) ] |)) in - let _ := + let~ _ := M.write (| total_secs, M.call_closure (| @@ -4674,26 +4594,24 @@ Module time. M.get_associated_function (| Ty.path "u64", "checked_add", [] |), [ M.read (| total_secs |); - BinOp.Panic.div (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast - (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |))) ] |); M.read (| Value.String "overflow in iter::sum over durations" |) ] |) |) in - let _ := + let~ _ := M.write (| total_nanos, - BinOp.Panic.rem (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |) + BinOp.Wrap.rem + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |))) |) in M.alloc (| M.call_closure (| @@ -4727,9 +4645,9 @@ Module time. ltac:(M.monadic (let iter := M.alloc (| iter |) in M.read (| - let total_secs := M.alloc (| Value.Integer 0 |) in - let total_nanos := M.alloc (| Value.Integer 0 |) in - let _ := + let~ total_secs := M.alloc (| Value.Integer 0 |) in + let~ total_nanos := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4750,7 +4668,7 @@ Module time. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4767,7 +4685,9 @@ Module time. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4779,7 +4699,7 @@ Module time. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| total_secs, M.call_closure (| @@ -4814,7 +4734,7 @@ Module time. ] |) |) in - let _ := + let~ _ := M.write (| total_nanos, M.read (| @@ -4857,6 +4777,11 @@ Module time. fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + let~ _ := M.write (| total_secs, M.call_closure (| @@ -4876,16 +4801,15 @@ Module time. |), [ M.read (| total_secs |); - BinOp.Panic.div (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast + BinOp.Wrap.div + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) - |) + |))) ] |); M.read (| @@ -4896,19 +4820,18 @@ Module time. |) |) in M.alloc (| - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.rem (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.rem + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) - |)) - |), - M.rust_cast + |)))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| @@ -4919,8 +4842,7 @@ Module time. "core::time::Nanoseconds", 0 |) - |)) - |) + |))) |))) ] |) @@ -4933,7 +4855,7 @@ Module time. |))) ] |)) in - let _ := + let~ _ := M.write (| total_secs, M.call_closure (| @@ -4947,26 +4869,24 @@ Module time. M.get_associated_function (| Ty.path "u64", "checked_add", [] |), [ M.read (| total_secs |); - BinOp.Panic.div (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast - (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |) + BinOp.Wrap.div + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |))) ] |); M.read (| Value.String "overflow in iter::sum over durations" |) ] |) |) in - let _ := + let~ _ := M.write (| total_nanos, - BinOp.Panic.rem (| - Integer.U64, - M.read (| total_nanos |), - M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) - |) + BinOp.Wrap.rem + Integer.U64 + (M.read (| total_nanos |)) + (M.rust_cast (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |))) |) in M.alloc (| M.call_closure (| @@ -5186,7 +5106,7 @@ Module time. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let prefix := + let~ prefix := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5254,11 +5174,10 @@ Module time. 0 |) |); - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |), - Value.Integer 10 - |); + BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::time::NANOS_PER_SEC" |) |)) + (Value.Integer 10); M.read (| prefix |); M.read (| Value.String "s" |) ] @@ -5298,9 +5217,9 @@ Module time. [ M.read (| f |); M.rust_cast - (BinOp.Panic.div (| - Integer.U32, - M.read (| + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5310,14 +5229,13 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) - |) - |)); - BinOp.Panic.rem (| - Integer.U32, - M.read (| + |))); + BinOp.Wrap.rem + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5327,14 +5245,16 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |) - |); - BinOp.Panic.div (| - Integer.U32, - M.read (| M.get_constant (| "core::time::NANOS_PER_MILLI" |) |), - Value.Integer 10 - |); + |)) + (M.read (| + M.get_constant (| "core::time::NANOS_PER_MILLI" |) + |)); + BinOp.Wrap.div + Integer.U32 + (M.read (| + M.get_constant (| "core::time::NANOS_PER_MILLI" |) + |)) + (Value.Integer 10); M.read (| prefix |); M.read (| Value.String "ms" |) ] @@ -5377,9 +5297,9 @@ Module time. [ M.read (| f |); M.rust_cast - (BinOp.Panic.div (| - Integer.U32, - M.read (| + (BinOp.Wrap.div + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5389,14 +5309,13 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) - |) - |)); - BinOp.Panic.rem (| - Integer.U32, - M.read (| + |))); + BinOp.Wrap.rem + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -5406,18 +5325,16 @@ Module time. "core::time::Nanoseconds", 0 |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) - |) - |); - BinOp.Panic.div (| - Integer.U32, - M.read (| + |)); + BinOp.Wrap.div + Integer.U32 + (M.read (| M.get_constant (| "core::time::NANOS_PER_MICRO" |) - |), - Value.Integer 10 - |); + |)) + (Value.Integer 10); M.read (| prefix |); M.read (| Value.String (String.String "181" "s") |) ] @@ -5678,10 +5595,20 @@ Module time. [ fun γ => ltac:(M.monadic - (Value.String "can not convert float seconds to Duration: value is negative")); + (let _ := + M.is_struct_tuple (| + γ, + "core::time::TryFromFloatSecsErrorKind::Negative" + |) in + Value.String "can not convert float seconds to Duration: value is negative")); fun γ => ltac:(M.monadic - (Value.String + (let _ := + M.is_struct_tuple (| + γ, + "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" + |) in + Value.String "can not convert float seconds to Duration: value is either too big or NaN")) ] |) @@ -5772,10 +5699,20 @@ Module time. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::time::TryFromFloatSecsErrorKind::Negative" + |) in M.alloc (| M.read (| Value.String "Negative" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" + |) in M.alloc (| M.read (| Value.String "OverflowOrNan" |) |))) ] |) @@ -5809,12 +5746,22 @@ Module time. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::time::TryFromFloatSecsErrorKind::Negative" + |) in M.alloc (| Value.StructTuple "core::time::TryFromFloatSecsErrorKind::Negative" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" + |) in M.alloc (| Value.StructTuple "core::time::TryFromFloatSecsErrorKind::OverflowOrNan" [] |))) @@ -5854,7 +5801,7 @@ Module time. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -5864,7 +5811,7 @@ Module time. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/core/tuple.v b/CoqOfRust/core/tuple.v index f87d11bc1..92b679e52 100644 --- a/CoqOfRust/core/tuple.v +++ b/CoqOfRust/core/tuple.v @@ -36,7 +36,10 @@ Module tuple. |) in let c := M.copy (| γ0_0 |) in M.alloc (| M.rust_cast (M.read (| c |)) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 2 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Integer 2 |))) ] |) |)))) @@ -324,7 +327,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -584,6 +587,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -622,7 +626,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", U, [ U ], "partial_cmp", [] |), @@ -683,7 +687,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", U, [ U ], "partial_cmp", [] |), @@ -744,7 +748,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", U, [ U ], "partial_cmp", [] |), @@ -805,7 +809,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", U, [ U ], "partial_cmp", [] |), @@ -898,7 +902,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", T, [], "cmp", [] |), [ @@ -942,7 +947,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -952,7 +957,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -1236,6 +1241,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -1261,6 +1267,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1305,7 +1312,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", V, [ V ], "partial_cmp", [] |), @@ -1338,7 +1345,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1417,7 +1424,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", V, [ V ], "partial_cmp", [] |), @@ -1450,7 +1457,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1529,7 +1536,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", V, [ V ], "partial_cmp", [] |), @@ -1562,7 +1569,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1644,7 +1651,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", V, [ V ], "partial_cmp", [] |), @@ -1677,7 +1684,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1791,7 +1798,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", U, [], "cmp", [] |), @@ -1804,7 +1812,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", T, [], "cmp", [] |), [ @@ -1854,7 +1863,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -1864,7 +1873,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -1874,7 +1883,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -2188,6 +2197,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2213,6 +2223,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -2238,6 +2249,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2288,7 +2301,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", W, [ W ], "partial_cmp", [] |), @@ -2321,7 +2334,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2364,7 +2377,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2454,7 +2467,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", W, [ W ], "partial_cmp", [] |), @@ -2487,7 +2500,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2530,7 +2543,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2620,7 +2633,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", W, [ W ], "partial_cmp", [] |), @@ -2653,7 +2666,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2699,7 +2712,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2789,7 +2802,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", W, [ W ], "partial_cmp", [] |), @@ -2822,7 +2835,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2868,7 +2881,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2990,7 +3003,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", V, [], "cmp", [] |), @@ -3003,7 +3017,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", U, [], "cmp", [] |), @@ -3016,7 +3031,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", T, [], "cmp", [] |), [ @@ -3072,7 +3089,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -3082,7 +3099,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -3092,7 +3109,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -3102,7 +3119,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -3451,6 +3468,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -3476,6 +3494,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -3501,6 +3520,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -3526,6 +3547,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3588,7 +3614,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", X, [ X ], "partial_cmp", [] |), @@ -3621,7 +3647,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3664,7 +3690,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3716,7 +3742,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3819,7 +3845,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", X, [ X ], "partial_cmp", [] |), @@ -3852,7 +3878,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3895,7 +3921,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3947,7 +3973,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4050,7 +4076,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", X, [ X ], "partial_cmp", [] |), @@ -4083,7 +4109,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4129,7 +4155,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4181,7 +4207,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4286,7 +4312,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", X, [ X ], "partial_cmp", [] |), @@ -4319,7 +4345,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4365,7 +4391,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4417,7 +4443,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4554,7 +4580,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", W, [], "cmp", [] |), @@ -4567,7 +4594,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", V, [], "cmp", [] |), @@ -4580,7 +4608,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4599,7 +4629,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -4673,7 +4708,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -4683,7 +4718,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -4693,7 +4728,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -4703,7 +4738,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -4713,7 +4748,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -5090,6 +5125,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -5115,6 +5151,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -5140,6 +5177,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -5165,6 +5204,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -5196,6 +5240,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5264,7 +5313,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Y, [ Y ], "partial_cmp", [] |), @@ -5297,7 +5346,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5340,7 +5389,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5392,7 +5441,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5449,7 +5498,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5562,7 +5611,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Y, [ Y ], "partial_cmp", [] |), @@ -5595,7 +5644,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5638,7 +5687,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5690,7 +5739,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5747,7 +5796,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5860,7 +5909,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Y, [ Y ], "partial_cmp", [] |), @@ -5893,7 +5942,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5939,7 +5988,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -5991,7 +6040,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6050,7 +6099,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6163,7 +6212,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Y, [ Y ], "partial_cmp", [] |), @@ -6196,7 +6245,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6242,7 +6291,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6294,7 +6343,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6353,7 +6402,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6498,7 +6547,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", X, [], "cmp", [] |), @@ -6511,7 +6561,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", W, [], "cmp", [] |), @@ -6524,7 +6575,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6543,7 +6596,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6568,7 +6626,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -6648,7 +6711,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), @@ -6658,7 +6721,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -6668,7 +6731,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -6678,7 +6741,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -6688,7 +6751,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -6698,7 +6761,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -7101,6 +7164,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -7126,6 +7190,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -7151,6 +7216,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -7176,6 +7243,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -7207,6 +7279,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -7238,6 +7315,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7312,7 +7394,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Z, [ Z ], "partial_cmp", [] |), @@ -7345,7 +7427,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7388,7 +7470,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7440,7 +7522,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7497,7 +7579,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7562,7 +7644,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7677,7 +7759,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Z, [ Z ], "partial_cmp", [] |), @@ -7710,7 +7792,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7753,7 +7835,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7805,7 +7887,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7862,7 +7944,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -7927,7 +8009,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8042,7 +8124,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Z, [ Z ], "partial_cmp", [] |), @@ -8075,7 +8157,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8121,7 +8203,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8173,7 +8255,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8232,7 +8314,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8297,7 +8379,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8412,7 +8494,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", Z, [ Z ], "partial_cmp", [] |), @@ -8445,7 +8527,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8491,7 +8573,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8543,7 +8625,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8602,7 +8684,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8667,7 +8749,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8814,7 +8896,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Y, [], "cmp", [] |), @@ -8827,7 +8910,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", X, [], "cmp", [] |), @@ -8840,7 +8924,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8859,7 +8945,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8884,7 +8975,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -8909,7 +9005,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -8995,7 +9096,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), @@ -9005,7 +9106,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), @@ -9015,7 +9116,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -9025,7 +9126,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -9035,7 +9136,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -9045,7 +9146,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -9055,7 +9156,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -9484,6 +9585,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -9509,6 +9611,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -9534,6 +9637,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -9559,6 +9664,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -9590,6 +9700,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -9621,6 +9736,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -9652,6 +9772,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9733,7 +9858,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", A, [ A ], "partial_cmp", [] |), @@ -9766,7 +9891,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9809,7 +9934,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9861,7 +9986,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9918,7 +10043,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -9983,7 +10108,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10048,7 +10173,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10165,7 +10290,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", A, [ A ], "partial_cmp", [] |), @@ -10198,7 +10323,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10241,7 +10366,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10293,7 +10418,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10350,7 +10475,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10415,7 +10540,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10480,7 +10605,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10597,7 +10722,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", A, [ A ], "partial_cmp", [] |), @@ -10630,7 +10755,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10676,7 +10801,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10728,7 +10853,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10787,7 +10912,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10852,7 +10977,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -10917,7 +11042,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11034,7 +11159,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", A, [ A ], "partial_cmp", [] |), @@ -11067,7 +11192,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11113,7 +11238,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11165,7 +11290,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11224,7 +11349,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11289,7 +11414,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11354,7 +11479,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11503,7 +11628,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Z, [], "cmp", [] |), @@ -11516,7 +11642,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Y, [], "cmp", [] |), @@ -11529,7 +11656,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11548,7 +11677,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11573,7 +11707,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11598,7 +11737,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -11623,7 +11767,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -11716,7 +11865,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", A, [], "default", [] |), @@ -11726,7 +11875,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), @@ -11736,7 +11885,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), @@ -11746,7 +11895,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -11756,7 +11905,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -11766,7 +11915,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -11776,7 +11925,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -11786,7 +11935,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -12241,6 +12390,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12266,6 +12416,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12291,6 +12442,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12316,6 +12469,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12347,6 +12505,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12378,6 +12541,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12409,6 +12577,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -12440,6 +12613,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12532,7 +12710,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", B, [ B ], "partial_cmp", [] |), @@ -12565,7 +12743,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12608,7 +12786,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12660,7 +12838,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12717,7 +12895,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12782,7 +12960,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12847,7 +13025,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -12912,7 +13090,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13037,7 +13215,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", B, [ B ], "partial_cmp", [] |), @@ -13070,7 +13248,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13113,7 +13291,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13165,7 +13343,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13222,7 +13400,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13287,7 +13465,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13352,7 +13530,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13417,7 +13595,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13542,7 +13720,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", B, [ B ], "partial_cmp", [] |), @@ -13575,7 +13753,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13621,7 +13799,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13673,7 +13851,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13732,7 +13910,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13797,7 +13975,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13862,7 +14040,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -13927,7 +14105,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14052,7 +14230,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", B, [ B ], "partial_cmp", [] |), @@ -14085,7 +14263,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14131,7 +14309,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14183,7 +14361,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14242,7 +14420,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14307,7 +14485,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14372,7 +14550,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14437,7 +14615,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14594,7 +14772,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", A, [], "cmp", [] |), @@ -14607,7 +14786,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Z, [], "cmp", [] |), @@ -14620,7 +14800,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14639,7 +14821,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14664,7 +14851,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14689,7 +14881,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14714,7 +14911,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -14739,7 +14941,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -14843,7 +15050,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", B, [], "default", [] |), @@ -14853,7 +15060,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", A, [], "default", [] |), @@ -14863,7 +15070,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), @@ -14873,7 +15080,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), @@ -14883,7 +15090,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -14893,7 +15100,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -14903,7 +15110,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -14913,7 +15120,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -14923,7 +15130,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -15410,6 +15617,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15435,6 +15643,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15460,6 +15669,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15485,6 +15696,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15516,6 +15732,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15547,6 +15768,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15578,6 +15804,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15609,6 +15840,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -15644,6 +15880,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15745,7 +15986,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", C, [ C ], "partial_cmp", [] |), @@ -15778,7 +16019,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15821,7 +16062,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15873,7 +16114,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15930,7 +16171,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -15995,7 +16236,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16060,7 +16301,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16125,7 +16366,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16192,7 +16433,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16330,7 +16571,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", C, [ C ], "partial_cmp", [] |), @@ -16363,7 +16604,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16406,7 +16647,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16458,7 +16699,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16515,7 +16756,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16580,7 +16821,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16645,7 +16886,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16710,7 +16951,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16777,7 +17018,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16915,7 +17156,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", C, [ C ], "partial_cmp", [] |), @@ -16948,7 +17189,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -16994,7 +17235,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17046,7 +17287,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17105,7 +17346,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17170,7 +17411,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17235,7 +17476,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17300,7 +17541,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17367,7 +17608,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17505,7 +17746,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", C, [ C ], "partial_cmp", [] |), @@ -17538,7 +17779,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17584,7 +17825,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17636,7 +17877,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17695,7 +17936,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17760,7 +18001,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17825,7 +18066,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17890,7 +18131,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -17957,7 +18198,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18128,7 +18369,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", B, [], "cmp", [] |), @@ -18141,7 +18383,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", A, [], "cmp", [] |), @@ -18154,7 +18397,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18173,7 +18418,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18198,7 +18448,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18223,7 +18478,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18248,7 +18508,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18273,7 +18538,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -18302,7 +18572,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -18416,7 +18691,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", C, [], "default", [] |), @@ -18426,7 +18701,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", B, [], "default", [] |), @@ -18436,7 +18711,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", A, [], "default", [] |), @@ -18446,7 +18721,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), @@ -18456,7 +18731,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), @@ -18466,7 +18741,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -18476,7 +18751,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -18486,7 +18761,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -18496,7 +18771,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -18506,7 +18781,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -19031,6 +19306,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19056,6 +19332,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19081,6 +19358,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19106,6 +19385,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19137,6 +19421,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19168,6 +19457,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19199,6 +19493,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19230,6 +19529,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19265,6 +19569,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -19301,6 +19610,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19414,7 +19728,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", D, [ D ], "partial_cmp", [] |), @@ -19447,7 +19761,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19490,7 +19804,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19542,7 +19856,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19599,7 +19913,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19664,7 +19978,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19729,7 +20043,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19794,7 +20108,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19861,7 +20175,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -19939,7 +20253,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20083,7 +20397,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", D, [ D ], "partial_cmp", [] |), @@ -20116,7 +20430,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20159,7 +20473,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20211,7 +20525,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20268,7 +20582,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20333,7 +20647,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20398,7 +20712,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20463,7 +20777,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20530,7 +20844,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20608,7 +20922,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20752,7 +21066,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", D, [ D ], "partial_cmp", [] |), @@ -20785,7 +21099,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20831,7 +21145,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20883,7 +21197,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -20942,7 +21256,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21007,7 +21321,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21072,7 +21386,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21137,7 +21451,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21204,7 +21518,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21282,7 +21596,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21426,7 +21740,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", D, [ D ], "partial_cmp", [] |), @@ -21459,7 +21773,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21505,7 +21819,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21557,7 +21871,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21616,7 +21930,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21681,7 +21995,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21746,7 +22060,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21811,7 +22125,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21878,7 +22192,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -21956,7 +22270,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22133,7 +22447,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", C, [], "cmp", [] |), @@ -22146,7 +22461,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", B, [], "cmp", [] |), @@ -22159,7 +22475,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22178,7 +22496,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22203,7 +22526,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22228,7 +22556,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22253,7 +22586,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22278,7 +22616,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22307,7 +22650,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -22336,7 +22684,13 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let + _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -22460,7 +22814,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", D, [], "default", [] |), @@ -22470,7 +22824,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", C, [], "default", [] |), @@ -22480,7 +22834,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", B, [], "default", [] |), @@ -22490,7 +22844,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", A, [], "default", [] |), @@ -22500,7 +22854,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), @@ -22510,7 +22864,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), @@ -22520,7 +22874,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -22530,7 +22884,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -22540,7 +22894,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -22550,7 +22904,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -22560,7 +22914,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), @@ -23139,6 +23493,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23164,6 +23519,7 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23189,6 +23545,8 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23214,6 +23572,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23245,6 +23608,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23276,6 +23644,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23307,6 +23680,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23338,6 +23716,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23373,6 +23756,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23409,6 +23797,11 @@ Module tuple. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -23448,6 +23841,12 @@ Module tuple. "core::option::Option::Some", 0 |) in + let + _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23572,7 +23971,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", E, [ E ], "partial_cmp", [] |), @@ -23605,7 +24004,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23648,7 +24047,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23700,7 +24099,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23757,7 +24156,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23822,7 +24221,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23887,7 +24286,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -23952,7 +24351,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24019,7 +24418,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24097,7 +24496,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24177,7 +24576,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let + (let~ c := M.alloc (| M.call_closure (| @@ -24329,7 +24728,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", E, [ E ], "partial_cmp", [] |), @@ -24362,7 +24761,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24405,7 +24804,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24457,7 +24856,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24514,7 +24913,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24579,7 +24978,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24644,7 +25043,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24709,7 +25108,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24776,7 +25175,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24854,7 +25253,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -24934,7 +25333,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let + (let~ c := M.alloc (| M.call_closure (| @@ -25086,7 +25485,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", E, [ E ], "partial_cmp", [] |), @@ -25119,7 +25518,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25165,7 +25564,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25217,7 +25616,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25276,7 +25675,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25341,7 +25740,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25406,7 +25805,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25471,7 +25870,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25538,7 +25937,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25616,7 +26015,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25696,7 +26095,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let + (let~ c := M.alloc (| M.call_closure (| @@ -25848,7 +26247,7 @@ Module tuple. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let c := + let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::PartialOrd", E, [ E ], "partial_cmp", [] |), @@ -25881,7 +26280,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25927,7 +26326,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -25979,7 +26378,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26038,7 +26437,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26103,7 +26502,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26168,7 +26567,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26233,7 +26632,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26300,7 +26699,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26378,7 +26777,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let c := + (let~ c := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26458,7 +26857,7 @@ Module tuple. |))); fun γ => ltac:(M.monadic - (let + (let~ c := M.alloc (| M.call_closure (| @@ -26643,7 +27042,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", D, [], "cmp", [] |), @@ -26656,7 +27056,8 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", C, [], "cmp", [] |), @@ -26669,7 +27070,9 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26688,7 +27091,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26713,7 +27121,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26738,7 +27151,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26763,7 +27181,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26788,7 +27211,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26817,7 +27245,12 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26846,7 +27279,13 @@ Module tuple. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let + _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -26876,7 +27315,13 @@ Module tuple. fun γ => ltac:(M.monadic - (M.alloc (| + (let + _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -27011,7 +27456,7 @@ Module tuple. (Value.Tuple [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", E, [], "default", [] |), @@ -27021,7 +27466,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", D, [], "default", [] |), @@ -27031,7 +27476,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", C, [], "default", [] |), @@ -27041,7 +27486,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", B, [], "default", [] |), @@ -27051,7 +27496,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", A, [], "default", [] |), @@ -27061,7 +27506,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Z, [], "default", [] |), @@ -27071,7 +27516,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", Y, [], "default", [] |), @@ -27081,7 +27526,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", X, [], "default", [] |), @@ -27091,7 +27536,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", W, [], "default", [] |), @@ -27101,7 +27546,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", V, [], "default", [] |), @@ -27111,7 +27556,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", U, [], "default", [] |), @@ -27121,7 +27566,7 @@ Module tuple. x |); M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| "core::default::Default", T, [], "default", [] |), diff --git a/CoqOfRust/core/unicode/printable.v b/CoqOfRust/core/unicode/printable.v index 8c47559fc..32c558748 100644 --- a/CoqOfRust/core/unicode/printable.v +++ b/CoqOfRust/core/unicode/printable.v @@ -50,12 +50,10 @@ Module unicode. M.catch_return (| ltac:(M.monadic (M.read (| - let xupper := - M.alloc (| - M.rust_cast (BinOp.Panic.shr (| M.read (| x |), Value.Integer 8 |)) - |) in - let lowerstart := M.alloc (| Value.Integer 0 |) in - let _ := + let~ xupper := + M.alloc (| M.rust_cast (BinOp.Wrap.shr (M.read (| x |)) (Value.Integer 8)) |) in + let~ lowerstart := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -82,7 +80,7 @@ Module unicode. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -101,7 +99,12 @@ Module unicode. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -117,15 +120,14 @@ Module unicode. let γ2_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let upper := M.copy (| γ2_0 |) in let lowercount := M.copy (| γ2_1 |) in - let lowerend := + let~ lowerend := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| lowerstart |), - M.rust_cast (M.read (| lowercount |)) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| lowerstart |)) + (M.rust_cast (M.read (| lowercount |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -197,7 +199,7 @@ Module unicode. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -217,7 +219,12 @@ Module unicode. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -317,7 +324,7 @@ Module unicode. |))) ] |) in - let _ := + let~ _ := M.write (| lowerstart, M.read (| lowerend |) |) in M.alloc (| Value.Tuple [] |))) ] @@ -326,8 +333,8 @@ Module unicode. |))) ] |)) in - let x := M.alloc (| M.rust_cast (M.read (| x |)) |) in - let normal := + let~ x := M.alloc (| M.rust_cast (M.read (| x |)) |) in + let~ normal := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -349,8 +356,8 @@ Module unicode. ] |) |) in - let current := M.alloc (| Value.Bool true |) in - let _ := + let~ current := M.alloc (| Value.Bool true |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -384,7 +391,7 @@ Module unicode. 0 |) in let v := M.copy (| γ0_0 |) in - let len := + let~ len := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -407,13 +414,12 @@ Module unicode. |) in M.alloc (| BinOp.Pure.bit_or - (BinOp.Panic.shl (| - M.rust_cast + (BinOp.Wrap.shl + (M.rust_cast (BinOp.Pure.bit_and (M.read (| v |)) - (Value.Integer 127)), - Value.Integer 8 - |)) + (Value.Integer 127))) + (Value.Integer 8)) (M.rust_cast (M.call_closure (| M.get_associated_function (| @@ -450,17 +456,13 @@ Module unicode. ] |) |) in - let _ := + let~ _ := let β := x in M.write (| β, - BinOp.Panic.sub (| - Integer.I32, - M.read (| β |), - M.read (| len |) - |) + BinOp.Wrap.sub Integer.I32 (M.read (| β |)) (M.read (| len |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -482,7 +484,7 @@ Module unicode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| current, UnOp.Pure.not (M.read (| current |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -490,7 +492,7 @@ Module unicode. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -564,8 +566,8 @@ Module unicode. M.catch_return (| ltac:(M.monadic (M.read (| - let x := M.alloc (| M.rust_cast (M.read (| x |)) |) in - let lower := M.alloc (| M.rust_cast (M.read (| x |)) |) in + let~ x := M.alloc (| M.rust_cast (M.read (| x |)) |) in + let~ lower := M.alloc (| M.rust_cast (M.read (| x |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -684,7 +686,7 @@ Module unicode. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -720,7 +722,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -756,7 +758,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -792,7 +794,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -828,7 +830,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -864,7 +866,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -900,7 +902,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -936,7 +938,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -972,7 +974,7 @@ Module unicode. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/core/unicode/unicode_data.v b/CoqOfRust/core/unicode/unicode_data.v index a1aee94ea..a252d4f1c 100644 --- a/CoqOfRust/core/unicode/unicode_data.v +++ b/CoqOfRust/core/unicode/unicode_data.v @@ -64,36 +64,34 @@ Module unicode. M.catch_return (| ltac:(M.monadic (M.read (| - let bucket_idx := + let~ bucket_idx := M.alloc (| M.rust_cast - (BinOp.Panic.div (| Integer.U32, M.read (| needle |), Value.Integer 64 |)) + (BinOp.Wrap.div Integer.U32 (M.read (| needle |)) (Value.Integer 64)) |) in - let chunk_map_idx := + let~ chunk_map_idx := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - M.read (| bucket_idx |), - M.read (| + BinOp.Wrap.div + Integer.Usize + (M.read (| bucket_idx |)) + (M.read (| M.get_constant (| "core::unicode::unicode_data::bitset_search::CHUNK_SIZE" |) - |) - |) + |)) |) in - let chunk_piece := + let~ chunk_piece := M.alloc (| - BinOp.Panic.rem (| - Integer.Usize, - M.read (| bucket_idx |), - M.read (| + BinOp.Wrap.rem + Integer.Usize + (M.read (| bucket_idx |)) + (M.read (| M.get_constant (| "core::unicode::unicode_data::bitset_search::CHUNK_SIZE" |) - |) - |) + |)) |) in - let chunk_idx := + let~ chunk_idx := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -129,7 +127,7 @@ Module unicode. ] |) |) in - let idx := + let~ idx := M.alloc (| M.rust_cast (M.read (| @@ -142,7 +140,7 @@ Module unicode. |) |)) |) in - let word := + let~ word := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -175,10 +173,10 @@ Module unicode. M.SubPointer.get_array_field (| M.read (| bitset_canonicalized |), M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| idx |), - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.read (| idx |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u64" ], "len", @@ -188,8 +186,7 @@ Module unicode. (* Unsize *) M.pointer_coercion (M.read (| bitset_canonical |)) ] - |) - |) + |)) |) |), [ @@ -199,25 +196,22 @@ Module unicode. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let real_idx := M.copy (| γ0_0 |) in let mapping := M.copy (| γ0_1 |) in - let word := + let~ word := M.copy (| M.SubPointer.get_array_field (| M.read (| bitset_canonical |), M.alloc (| M.rust_cast (M.read (| real_idx |)) |) |) |) in - let should_invert := + let~ should_invert := M.alloc (| BinOp.Pure.ne (BinOp.Pure.bit_and (M.read (| mapping |)) - (BinOp.Panic.shl (| - Value.Integer 1, - Value.Integer 6 - |))) + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 6))) (Value.Integer 0) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -229,7 +223,7 @@ Module unicode. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| word, UnOp.Pure.not (M.read (| word |)) @@ -238,17 +232,16 @@ Module unicode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let quantity := + let~ quantity := M.alloc (| BinOp.Pure.bit_and (M.read (| mapping |)) - (BinOp.Panic.sub (| - Integer.U8, - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 6 |), - Value.Integer 1 - |)) + (BinOp.Wrap.sub + Integer.U8 + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 6)) + (Value.Integer 1)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -260,10 +253,9 @@ Module unicode. BinOp.Pure.ne (BinOp.Pure.bit_and (M.read (| mapping |)) - (BinOp.Panic.shl (| - Value.Integer 1, - Value.Integer 7 - |))) + (BinOp.Wrap.shl + (Value.Integer 1) + (Value.Integer 7))) (Value.Integer 0) |)) in let _ := @@ -271,19 +263,18 @@ Module unicode. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := word in M.write (| β, - BinOp.Panic.shr (| - M.read (| β |), - M.rust_cast (M.read (| quantity |)) - |) + BinOp.Wrap.shr + (M.read (| β |)) + (M.rust_cast (M.read (| quantity |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| word, M.call_closure (| @@ -311,11 +302,10 @@ Module unicode. BinOp.Pure.ne (BinOp.Pure.bit_and (M.read (| word |)) - (BinOp.Panic.shl (| - Value.Integer 1, - M.rust_cast - (BinOp.Panic.rem (| Integer.U32, M.read (| needle |), Value.Integer 64 |)) - |))) + (BinOp.Wrap.shl + (Value.Integer 1) + (M.rust_cast + (BinOp.Wrap.rem Integer.U32 (M.read (| needle |)) (Value.Integer 64))))) (Value.Integer 0) |) |))) @@ -338,11 +328,10 @@ Module unicode. (let short_offset_run_header := M.alloc (| short_offset_run_header |) in BinOp.Pure.bit_and (M.read (| short_offset_run_header |)) - (BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 21 |), - Value.Integer 1 - |)))) + (BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 21)) + (Value.Integer 1)))) | _, _ => M.impossible end. @@ -359,8 +348,7 @@ Module unicode. | [], [ short_offset_run_header ] => ltac:(M.monadic (let short_offset_run_header := M.alloc (| short_offset_run_header |) in - M.rust_cast - (BinOp.Panic.shr (| M.read (| short_offset_run_header |), Value.Integer 21 |)))) + M.rust_cast (BinOp.Wrap.shr (M.read (| short_offset_run_header |)) (Value.Integer 21)))) | _, _ => M.impossible end. @@ -416,7 +404,7 @@ Module unicode. let short_offset_runs := M.alloc (| short_offset_runs |) in let offsets := M.alloc (| offsets |) in M.read (| - let last_idx := + let~ last_idx := M.copy (| M.match_operator (| M.alloc (| @@ -433,7 +421,7 @@ Module unicode. |), [ (* Unsize *) M.pointer_coercion (M.read (| short_offset_runs |)); - M.alloc (| BinOp.Panic.shl (| M.read (| needle |), Value.Integer 11 |) |); + M.alloc (| BinOp.Wrap.shl (M.read (| needle |)) (Value.Integer 11) |); M.closure (fun γ => ltac:(M.monadic @@ -473,7 +461,7 @@ Module unicode. |) in let idx := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| idx |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| idx |)) (Value.Integer 1) |))); fun γ => ltac:(M.monadic @@ -488,7 +476,7 @@ Module unicode. ] |) |) in - let offset_idx := + let~ offset_idx := M.alloc (| M.call_closure (| M.get_function (| "core::unicode::unicode_data::decode_length", [] |), @@ -499,7 +487,7 @@ Module unicode. ] |) |) in - let length := + let~ length := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -516,11 +504,10 @@ Module unicode. |), [ (* Unsize *) M.pointer_coercion (M.read (| short_offset_runs |)); - BinOp.Panic.add (| - Integer.Usize, - M.read (| last_idx |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| last_idx |)) + (Value.Integer 1) ] |) |) in @@ -532,35 +519,33 @@ Module unicode. |) in let next := M.copy (| γ0_0 |) in M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_function (| "core::unicode::unicode_data::decode_length", [] |), [ M.read (| M.read (| next |) |) ] - |), - M.read (| offset_idx |) - |) + |)) + (M.read (| offset_idx |)) |))); fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ (* Unsize *) M.pointer_coercion (M.read (| offsets |)) ] - |), - M.read (| offset_idx |) - |) + |)) + (M.read (| offset_idx |)) |))) ] |) |) in - let prev := + let~ prev := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -618,12 +603,10 @@ Module unicode. ] |) |) in - let total := - M.alloc (| - BinOp.Panic.sub (| Integer.U32, M.read (| needle |), M.read (| prev |) |) - |) in - let prefix_sum := M.alloc (| Value.Integer 0 |) in - let _ := + let~ total := + M.alloc (| BinOp.Wrap.sub Integer.U32 (M.read (| needle |)) (M.read (| prev |)) |) in + let~ prefix_sum := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -641,11 +624,7 @@ Module unicode. [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.sub (| - Integer.Usize, - M.read (| length |), - Value.Integer 1 - |)) + BinOp.Wrap.sub Integer.Usize (M.read (| length |)) (Value.Integer 1)) ] ] |) @@ -656,7 +635,7 @@ Module unicode. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -675,7 +654,9 @@ Module unicode. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -686,24 +667,23 @@ Module unicode. "core::option::Option::Some", 0 |) in - let offset := + let~ offset := M.copy (| M.SubPointer.get_array_field (| M.read (| offsets |), offset_idx |) |) in - let _ := + let~ _ := let β := prefix_sum in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - M.rust_cast (M.read (| offset |)) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| β |)) + (M.rust_cast (M.read (| offset |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -727,15 +707,14 @@ Module unicode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := offset_idx in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -746,7 +725,7 @@ Module unicode. |)) in M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.Usize, M.read (| offset_idx |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.Usize (M.read (| offset_idx |)) (Value.Integer 2)) (Value.Integer 1) |) |))) @@ -6476,7 +6455,7 @@ Module unicode. (let c := M.alloc (| c |) in M.read (| M.match_operator (| - M.alloc (| BinOp.Panic.shr (| M.rust_cast (M.read (| c |)), Value.Integer 8 |) |), + M.alloc (| BinOp.Wrap.shr (M.rust_cast (M.read (| c |))) (Value.Integer 8) |), [ fun γ => ltac:(M.monadic @@ -6706,7 +6685,7 @@ Module unicode. ltac:(M.monadic (let i := M.copy (| γ |) in M.read (| - let u := + let~ u := M.copy (| M.SubPointer.get_tuple_field (| M.SubPointer.get_array_field (| @@ -6828,15 +6807,15 @@ Module unicode. M.rust_cast (BinOp.Pure.bit_and (M.read (| u |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::unicode::unicode_data::conversions::INDEX_MASK" |) - |), - Value.Integer 1 - |))) + |)) + (Value.Integer + 1))) ] |) |))) @@ -7018,7 +6997,7 @@ Module unicode. ltac:(M.monadic (let i := M.copy (| γ |) in M.read (| - let u := + let~ u := M.copy (| M.SubPointer.get_tuple_field (| M.SubPointer.get_array_field (| @@ -7140,15 +7119,15 @@ Module unicode. M.rust_cast (BinOp.Pure.bit_and (M.read (| u |)) - (BinOp.Panic.sub (| - Integer.U32, - M.read (| + (BinOp.Wrap.sub + Integer.U32 + (M.read (| M.get_constant (| "core::unicode::unicode_data::conversions::INDEX_MASK" |) - |), - Value.Integer 1 - |))) + |)) + (Value.Integer + 1))) ] |) |))) diff --git a/CoqOfRust/examples/default/examples/custom/add_one.v b/CoqOfRust/examples/default/examples/custom/add_one.v index 68e1675d5..76ea50891 100644 --- a/CoqOfRust/examples/default/examples/custom/add_one.v +++ b/CoqOfRust/examples/default/examples/custom/add_one.v @@ -11,7 +11,7 @@ Definition add_one (τ : list Ty.t) (α : list Value.t) : M := | [], [ x ] => ltac:(M.monadic (let x := M.alloc (| x |) in - BinOp.Panic.add (| Integer.U32, M.read (| x |), Value.Integer 1 |))) + BinOp.Wrap.add Integer.U32 (M.read (| x |)) (Value.Integer 1))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/custom/constructor_as_function.v b/CoqOfRust/examples/default/examples/custom/constructor_as_function.v index c387fcb35..7b3c4ea80 100644 --- a/CoqOfRust/examples/default/examples/custom/constructor_as_function.v +++ b/CoqOfRust/examples/default/examples/custom/constructor_as_function.v @@ -98,7 +98,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let v := + let~ v := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -185,8 +185,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/custom/hello_world.v b/CoqOfRust/examples/default/examples/custom/hello_world.v index 960f60c39..e49481726 100644 --- a/CoqOfRust/examples/default/examples/custom/hello_world.v +++ b/CoqOfRust/examples/default/examples/custom/hello_world.v @@ -47,8 +47,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -84,11 +84,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let number := + let~ number := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.Integer 7 ] |) in - let letter := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let emoticon := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ letter := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ emoticon := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -98,8 +98,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -146,7 +146,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -156,8 +156,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let j := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -203,8 +203,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -237,7 +237,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let i_like_letters := M.alloc (| Value.Bool false |) in + let~ i_like_letters := M.alloc (| Value.Bool false |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -247,8 +247,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -302,8 +302,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ := M.use i_like_letters in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -336,8 +336,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/custom/if_let.v b/CoqOfRust/examples/default/examples/custom/if_let.v index 49314adff..d51d803b5 100644 --- a/CoqOfRust/examples/default/examples/custom/if_let.v +++ b/CoqOfRust/examples/default/examples/custom/if_let.v @@ -99,7 +99,10 @@ Definition extract_value (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic match γ with | [ value ] => value | _ => M.impossible (||) end)) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "if_let::Container::Empty" |) in + M.alloc (| Value.Integer 0 |))) ] |) |))) @@ -145,8 +148,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.Integer 5 ] |) in - let _ := + let~ x := + M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.Integer 5 ] |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -156,8 +160,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let y := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -204,7 +208,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| x, [ @@ -216,7 +220,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let y := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -259,10 +263,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -278,8 +285,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let z := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -352,7 +359,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let z := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -404,7 +411,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.Tuple [] |))) ] |) |))) diff --git a/CoqOfRust/examples/default/examples/custom/impl_param.v b/CoqOfRust/examples/default/examples/custom/impl_param.v index 750ac8c0a..86a6284fe 100644 --- a/CoqOfRust/examples/default/examples/custom/impl_param.v +++ b/CoqOfRust/examples/default/examples/custom/impl_param.v @@ -22,8 +22,8 @@ Definition with_impls (τ : list Ty.t) (α : list Value.t) : M := let func2 := M.alloc (| func2 |) in let foo := M.alloc (| foo |) in M.read (| - let x := M.copy (| func |) in - let _ := + let~ x := M.copy (| func |) in + let~ _ := M.write (| x, M.call_closure (| @@ -31,8 +31,8 @@ Definition with_impls (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let y := M.copy (| func2 |) in - let _ := + let~ y := M.copy (| func2 |) in + let~ _ := M.write (| y, M.call_closure (| @@ -40,8 +40,8 @@ Definition with_impls (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let z := M.copy (| foo |) in - let b := + let~ z := M.copy (| foo |) in + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/custom/module_duplicate.v b/CoqOfRust/examples/default/examples/custom/module_duplicate.v index aed9d1aba..d477b5982 100644 --- a/CoqOfRust/examples/default/examples/custom/module_duplicate.v +++ b/CoqOfRust/examples/default/examples/custom/module_duplicate.v @@ -13,8 +13,8 @@ Module foo. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -57,8 +57,8 @@ Module foo. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -80,7 +80,7 @@ Module foo. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "module_duplicate::foo::gre::f_foo_gre", [] |), @@ -105,7 +105,7 @@ Definition f (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "module_duplicate::foo::f_foo", [] |), [] |) |) in diff --git a/CoqOfRust/examples/default/examples/custom/mutual_loop.v b/CoqOfRust/examples/default/examples/custom/mutual_loop.v index 6e66f67bf..96e9fff02 100644 --- a/CoqOfRust/examples/default/examples/custom/mutual_loop.v +++ b/CoqOfRust/examples/default/examples/custom/mutual_loop.v @@ -100,14 +100,14 @@ Definition start_loop (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let la := + let~ la := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "mutual_loop::LoopA", "new", [] |), [] |) |) in - let lb := + let~ lb := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "mutual_loop::LoopA", "start_loop", [] |), diff --git a/CoqOfRust/examples/default/examples/custom/pattern_in_function_parameters.v b/CoqOfRust/examples/default/examples/custom/pattern_in_function_parameters.v index e57643f0f..729219826 100644 --- a/CoqOfRust/examples/default/examples/custom/pattern_in_function_parameters.v +++ b/CoqOfRust/examples/default/examples/custom/pattern_in_function_parameters.v @@ -20,7 +20,7 @@ Definition sum (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let x := M.copy (| γ0_0 |) in let y := M.copy (| γ0_1 |) in - BinOp.Panic.add (| Integer.I32, M.read (| x |), M.read (| y |) |))) + BinOp.Wrap.add Integer.I32 (M.read (| x |)) (M.read (| y |)))) ] |))) | _, _ => M.impossible @@ -65,8 +65,8 @@ Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := (let γ := M.read (| γ |) in let end_ := M.copy (| γ |) in M.read (| - let start := M.alloc (| M.rust_cast (M.read (| start |)) |) in - let end_ := M.alloc (| M.rust_cast (M.read (| end_ |)) |) in + let~ start := M.alloc (| M.rust_cast (M.read (| start |)) |) in + let~ end_ := M.alloc (| M.rust_cast (M.read (| end_ |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -82,13 +82,12 @@ Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let count := + let~ count := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.read (| end_ |), - M.read (| start |) - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| end_ |)) + (M.read (| start |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -135,11 +134,10 @@ Definition steps_between (τ : list Ty.t) (α : list Value.t) : M := [] |), [ - BinOp.Panic.sub (| - Integer.U32, - M.read (| count |), - Value.Integer 2048 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| count |)) + (Value.Integer 2048) ] |) ] diff --git a/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v b/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v index d8e94e38c..d484e146d 100644 --- a/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v +++ b/CoqOfRust/examples/default/examples/custom/polymorphic_associated_function.v @@ -63,11 +63,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let foo := + let~ foo := M.alloc (| Value.StructRecord "polymorphic_associated_function::Foo" [ ("data", Value.Integer 42) ] |) in - let bar := + let~ bar := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -78,7 +78,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| foo |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -116,7 +116,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/custom/provided_method.v b/CoqOfRust/examples/default/examples/custom/provided_method.v index c8579633f..5344aea72 100644 --- a/CoqOfRust/examples/default/examples/custom/provided_method.v +++ b/CoqOfRust/examples/default/examples/custom/provided_method.v @@ -8,10 +8,10 @@ Module ProvidedAndRequired. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.I32, - Value.Integer 42, - M.call_closure (| + BinOp.Wrap.add + Integer.I32 + (Value.Integer 42) + (M.call_closure (| M.get_trait_method (| "provided_method::ProvidedAndRequired", Self, @@ -20,8 +20,7 @@ Module ProvidedAndRequired. [] |), [ M.read (| self |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -107,8 +106,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 5 |) in - let _ := + let~ x := M.alloc (| Value.Integer 5 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -153,7 +152,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -179,8 +178,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let y := M.alloc (| Value.Integer 5 |) in - let _ := + let~ y := M.alloc (| Value.Integer 5 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -225,7 +224,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/ink_contracts/basic_contract_caller.v b/CoqOfRust/examples/default/examples/ink_contracts/basic_contract_caller.v index c83b0d2d8..c19de350f 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/basic_contract_caller.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/basic_contract_caller.v @@ -118,7 +118,7 @@ Module Impl_basic_contract_caller_OtherContract. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -192,7 +192,7 @@ Module Impl_basic_contract_caller_BasicContractCaller. ltac:(M.monadic (let other_contract_code_hash := M.alloc (| other_contract_code_hash |) in M.read (| - let other_contract := + let~ other_contract := M.alloc (| M.never_to_any (| M.call_closure (| @@ -224,7 +224,7 @@ Module Impl_basic_contract_caller_BasicContractCaller. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v b/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v index b4f34be5f..a9cbf5feb 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/call_runtime.v @@ -317,7 +317,9 @@ Module Impl_core_convert_From_call_runtime_EnvError_for_call_runtime_RuntimeErro [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "call_runtime::EnvError::CallRuntimeFailed" |) in + M.alloc (| Value.StructTuple "call_runtime::RuntimeError::CallRuntimeFailed" [] |))); fun γ => diff --git a/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v b/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v index 84019aba9..88850da18 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/conditional_compilation.v @@ -309,7 +309,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -325,7 +325,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. |) |)) |) in - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -347,7 +347,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -412,7 +412,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -434,7 +434,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. ] |) |) in - let block_number := + let~ block_number := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -456,7 +456,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -472,7 +472,7 @@ Module Impl_conditional_compilation_ConditionalCompilation. |) |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -535,7 +535,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -593,7 +593,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -615,7 +615,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -644,7 +644,7 @@ Module Impl_conditional_compilation_Flip_for_conditional_compilation_Conditional ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v b/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v index 5c3492ab0..48e71ee97 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/contract_terminate.v @@ -177,7 +177,7 @@ Module Impl_contract_terminate_JustTerminate. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v b/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v index 0ae7a5181..877279224 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/contract_transfer.v @@ -205,8 +205,8 @@ Module Impl_contract_transfer_GiveMe. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -245,8 +245,8 @@ Module Impl_contract_transfer_GiveMe. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -307,7 +307,7 @@ Module Impl_contract_transfer_GiveMe. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -451,8 +451,8 @@ Module Impl_contract_transfer_GiveMe. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -513,7 +513,7 @@ Module Impl_contract_transfer_GiveMe. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v b/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v index 25ef620a7..c05ba5731 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/custom_allocator.v @@ -97,7 +97,7 @@ Module Impl_custom_allocator_CustomAllocator. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v b/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v index ff94e483c..6f7e99a57 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/custom_environment.v @@ -311,7 +311,7 @@ Module Impl_custom_environment_Topics. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "custom_environment::Env", "emit_event", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/dns.v b/CoqOfRust/examples/default/examples/ink_contracts/dns.v index 7571e33e1..2a6f7dea2 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/dns.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/dns.v @@ -429,7 +429,7 @@ Module Impl_core_default_Default_for_dns_DomainNameService. | [], [] => ltac:(M.monadic (M.read (| - let name_to_address := + let~ name_to_address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -442,7 +442,7 @@ Module Impl_core_default_Default_for_dns_DomainNameService. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -468,7 +468,7 @@ Module Impl_core_default_Default_for_dns_DomainNameService. ] |) |) in - let name_to_owner := + let~ name_to_owner := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -481,7 +481,7 @@ Module Impl_core_default_Default_for_dns_DomainNameService. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -571,7 +571,7 @@ Module Impl_core_cmp_PartialEq_for_dns_Error. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -581,7 +581,7 @@ Module Impl_core_cmp_PartialEq_for_dns_Error. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -720,7 +720,7 @@ Module Impl_dns_DomainNameService. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "dns::Env", "caller", [] |), @@ -738,7 +738,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -784,7 +784,7 @@ Module Impl_dns_DomainNameService. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -805,7 +805,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "dns::Env", "emit_event", [] |), @@ -920,7 +920,7 @@ Module Impl_dns_DomainNameService. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "dns::Env", "caller", [] |), @@ -938,7 +938,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let owner := + let~ owner := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -949,7 +949,7 @@ Module Impl_dns_DomainNameService. [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -985,7 +985,7 @@ Module Impl_dns_DomainNameService. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let old_address := + let~ old_address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1005,7 +1005,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1026,7 +1026,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "dns::Env", "emit_event", [] |), @@ -1095,7 +1095,7 @@ Module Impl_dns_DomainNameService. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "dns::Env", "caller", [] |), @@ -1113,7 +1113,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let owner := + let~ owner := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1124,7 +1124,7 @@ Module Impl_dns_DomainNameService. [ M.read (| self |); M.read (| name |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1160,7 +1160,7 @@ Module Impl_dns_DomainNameService. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let old_owner := + let~ old_owner := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1180,7 +1180,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1201,7 +1201,7 @@ Module Impl_dns_DomainNameService. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "dns::Env", "emit_event", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v b/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v index 04c23f0e2..8a39adf41 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/erc1155.v @@ -364,7 +364,7 @@ Module Impl_core_cmp_PartialEq_for_erc1155_Error. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -374,7 +374,7 @@ Module Impl_core_cmp_PartialEq_for_erc1155_Error. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -699,7 +699,7 @@ Module Impl_erc1155_Contract. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "caller", [] |), @@ -713,15 +713,15 @@ Module Impl_erc1155_Contract. ] |) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "erc1155::Contract", "token_id_nonce" |) in - M.write (| β, BinOp.Panic.add (| Integer.U128, M.read (| β |), Value.Integer 1 |) |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.U128 (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -752,7 +752,7 @@ Module Impl_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "emit_event", [] |), @@ -856,7 +856,7 @@ Module Impl_erc1155_Contract. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -903,7 +903,7 @@ Module Impl_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "caller", [] |), @@ -917,7 +917,7 @@ Module Impl_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -939,7 +939,7 @@ Module Impl_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "emit_event", [] |), @@ -1019,7 +1019,7 @@ Module Impl_erc1155_Contract. let token_id := M.alloc (| token_id |) in let value := M.alloc (| value |) in M.read (| - let sender_balance := + let~ sender_balance := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1052,13 +1052,10 @@ Module Impl_erc1155_Contract. ] |) |) in - let _ := + let~ _ := let β := sender_balance in - M.write (| - β, - BinOp.Panic.sub (| Integer.U128, M.read (| β |), M.read (| value |) |) - |) in - let _ := + M.write (| β, BinOp.Wrap.sub Integer.U128 (M.read (| β |)) (M.read (| value |)) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1079,7 +1076,7 @@ Module Impl_erc1155_Contract. ] |) |) in - let recipient_balance := + let~ recipient_balance := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1110,13 +1107,10 @@ Module Impl_erc1155_Contract. ] |) |) in - let _ := + let~ _ := let β := recipient_balance in - M.write (| - β, - BinOp.Panic.add (| Integer.U128, M.read (| β |), M.read (| value |) |) - |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.U128 (M.read (| β |)) (M.read (| value |)) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1137,7 +1131,7 @@ Module Impl_erc1155_Contract. ] |) |) in - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "caller", [] |), @@ -1151,7 +1145,7 @@ Module Impl_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "emit_event", [] |), @@ -1397,7 +1391,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "caller", [] |), @@ -1411,7 +1405,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1433,7 +1427,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1493,7 +1487,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1549,7 +1543,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let balance := + let~ balance := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1562,7 +1556,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [ M.read (| self |); M.read (| from |); M.read (| token_id |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1601,7 +1595,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1618,7 +1612,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1694,7 +1688,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "caller", [] |), @@ -1708,7 +1702,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1730,7 +1724,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1790,7 +1784,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1846,7 +1840,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1896,7 +1890,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1956,7 +1950,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let transfers := + let~ transfers := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2012,7 +2006,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2054,7 +2048,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2080,7 +2074,9 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2097,7 +2093,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. let id := M.copy (| γ1_0 |) in let γ1_1 := M.read (| γ1_1 |) in let v := M.copy (| γ1_1 |) in - let balance := + let~ balance := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2114,7 +2110,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2170,7 +2166,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2196,7 +2192,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2222,7 +2218,9 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2239,7 +2237,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. let id := M.copy (| γ1_0 |) in let γ1_1 := M.read (| γ1_1 |) in let v := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2263,7 +2261,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2334,7 +2332,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. let owners := M.alloc (| owners |) in let token_ids := M.alloc (| token_ids |) in M.read (| - let output := + let~ output := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2347,7 +2345,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2374,7 +2372,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2393,7 +2391,9 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2430,7 +2430,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2449,7 +2449,12 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -2463,7 +2468,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. 0 |) in let t := M.copy (| γ0_0 |) in - let amount := + let~ amount := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2480,7 +2485,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2545,7 +2550,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "caller", [] |), @@ -2559,7 +2564,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2607,7 +2612,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2616,7 +2621,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. (let γ := M.use approved in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2645,7 +2650,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2673,7 +2678,7 @@ Module Impl_erc1155_Erc1155_for_erc1155_Contract. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc1155::Env", "emit_event", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/erc20.v b/CoqOfRust/examples/default/examples/ink_contracts/erc20.v index c4308a953..630cc7f05 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/erc20.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/erc20.v @@ -393,7 +393,7 @@ Module Impl_erc20_Erc20. ltac:(M.monadic (let total_supply := M.alloc (| total_supply |) in M.read (| - let balances := + let~ balances := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -408,7 +408,7 @@ Module Impl_erc20_Erc20. [] |) |) in - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Env", "caller", [] |), @@ -422,7 +422,7 @@ Module Impl_erc20_Erc20. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -435,7 +435,7 @@ Module Impl_erc20_Erc20. [ balances; M.read (| caller |); M.read (| total_supply |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Env", "emit_event", [] |), @@ -673,14 +673,14 @@ Module Impl_erc20_Erc20. M.catch_return (| ltac:(M.monadic (M.read (| - let from_balance := + let~ from_balance := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Erc20", "balance_of_impl", [] |), [ M.read (| self |); M.read (| from |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -707,7 +707,7 @@ Module Impl_erc20_Erc20. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -724,22 +724,18 @@ Module Impl_erc20_Erc20. "balances" |); M.read (| M.read (| from |) |); - BinOp.Panic.sub (| - Integer.U128, - M.read (| from_balance |), - M.read (| value |) - |) + BinOp.Wrap.sub Integer.U128 (M.read (| from_balance |)) (M.read (| value |)) ] |) |) in - let to_balance := + let~ to_balance := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Erc20", "balance_of_impl", [] |), [ M.read (| self |); M.read (| to |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -756,15 +752,11 @@ Module Impl_erc20_Erc20. "balances" |); M.read (| M.read (| to |) |); - BinOp.Panic.add (| - Integer.U128, - M.read (| to_balance |), - M.read (| value |) - |) + BinOp.Wrap.add Integer.U128 (M.read (| to_balance |)) (M.read (| value |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Env", "emit_event", [] |), @@ -818,7 +810,7 @@ Module Impl_erc20_Erc20. let to := M.alloc (| to |) in let value := M.alloc (| value |) in M.read (| - let from := + let~ from := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Env", "caller", [] |), @@ -864,7 +856,7 @@ Module Impl_erc20_Erc20. let spender := M.alloc (| spender |) in let value := M.alloc (| value |) in M.read (| - let owner := + let~ owner := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Env", "caller", [] |), @@ -878,7 +870,7 @@ Module Impl_erc20_Erc20. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -902,7 +894,7 @@ Module Impl_erc20_Erc20. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Env", "emit_event", [] |), @@ -957,7 +949,7 @@ Module Impl_erc20_Erc20. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Env", "caller", [] |), @@ -971,14 +963,14 @@ Module Impl_erc20_Erc20. ] |) |) in - let allowance := + let~ allowance := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc20::Erc20", "allowance_impl", [] |), [ M.read (| self |); from; caller ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1005,7 +997,7 @@ Module Impl_erc20_Erc20. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1079,7 +1071,7 @@ Module Impl_erc20_Erc20. val)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1099,7 +1091,7 @@ Module Impl_erc20_Erc20. "allowances" |); Value.Tuple [ M.read (| from |); M.read (| caller |) ]; - BinOp.Panic.sub (| Integer.U128, M.read (| allowance |), M.read (| value |) |) + BinOp.Wrap.sub Integer.U128 (M.read (| allowance |)) (M.read (| value |)) ] |) |) in diff --git a/CoqOfRust/examples/default/examples/ink_contracts/erc721.v b/CoqOfRust/examples/default/examples/ink_contracts/erc721.v index cb4dcd11a..546824008 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/erc721.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/erc721.v @@ -428,7 +428,7 @@ Module Impl_core_cmp_PartialEq_for_erc721_Error. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -438,7 +438,7 @@ Module Impl_core_cmp_PartialEq_for_erc721_Error. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -723,7 +723,7 @@ Module Impl_erc721_Erc721. (let self := M.alloc (| self |) in let id := M.alloc (| id |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -838,7 +838,7 @@ Module Impl_erc721_Erc721. let from := M.alloc (| from |) in let id := M.alloc (| id |) in M.read (| - let owner := + let~ owner := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Erc721", "owner_of", [] |), @@ -1102,7 +1102,7 @@ Module Impl_erc721_Erc721. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Env", "caller", [] |), @@ -1116,7 +1116,7 @@ Module Impl_erc721_Erc721. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1152,7 +1152,7 @@ Module Impl_erc721_Erc721. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Env", "emit_event", [] |), @@ -1177,7 +1177,7 @@ Module Impl_erc721_Erc721. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1186,7 +1186,7 @@ Module Impl_erc721_Erc721. (let γ := M.use approved in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1214,7 +1214,7 @@ Module Impl_erc721_Erc721. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1266,7 +1266,7 @@ Module Impl_erc721_Erc721. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1388,7 +1388,7 @@ Module Impl_erc721_Erc721. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Env", "caller", [] |), @@ -1402,14 +1402,14 @@ Module Impl_erc721_Erc721. ] |) |) in - let owner := + let~ owner := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Erc721", "owner_of", [] |), [ M.read (| self |); M.read (| id |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1486,7 +1486,7 @@ Module Impl_erc721_Erc721. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1536,7 +1536,7 @@ Module Impl_erc721_Erc721. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1578,7 +1578,7 @@ Module Impl_erc721_Erc721. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1602,7 +1602,7 @@ Module Impl_erc721_Erc721. M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Env", "emit_event", [] |), @@ -1651,7 +1651,7 @@ Module Impl_erc721_Erc721. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1785,7 +1785,7 @@ Module Impl_erc721_Erc721. |) in let token_owner := M.alloc (| γ1_0 |) in let owned_tokens_count := M.alloc (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1825,7 +1825,7 @@ Module Impl_erc721_Erc721. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let count := + let~ count := M.copy (| M.match_operator (| M.alloc (| @@ -1882,13 +1882,12 @@ Module Impl_erc721_Erc721. fun γ => ltac:(M.monadic (let c := M.copy (| γ |) in - BinOp.Panic.sub (| - Integer.U32, - M.read (| c |), - M.read (| + BinOp.Wrap.sub + Integer.U32 + (M.read (| c |)) + (M.read (| M.use (M.alloc (| Value.Integer 1 |)) - |) - |))) + |)))) ] |) | _ => M.impossible (||) @@ -1951,7 +1950,7 @@ Module Impl_erc721_Erc721. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1968,7 +1967,7 @@ Module Impl_erc721_Erc721. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2072,7 +2071,7 @@ Module Impl_erc721_Erc721. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Env", "caller", [] |), @@ -2086,7 +2085,7 @@ Module Impl_erc721_Erc721. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2190,7 +2189,7 @@ Module Impl_erc721_Erc721. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2294,7 +2293,7 @@ Module Impl_erc721_Erc721. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Env", "caller", [] |), @@ -2308,7 +2307,7 @@ Module Impl_erc721_Erc721. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2382,7 +2381,7 @@ Module Impl_erc721_Erc721. val)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "erc721::Env", "emit_event", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/flipper.v b/CoqOfRust/examples/default/examples/ink_contracts/flipper.v index 9858b2e83..7ee44f60e 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/flipper.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/flipper.v @@ -61,7 +61,7 @@ Module Impl_flipper_Flipper. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v b/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v index f5aa6fd4d..681c2116e 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/incrementer.v @@ -62,14 +62,14 @@ Module Impl_incrementer_Incrementer. (let self := M.alloc (| self |) in let by_ := M.alloc (| by_ |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "incrementer::Incrementer", "value" |) in - M.write (| β, BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| by_ |) |) |) in + M.write (| β, BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| by_ |)) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder.v b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder.v index 61ad9efe0..3c53b135a 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/call_builder.v @@ -191,7 +191,7 @@ Module Impl_call_builder_CallBuilderTest. let address := M.alloc (| address |) in let selector := M.alloc (| selector |) in M.read (| - let result := + let~ result := M.alloc (| M.never_to_any (| M.call_closure (| @@ -213,6 +213,8 @@ Module Impl_call_builder_CallBuilderTest. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "call_builder::LangError::CouldNotReadInput" |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| e |) ] |))); fun γ => ltac:(M.monadic diff --git a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v index de8dd7e5b..7e0777bd3 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/constructors_return_value.v @@ -341,7 +341,7 @@ Module Impl_constructors_return_value_ConstructorsReturnValue. ltac:(M.monadic (let init_value := M.alloc (| init_value |) in M.read (| - let value := + let~ value := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/contract_ref.v b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/contract_ref.v index a36b07aa5..1a601ec06 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/contract_ref.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/contract_ref.v @@ -250,7 +250,7 @@ Module Impl_contract_ref_FlipperRef. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -325,14 +325,14 @@ Module Impl_contract_ref_ContractRef. (let version := M.alloc (| version |) in let flipper_code_hash := M.alloc (| flipper_code_hash |) in M.read (| - let salt := + let~ salt := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "to_le_bytes", [] |), [ M.read (| version |) ] |) |) in - let flipper := + let~ flipper := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -378,14 +378,14 @@ Module Impl_contract_ref_ContractRef. let flipper_code_hash := M.alloc (| flipper_code_hash |) in let succeed := M.alloc (| succeed |) in M.read (| - let salt := + let~ salt := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u32", "to_le_bytes", [] |), [ M.read (| version |) ] |) |) in - let flipper := + let~ flipper := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -427,7 +427,7 @@ Module Impl_contract_ref_ContractRef. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "contract_ref::FlipperRef", "flip", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v index 3700ef60c..8ace5b5c2 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/lang_err_integration_tests/integration_flipper.v @@ -144,7 +144,7 @@ Module Impl_integration_flipper_Flipper. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -201,7 +201,7 @@ Module Impl_integration_flipper_Flipper. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "integration_flipper::Flipper", "flip", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/mapping_integration_tests.v b/CoqOfRust/examples/default/examples/ink_contracts/mapping_integration_tests.v index be5ad62e7..a107eca03 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/mapping_integration_tests.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/mapping_integration_tests.v @@ -325,7 +325,7 @@ Module Impl_mapping_integration_tests_Mappings. | [], [] => ltac:(M.monadic (M.read (| - let balances := + let~ balances := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -363,7 +363,7 @@ Module Impl_mapping_integration_tests_Mappings. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -423,7 +423,7 @@ Module Impl_mapping_integration_tests_Mappings. (let self := M.alloc (| self |) in let value := M.alloc (| value |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -484,7 +484,7 @@ Module Impl_mapping_integration_tests_Mappings. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -543,7 +543,7 @@ Module Impl_mapping_integration_tests_Mappings. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -603,7 +603,7 @@ Module Impl_mapping_integration_tests_Mappings. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -625,7 +625,7 @@ Module Impl_mapping_integration_tests_Mappings. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -665,7 +665,7 @@ Module Impl_mapping_integration_tests_Mappings. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/ink_contracts/mother.v b/CoqOfRust/examples/default/examples/ink_contracts/mother.v index 48e207863..0d0b1afa2 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/mother.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/mother.v @@ -511,7 +511,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Outline. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -521,7 +521,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Outline. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -593,14 +593,17 @@ Module Impl_core_clone_Clone_for_mother_Outline. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "mother::Outline::NoWinner" |) in M.alloc (| Value.StructTuple "mother::Outline::NoWinner" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "mother::Outline::WinnerDetected" |) in M.alloc (| Value.StructTuple "mother::Outline::WinnerDetected" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "mother::Outline::PayoutCompleted" |) in M.alloc (| Value.StructTuple "mother::Outline::PayoutCompleted" [] |))) ] |) @@ -673,7 +676,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Status. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -683,7 +686,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Status. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -862,10 +865,12 @@ Module Impl_core_clone_Clone_for_mother_Status. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "mother::Status::NotStarted" |) in M.alloc (| Value.StructTuple "mother::Status::NotStarted" [] |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "mother::Status::OpeningPeriod" |) in M.alloc (| Value.StructTuple "mother::Status::OpeningPeriod" [] |))); fun γ => ltac:(M.monadic @@ -1524,7 +1529,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Failure. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1534,7 +1539,7 @@ Module Impl_core_cmp_PartialEq_for_mother_Failure. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1926,7 +1931,7 @@ Module Impl_mother_Mother. (let self := M.alloc (| self |) in let auction := M.alloc (| auction |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "mother::Env", "emit_event", [] |), @@ -2019,6 +2024,7 @@ Module Impl_mother_Mother. ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "mother::Failure::Panic" |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -2032,7 +2038,8 @@ Module Impl_mother_Mother. |))); fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |))) + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Ok" [ Value.Tuple [] ] |))) ] |) |))) @@ -2054,8 +2061,8 @@ Module Impl_mother_Mother. (let self := M.alloc (| self |) in let _message := M.alloc (| _message |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/multisig.v b/CoqOfRust/examples/default/examples/ink_contracts/multisig.v index 225c304e4..9ad576523 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/multisig.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/multisig.v @@ -1033,7 +1033,7 @@ Definition ensure_requirement_is_valid (τ : list Ty.t) (α : list Value.t) : M (let owners := M.alloc (| owners |) in let requirement := M.alloc (| requirement |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1135,7 +1135,7 @@ Module Impl_multisig_Multisig. (let requirement := M.alloc (| requirement |) in let owners := M.alloc (| owners |) in M.read (| - let contract := + let~ contract := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1148,7 +1148,7 @@ Module Impl_multisig_Multisig. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1172,7 +1172,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1185,7 +1185,7 @@ Module Impl_multisig_Multisig. [ owners ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "multisig::ensure_requirement_is_valid", [] |), @@ -1205,7 +1205,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -1232,7 +1232,7 @@ Module Impl_multisig_Multisig. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1251,7 +1251,9 @@ Module Impl_multisig_Multisig. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -1261,7 +1263,7 @@ Module Impl_multisig_Multisig. 0 |) in let owner := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1289,12 +1291,12 @@ Module Impl_multisig_Multisig. |))) ] |)) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| contract, "multisig::Multisig", "owners" |), M.read (| owners |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| contract, @@ -1312,7 +1314,7 @@ Module Impl_multisig_Multisig. [] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| contract, @@ -1345,7 +1347,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let trans_id := M.alloc (| trans_id |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1431,7 +1433,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let trans_id := M.alloc (| trans_id |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1481,7 +1483,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let owner := M.alloc (| owner |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1543,7 +1545,7 @@ Module Impl_multisig_Multisig. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Multisig", "ensure_owner", [] |), @@ -1584,7 +1586,7 @@ Module Impl_multisig_Multisig. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -1657,7 +1659,7 @@ Module Impl_multisig_Multisig. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -1706,7 +1708,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let owner := M.alloc (| owner |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1777,7 +1779,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let new_owner := M.alloc (| new_owner |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1788,21 +1790,21 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Multisig", "ensure_no_owner", [] |), [ M.read (| self |); new_owner ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "multisig::ensure_requirement_is_valid", [] |), [ - BinOp.Panic.add (| - Integer.U32, - M.rust_cast + BinOp.Wrap.add + Integer.U32 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply @@ -1818,9 +1820,8 @@ Module Impl_multisig_Multisig. "owners" |) ] - |)), - Value.Integer 1 - |); + |))) + (Value.Integer 1); M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1831,7 +1832,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1852,7 +1853,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1872,7 +1873,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -2059,7 +2060,7 @@ Module Impl_multisig_Multisig. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2076,7 +2077,9 @@ Module Impl_multisig_Multisig. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -2086,7 +2089,7 @@ Module Impl_multisig_Multisig. 0 |) in let trans_id := M.copy (| γ0_0 |) in - let key := + let~ key := M.alloc (| Value.Tuple [ @@ -2132,7 +2135,7 @@ Module Impl_multisig_Multisig. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2159,7 +2162,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let count := + let~ count := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2191,17 +2194,16 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := let β := count in M.write (| β, - BinOp.Panic.sub (| - Integer.U32, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (M.read (| β |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2262,7 +2264,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let owner := M.alloc (| owner |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2273,18 +2275,18 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Multisig", "ensure_owner", [] |), [ M.read (| self |); owner ] |) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - M.rust_cast + BinOp.Wrap.sub + Integer.U32 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply @@ -2300,11 +2302,10 @@ Module Impl_multisig_Multisig. "owners" |) ] - |)), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in - let requirement := + let~ requirement := M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "u32", [], "min", [] |), @@ -2320,14 +2321,14 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "multisig::ensure_requirement_is_valid", [] |), [ M.read (| len |); M.read (| requirement |) ] |) |) in - let owner_index := + let~ owner_index := M.alloc (| M.rust_cast (M.call_closure (| @@ -2335,7 +2336,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |); owner ] |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2355,7 +2356,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2375,7 +2376,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2384,7 +2385,7 @@ Module Impl_multisig_Multisig. |), M.read (| requirement |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2395,7 +2396,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |); owner ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -2444,7 +2445,7 @@ Module Impl_multisig_Multisig. let old_owner := M.alloc (| old_owner |) in let new_owner := M.alloc (| new_owner |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2455,28 +2456,28 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Multisig", "ensure_owner", [] |), [ M.read (| self |); old_owner ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Multisig", "ensure_no_owner", [] |), [ M.read (| self |); new_owner ] |) |) in - let owner_index := + let~ owner_index := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Multisig", "owner_index", [] |), [ M.read (| self |); old_owner ] |) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_trait_method (| @@ -2499,7 +2500,7 @@ Module Impl_multisig_Multisig. |), M.read (| new_owner |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2519,7 +2520,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2540,7 +2541,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2551,7 +2552,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |); old_owner ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -2572,7 +2573,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -2619,7 +2620,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let new_requirement := M.alloc (| new_requirement |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2630,7 +2631,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "multisig::ensure_requirement_is_valid", [] |), @@ -2656,7 +2657,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2665,7 +2666,7 @@ Module Impl_multisig_Multisig. |), M.read (| new_requirement |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -2736,7 +2737,7 @@ Module Impl_multisig_Multisig. let confirmer := M.alloc (| confirmer |) in let transaction := M.alloc (| transaction |) in M.read (| - let count := + let~ count := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2764,9 +2765,9 @@ Module Impl_multisig_Multisig. ] |) |) in - let key := + let~ key := M.alloc (| Value.Tuple [ M.read (| transaction |); M.read (| confirmer |) ] |) in - let new_confirmation := + let~ new_confirmation := M.alloc (| UnOp.Pure.not (M.call_closure (| @@ -2787,7 +2788,7 @@ Module Impl_multisig_Multisig. ] |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2795,13 +2796,13 @@ Module Impl_multisig_Multisig. ltac:(M.monadic (let γ := M.use new_confirmation in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := count in M.write (| β, - BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2825,7 +2826,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2848,7 +2849,7 @@ Module Impl_multisig_Multisig. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let status := + let~ status := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2878,23 +2879,22 @@ Module Impl_multisig_Multisig. Value.StructTuple "multisig::ConfirmationStatus::ConfirmationsNeeded" [ - BinOp.Panic.sub (| - Integer.U32, - M.read (| + BinOp.Wrap.sub + Integer.U32 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "multisig::Multisig", "requirement" |) - |), - M.read (| count |) - |) + |)) + (M.read (| count |)) ] |))) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2902,7 +2902,7 @@ Module Impl_multisig_Multisig. ltac:(M.monadic (let γ := M.use new_confirmation in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -2971,7 +2971,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let transaction := M.alloc (| transaction |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2982,7 +2982,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |) in - let trans_id := + let~ trans_id := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2994,7 +2994,7 @@ Module Impl_multisig_Multisig. "next_id" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -3020,7 +3020,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3041,7 +3041,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3065,7 +3065,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -3148,7 +3148,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let trans_id := M.alloc (| trans_id |) in M.read (| - let transaction := + let~ transaction := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3168,7 +3168,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3189,7 +3189,7 @@ Module Impl_multisig_Multisig. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3209,7 +3209,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let pos := + let~ pos := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3298,7 +3298,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3322,7 +3322,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -3376,7 +3376,7 @@ Module Impl_multisig_Multisig. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3395,7 +3395,12 @@ Module Impl_multisig_Multisig. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -3407,7 +3412,7 @@ Module Impl_multisig_Multisig. 0 |) in let owner := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3445,7 +3450,7 @@ Module Impl_multisig_Multisig. |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3492,7 +3497,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let trans_id := M.alloc (| trans_id |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3534,7 +3539,7 @@ Module Impl_multisig_Multisig. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -3584,7 +3589,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let trans_id := M.alloc (| trans_id |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3595,7 +3600,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3660,7 +3665,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let trans_id := M.alloc (| trans_id |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3671,7 +3676,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |) ] |) |) in - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "caller", [] |), @@ -3715,7 +3720,7 @@ Module Impl_multisig_Multisig. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3736,7 +3741,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let confirmation_count := + let~ confirmation_count := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3769,13 +3774,13 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := let β := confirmation_count in M.write (| β, - BinOp.Panic.sub (| Integer.U32, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3794,7 +3799,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), @@ -3867,7 +3872,7 @@ Module Impl_multisig_Multisig. (let self := M.alloc (| self |) in let trans_id := M.alloc (| trans_id |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3878,7 +3883,7 @@ Module Impl_multisig_Multisig. [ M.read (| self |); M.read (| trans_id |) ] |) |) in - let t := + let~ t := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3899,7 +3904,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3954,7 +3959,7 @@ Module Impl_multisig_Multisig. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let result := + let~ result := M.alloc (| M.never_to_any (| M.call_closure (| @@ -3963,7 +3968,7 @@ Module Impl_multisig_Multisig. |) |) |) in - let result := + let~ result := M.copy (| M.match_operator (| result, @@ -3995,7 +4000,7 @@ Module Impl_multisig_Multisig. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "multisig::Env", "emit_event", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v b/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v index 7adf2e520..7a0a97b62 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/payment_channel.v @@ -258,7 +258,7 @@ Module Impl_core_cmp_PartialEq_for_payment_channel_Error. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -268,7 +268,7 @@ Module Impl_core_cmp_PartialEq_for_payment_channel_Error. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -678,7 +678,7 @@ Module Impl_payment_channel_PaymentChannel. let amount := M.alloc (| amount |) in let signature := M.alloc (| signature |) in M.read (| - let encodable := + let~ encodable := M.alloc (| Value.Tuple [ @@ -704,7 +704,7 @@ Module Impl_payment_channel_PaymentChannel. M.read (| amount |) ] |) in - let message := + let~ message := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -717,7 +717,7 @@ Module Impl_payment_channel_PaymentChannel. [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -730,8 +730,8 @@ Module Impl_payment_channel_PaymentChannel. [ encodable; message ] |) |) in - let pub_key := M.alloc (| repeat (Value.Integer 0) 33 |) in - let _ := + let~ pub_key := M.alloc (| repeat (Value.Integer 0) 33 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -773,8 +773,8 @@ Module Impl_payment_channel_PaymentChannel. ] |) |) in - let signature_account_id := M.alloc (| repeat (Value.Integer 0) 32 |) in - let _ := + let~ signature_account_id := M.alloc (| repeat (Value.Integer 0) 32 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -902,7 +902,7 @@ Module Impl_payment_channel_PaymentChannel. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -969,7 +969,7 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1008,7 +1008,7 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1044,7 +1044,7 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1096,17 +1096,16 @@ Module Impl_payment_channel_PaymentChannel. "recipient" |) |); - BinOp.Panic.sub (| - Integer.U128, - M.read (| amount |), - M.read (| + BinOp.Wrap.sub + Integer.U128 + (M.read (| amount |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "payment_channel::PaymentChannel", "withdrawn" |) - |) - |) + |)) ] |); M.closure @@ -1206,7 +1205,7 @@ Module Impl_payment_channel_PaymentChannel. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1280,7 +1279,7 @@ Module Impl_payment_channel_PaymentChannel. val)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1345,7 +1344,7 @@ Module Impl_payment_channel_PaymentChannel. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1409,7 +1408,7 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let now := + let~ now := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1431,21 +1430,20 @@ Module Impl_payment_channel_PaymentChannel. ] |) |) in - let expiration := + let~ expiration := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| now |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| now |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "payment_channel::PaymentChannel", "close_duration" |) - |) - |) + |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1484,7 +1482,7 @@ Module Impl_payment_channel_PaymentChannel. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1546,7 +1544,7 @@ Module Impl_payment_channel_PaymentChannel. 0 |) in let expiration := M.copy (| γ0_0 |) in - let now := + let~ now := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1568,7 +1566,7 @@ Module Impl_payment_channel_PaymentChannel. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1602,7 +1600,7 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1636,7 +1634,8 @@ Module Impl_payment_channel_PaymentChannel. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::result::Result::Err" [ Value.StructTuple "payment_channel::Error::NotYetExpired" [] ] @@ -1687,7 +1686,7 @@ Module Impl_payment_channel_PaymentChannel. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1754,7 +1753,7 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1790,7 +1789,7 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1829,21 +1828,20 @@ Module Impl_payment_channel_PaymentChannel. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let amount_to_withdraw := + let~ amount_to_withdraw := M.alloc (| - BinOp.Panic.sub (| - Integer.U128, - M.read (| amount |), - M.read (| + BinOp.Wrap.sub + Integer.U128 + (M.read (| amount |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "payment_channel::PaymentChannel", "withdrawn" |) - |) - |) + |)) |) in - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1852,13 +1850,9 @@ Module Impl_payment_channel_PaymentChannel. |) in M.write (| β, - BinOp.Panic.add (| - Integer.U128, - M.read (| β |), - M.read (| amount_to_withdraw |) - |) + BinOp.Wrap.add Integer.U128 (M.read (| β |)) (M.read (| amount_to_withdraw |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| diff --git a/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash.v b/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash.v index b5f91c9dc..a52b8e115 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash.v @@ -95,16 +95,16 @@ Module Impl_set_code_hash_Incrementer. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "set_code_hash::Incrementer", "count" |) in - M.write (| β, BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 1 |) |) in - let _ := - let _ := + M.write (| β, BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -196,7 +196,7 @@ Module Impl_set_code_hash_Incrementer. (let self := M.alloc (| self |) in let code_hash := M.alloc (| code_hash |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -246,8 +246,8 @@ Module Impl_set_code_hash_Incrementer. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash/updated_incrementer.v b/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash/updated_incrementer.v index 6e7d6deef..f95f832f5 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash/updated_incrementer.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/set_code_hash/updated_incrementer.v @@ -179,16 +179,16 @@ Module Impl_updated_incrementer_Incrementer. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "updated_incrementer::Incrementer", "count" |) in - M.write (| β, BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 4 |) |) in - let _ := - let _ := + M.write (| β, BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 4) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -280,7 +280,7 @@ Module Impl_updated_incrementer_Incrementer. (let self := M.alloc (| self |) in let code_hash := M.alloc (| code_hash |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -344,8 +344,8 @@ Module Impl_updated_incrementer_Incrementer. ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v b/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v index 6c5a8cae7..6c1e42c33 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/trait_erc20.v @@ -202,10 +202,14 @@ Module Impl_core_fmt_Debug_for_trait_erc20_Error. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "trait_erc20::Error::InsufficientBalance" |) in M.alloc (| M.read (| Value.String "InsufficientBalance" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "trait_erc20::Error::InsufficientAllowance" |) in M.alloc (| M.read (| Value.String "InsufficientAllowance" |) |))) ] |) @@ -245,7 +249,7 @@ Module Impl_core_cmp_PartialEq_for_trait_erc20_Error. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -255,7 +259,7 @@ Module Impl_core_cmp_PartialEq_for_trait_erc20_Error. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -533,7 +537,7 @@ Module Impl_trait_erc20_Erc20. ltac:(M.monadic (let total_supply := M.alloc (| total_supply |) in M.read (| - let balances := + let~ balances := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -548,7 +552,7 @@ Module Impl_trait_erc20_Erc20. [] |) |) in - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "trait_erc20::Env", "caller", [] |), @@ -562,7 +566,7 @@ Module Impl_trait_erc20_Erc20. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -575,7 +579,7 @@ Module Impl_trait_erc20_Erc20. [ balances; M.read (| caller |); M.read (| total_supply |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "trait_erc20::Env", "emit_event", [] |), @@ -753,7 +757,7 @@ Module Impl_trait_erc20_Erc20. M.catch_return (| ltac:(M.monadic (M.read (| - let from_balance := + let~ from_balance := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -764,7 +768,7 @@ Module Impl_trait_erc20_Erc20. [ M.read (| self |); M.read (| from |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -791,7 +795,7 @@ Module Impl_trait_erc20_Erc20. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -808,15 +812,11 @@ Module Impl_trait_erc20_Erc20. "balances" |); M.read (| M.read (| from |) |); - BinOp.Panic.sub (| - Integer.U128, - M.read (| from_balance |), - M.read (| value |) - |) + BinOp.Wrap.sub Integer.U128 (M.read (| from_balance |)) (M.read (| value |)) ] |) |) in - let to_balance := + let~ to_balance := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -827,7 +827,7 @@ Module Impl_trait_erc20_Erc20. [ M.read (| self |); M.read (| to |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -844,15 +844,11 @@ Module Impl_trait_erc20_Erc20. "balances" |); M.read (| M.read (| to |) |); - BinOp.Panic.add (| - Integer.U128, - M.read (| to_balance |), - M.read (| value |) - |) + BinOp.Wrap.add Integer.U128 (M.read (| to_balance |)) (M.read (| value |)) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "trait_erc20::Env", "emit_event", [] |), @@ -967,7 +963,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. let to := M.alloc (| to |) in let value := M.alloc (| value |) in M.read (| - let from := + let~ from := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "trait_erc20::Env", "caller", [] |), @@ -1011,7 +1007,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. let spender := M.alloc (| spender |) in let value := M.alloc (| value |) in M.read (| - let owner := + let~ owner := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "trait_erc20::Env", "caller", [] |), @@ -1025,7 +1021,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1050,7 +1046,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "trait_erc20::Env", "emit_event", [] |), @@ -1103,7 +1099,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. M.catch_return (| ltac:(M.monadic (M.read (| - let caller := + let~ caller := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "trait_erc20::Env", "caller", [] |), @@ -1117,7 +1113,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. ] |) |) in - let allowance := + let~ allowance := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1128,7 +1124,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. [ M.read (| self |); from; caller ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1156,7 +1152,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1230,7 +1226,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. val)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1251,7 +1247,7 @@ Module Impl_trait_erc20_BaseErc20_for_trait_erc20_Erc20. "allowances" |); Value.Tuple [ M.read (| from |); M.read (| caller |) ]; - BinOp.Panic.sub (| Integer.U128, M.read (| allowance |), M.read (| value |) |) + BinOp.Wrap.sub Integer.U128 (M.read (| allowance |)) (M.read (| value |)) ] |) |) in diff --git a/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v b/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v index d11789f57..38453596e 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/trait_flipper.v @@ -60,7 +60,7 @@ Module Impl_trait_flipper_Flip_for_trait_flipper_Flipper. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v b/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v index bbe6d61ad..b2441a214 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/trait_incrementer.v @@ -45,17 +45,14 @@ Module Impl_trait_incrementer_Incrementer. (let self := M.alloc (| self |) in let delta := M.alloc (| delta |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "trait_incrementer::Incrementer", "value" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.U64, M.read (| β |), M.read (| delta |) |) - |) in + M.write (| β, BinOp.Wrap.add Integer.U64 (M.read (| β |)) (M.read (| delta |)) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -126,7 +123,7 @@ Module Impl_trait_incrementer_Reset_for_trait_incrementer_Incrementer. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v b/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v index ca9f31676..2592466f2 100644 --- a/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v +++ b/CoqOfRust/examples/default/examples/ink_contracts/wildcard_selector.v @@ -86,8 +86,8 @@ Module Impl_wildcard_selector_WildcardSelector. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let _selector := M.copy (| γ0_0 |) in let _message := M.copy (| γ0_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -160,8 +160,8 @@ Module Impl_wildcard_selector_WildcardSelector. (let self := M.alloc (| self |) in let _message := M.alloc (| _message |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example01.v b/CoqOfRust/examples/default/examples/monadic_transformation/example01.v index d118cf889..f82ef6bf9 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example01.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example01.v @@ -45,18 +45,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "example01::id", [] |), [ Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "example01::id", [] |), [ M.call_closure (| M.get_function (| "example01::id", [] |), [ Value.Integer 0 ] |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "example01::id", [] |), @@ -73,7 +73,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "example01::id", [] |), @@ -95,7 +95,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "example01::tri", [] |), diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example02.v b/CoqOfRust/examples/default/examples/monadic_transformation/example02.v index 422d8d9f0..eba156ea5 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example02.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example02.v @@ -28,7 +28,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Integer 1 |), [ @@ -39,7 +39,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -51,7 +51,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 1 |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example03.v b/CoqOfRust/examples/default/examples/monadic_transformation/example03.v index 6af14b3e3..e4263a524 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example03.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example03.v @@ -12,11 +12,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| Value.Tuple [ Value.Integer 1; Value.Integer 2; Value.Integer 3; Value.Integer 4 ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example04.v b/CoqOfRust/examples/default/examples/monadic_transformation/example04.v index 6b0dc2203..2786197a6 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example04.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example04.v @@ -11,7 +11,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| M.alloc (| Value.Integer 1 |) |) in + let~ x := M.alloc (| M.alloc (| Value.Integer 1 |) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/monadic_transformation/example05.v b/CoqOfRust/examples/default/examples/monadic_transformation/example05.v index 87b73fcd5..82a9369cd 100644 --- a/CoqOfRust/examples/default/examples/monadic_transformation/example05.v +++ b/CoqOfRust/examples/default/examples/monadic_transformation/example05.v @@ -21,11 +21,10 @@ Module Impl_example05_Foo. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.add (| - Integer.U32, - M.read (| M.SubPointer.get_struct_tuple_field (| self, "example05::Foo", 0 |) |), - Value.Integer 1 - |))) + BinOp.Wrap.add + Integer.U32 + (M.read (| M.SubPointer.get_struct_tuple_field (| self, "example05::Foo", 0 |) |)) + (Value.Integer 1))) | _, _ => M.impossible end. @@ -43,8 +42,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let foo := M.alloc (| Value.StructTuple "example05::Foo" [ Value.Integer 0 ] |) in - let _ := + let~ foo := M.alloc (| Value.StructTuple "example05::Foo" [ Value.Integer 0 ] |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "example05::Foo", "plus1", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/attributes/dead_code.v b/CoqOfRust/examples/default/examples/rust_book/attributes/dead_code.v index 539045b08..d07ea77c3 100644 --- a/CoqOfRust/examples/default/examples/rust_book/attributes/dead_code.v +++ b/CoqOfRust/examples/default/examples/rust_book/attributes/dead_code.v @@ -30,7 +30,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "dead_code::used_function", [] |), [] |) |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/cargo/concurrent_tests.v b/CoqOfRust/examples/default/examples/rust_book/cargo/concurrent_tests.v index 462425cc4..d38f31dc6 100644 --- a/CoqOfRust/examples/default/examples/rust_book/cargo/concurrent_tests.v +++ b/CoqOfRust/examples/default/examples/rust_book/cargo/concurrent_tests.v @@ -23,7 +23,7 @@ Definition foo (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let _a := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -47,7 +47,8 @@ Definition foo (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -99,7 +100,7 @@ Module tests. | [], [] => ltac:(M.monadic (M.read (| - let file := + let~ file := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -178,7 +179,7 @@ Module tests. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -195,7 +196,9 @@ Module tests. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -204,7 +207,7 @@ Module tests. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -274,7 +277,7 @@ Module tests. | [], [] => ltac:(M.monadic (M.read (| - let file := + let~ file := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -353,7 +356,7 @@ Module tests. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -370,7 +373,9 @@ Module tests. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -379,7 +384,7 @@ Module tests. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/conversion/converting_to_string.v b/CoqOfRust/examples/default/examples/rust_book/conversion/converting_to_string.v index 38ddbb770..f7302925d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/conversion/converting_to_string.v +++ b/CoqOfRust/examples/default/examples/rust_book/conversion/converting_to_string.v @@ -79,11 +79,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let circle := + let~ circle := M.alloc (| Value.StructRecord "converting_to_string::Circle" [ ("radius", Value.Integer 6) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/conversion/from.v b/CoqOfRust/examples/default/examples/rust_book/conversion/from.v index 3dedfe26c..25f3763d0 100644 --- a/CoqOfRust/examples/default/examples/rust_book/conversion/from.v +++ b/CoqOfRust/examples/default/examples/rust_book/conversion/from.v @@ -43,7 +43,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/conversion/into.v b/CoqOfRust/examples/default/examples/rust_book/conversion/into.v index 0566f14dc..6d5aaaa8e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/conversion/into.v +++ b/CoqOfRust/examples/default/examples/rust_book/conversion/into.v @@ -43,7 +43,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/conversion/parsing_a_string.v b/CoqOfRust/examples/default/examples/rust_book/conversion/parsing_a_string.v index 111b15c88..0ad77c01b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/conversion/parsing_a_string.v +++ b/CoqOfRust/examples/default/examples/rust_book/conversion/parsing_a_string.v @@ -13,21 +13,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "i32" ] |), [ M.read (| Value.String "12" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "bool" ] |), [ M.read (| Value.String "true" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "parse", [ Ty.path "u32" ] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/conversion/try_from_and_try_into.v b/CoqOfRust/examples/default/examples/rust_book/conversion/try_from_and_try_into.v index fa0660a77..5c3f14a0e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/conversion/try_from_and_try_into.v +++ b/CoqOfRust/examples/default/examples/rust_book/conversion/try_from_and_try_into.v @@ -126,7 +126,7 @@ Module Impl_core_convert_TryFrom_i32_for_try_from_and_try_into_EvenNumber. M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.I32, M.read (| value |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.I32 (M.read (| value |)) (Value.Integer 2)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in @@ -174,7 +174,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -238,7 +238,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -273,7 +273,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -333,7 +333,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -368,7 +368,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -381,7 +381,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 8 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -434,7 +434,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -469,7 +469,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -482,7 +482,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 5 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -531,7 +531,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/constants.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/constants.v index d4fb30869..c6103de9f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/constants.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/constants.v @@ -41,9 +41,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let n := M.alloc (| Value.Integer 16 |) in - let _ := - let _ := + let~ n := M.alloc (| Value.Integer 16 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -79,8 +79,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -119,8 +119,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums.v index 354e16626..bd7f5ccac 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums.v @@ -62,7 +62,8 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "enums::WebEvent::PageLoad" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -96,7 +97,8 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "enums::WebEvent::PageUnload" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -125,7 +127,7 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "enums::WebEvent::KeyPress", 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -173,7 +175,7 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "enums::WebEvent::Paste", 0 |) in let s := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -224,8 +226,8 @@ Definition inspect (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_record_field (| γ, "enums::WebEvent::Click", "y" |) in let x := M.copy (| γ0_0 |) in let y := M.copy (| γ0_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -307,9 +309,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let pressed := + let~ pressed := M.alloc (| Value.StructTuple "enums::WebEvent::KeyPress" [ Value.UnicodeChar 120 ] |) in - let pasted := + let~ pasted := M.alloc (| Value.StructTuple "enums::WebEvent::Paste" @@ -326,31 +328,31 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) ] |) in - let click := + let~ click := M.alloc (| Value.StructRecord "enums::WebEvent::Click" [ ("x", Value.Integer 20); ("y", Value.Integer 80) ] |) in - let load := M.alloc (| Value.StructTuple "enums::WebEvent::PageLoad" [] |) in - let unload := M.alloc (| Value.StructTuple "enums::WebEvent::PageUnload" [] |) in - let _ := + let~ load := M.alloc (| Value.StructTuple "enums::WebEvent::PageLoad" [] |) in + let~ unload := M.alloc (| Value.StructTuple "enums::WebEvent::PageUnload" [] |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "enums::inspect", [] |), [ M.read (| pressed |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "enums::inspect", [] |), [ M.read (| pasted |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "enums::inspect", [] |), [ M.read (| click |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "enums::inspect", [] |), [ M.read (| load |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "enums::inspect", [] |), [ M.read (| unload |) ] |) |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_c_like.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_c_like.v index 613d16804..8feb4b5b3 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_c_like.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_c_like.v @@ -66,8 +66,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -103,8 +103,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -140,8 +140,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -175,13 +175,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.Isize, - M.get_constant (| + (BinOp.Wrap.add + Integer.Isize + (M.get_constant (| "enums_c_like::Color::Red_discriminant" - |), - Value.Integer 0 - |)) + |)) + (Value.Integer 0)) |) ] |) @@ -223,8 +222,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -260,13 +259,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.Isize, - M.get_constant (| + (BinOp.Wrap.add + Integer.Isize + (M.get_constant (| "enums_c_like::Color::Blue_discriminant" - |), - Value.Integer 0 - |)) + |)) + (Value.Integer 0)) |) ] |) diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_testcase_linked_list.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_testcase_linked_list.v index 4fd8f2c1f..6189ca013 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_testcase_linked_list.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_testcase_linked_list.v @@ -120,20 +120,22 @@ Module Impl_enums_testcase_linked_list_List. |) in let tail := M.alloc (| γ0_1 |) in M.alloc (| - BinOp.Panic.add (| - Integer.U32, - Value.Integer 1, - M.call_closure (| + BinOp.Wrap.add + Integer.U32 + (Value.Integer 1) + (M.call_closure (| M.get_associated_function (| Ty.path "enums_testcase_linked_list::List", "len", [] |), [ M.read (| M.read (| tail |) |) ] - |) - |) + |)) |))); - fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 0 |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "enums_testcase_linked_list::List::Nil" |) in + M.alloc (| Value.Integer 0 |))) ] |) |))) @@ -181,7 +183,7 @@ Module Impl_enums_testcase_linked_list_List. |) in let head := M.copy (| γ0_0 |) in let tail := M.alloc (| γ0_1 |) in - let res := + let~ res := M.alloc (| M.call_closure (| M.get_function (| "alloc::fmt::format", [] |), @@ -241,7 +243,8 @@ Module Impl_enums_testcase_linked_list_List. res)); fun γ => ltac:(M.monadic - (let res := + (let _ := M.is_struct_tuple (| γ, "enums_testcase_linked_list::List::Nil" |) in + let~ res := M.alloc (| M.call_closure (| M.get_function (| "alloc::fmt::format", [] |), @@ -291,14 +294,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let list := + let~ list := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "enums_testcase_linked_list::List", "new", [] |), [] |) |) in - let _ := + let~ _ := M.write (| list, M.call_closure (| @@ -310,7 +313,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| list |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| list, M.call_closure (| @@ -322,7 +325,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| list |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.write (| list, M.call_closure (| @@ -334,8 +337,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| list |); Value.Integer 3 ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -385,8 +388,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v1.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v1.v index c1ad952d5..70ab01aa5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v1.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v1.v @@ -37,7 +37,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := + let~ x := M.alloc (| Value.StructTuple "enums_type_aliases_v1::VeryVerboseEnumOfThingsToDoWithNumbers::Add" diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v2.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v2.v index abb1aa18c..303bde32c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v2.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_type_aliases_v2.v @@ -46,11 +46,21 @@ Module Impl_enums_type_aliases_v2_VeryVerboseEnumOfThingsToDoWithNumbers. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| BinOp.Panic.add (| Integer.I32, M.read (| x |), M.read (| y |) |) |))); + let _ := + M.is_struct_tuple (| + γ, + "enums_type_aliases_v2::VeryVerboseEnumOfThingsToDoWithNumbers::Add" + |) in + M.alloc (| BinOp.Wrap.add Integer.I32 (M.read (| x |)) (M.read (| y |)) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in - M.alloc (| BinOp.Panic.sub (| Integer.I32, M.read (| x |), M.read (| y |) |) |))) + let _ := + M.is_struct_tuple (| + γ, + "enums_type_aliases_v2::VeryVerboseEnumOfThingsToDoWithNumbers::Subtract" + |) in + M.alloc (| BinOp.Wrap.sub Integer.I32 (M.read (| x |)) (M.read (| y |)) |))) ] |) |))) diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_use.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_use.v index c6dc178ac..5623e3cae 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_use.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/enums_use.v @@ -66,15 +66,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let status := M.alloc (| Value.StructTuple "enums_use::Status::Poor" [] |) in - let work := M.alloc (| Value.StructTuple "enums_use::Work::Civilian" [] |) in - let _ := + let~ status := M.alloc (| Value.StructTuple "enums_use::Status::Poor" [] |) in + let~ work := M.alloc (| Value.StructTuple "enums_use::Work::Civilian" [] |) in + let~ _ := M.match_operator (| status, [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "enums_use::Status::Rich" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -101,7 +102,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "enums_use::Status::Poor" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -133,7 +135,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "enums_use::Work::Civilian" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -159,7 +162,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "enums_use::Work::Soldier" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/custom_types/structures.v b/CoqOfRust/examples/default/examples/rust_book/custom_types/structures.v index cee90292f..9e5d20b69 100644 --- a/CoqOfRust/examples/default/examples/rust_book/custom_types/structures.v +++ b/CoqOfRust/examples/default/examples/rust_book/custom_types/structures.v @@ -146,7 +146,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let name := + let~ name := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -159,15 +159,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| Value.String "Peter" |) ] |) |) in - let age := M.alloc (| Value.Integer 27 |) in - let peter := + let~ age := M.alloc (| Value.Integer 27 |) in + let~ peter := M.alloc (| Value.StructRecord "structures::Person" [ ("name", M.read (| name |)); ("age", M.read (| age |)) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -203,14 +203,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let point := + let~ point := M.alloc (| Value.StructRecord "structures::Point" [ ("x", M.read (| UnsupportedLiteral |)); ("y", M.read (| UnsupportedLiteral |)) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -270,12 +270,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let bottom_right := + let~ bottom_right := M.alloc (| M.struct_record_update (M.read (| point |)) [ ("x", M.read (| UnsupportedLiteral |)) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -346,7 +346,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_record_field (| γ, "structures::Point", "y" |) in let left_edge := M.copy (| γ0_0 |) in let top_edge := M.copy (| γ0_1 |) in - let _rectangle := + let~ _rectangle := M.alloc (| Value.StructRecord "structures::Rectangle" @@ -358,15 +358,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("bottom_right", M.read (| bottom_right |)) ] |) in - let _unit := M.alloc (| Value.StructTuple "structures::Unit" [] |) in - let pair_ := + let~ _unit := M.alloc (| Value.StructTuple "structures::Unit" [] |) in + let~ pair_ := M.alloc (| Value.StructTuple "structures::Pair" [ Value.Integer 1; M.read (| UnsupportedLiteral |) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -441,8 +441,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ, "structures::Pair", 1 |) in let integer := M.copy (| γ0_0 |) in let decimal := M.copy (| γ0_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/aliases_for_result.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/aliases_for_result.v index f991bf514..3be17f6d8 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/aliases_for_result.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/aliases_for_result.v @@ -83,11 +83,10 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let second_number := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I32, - M.read (| first_number |), - M.read (| second_number |) - |))) + BinOp.Wrap.mul + Integer.I32 + (M.read (| first_number |)) + (M.read (| second_number |)))) ] |) | _ => M.impossible (||) @@ -127,7 +126,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -173,7 +172,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -235,7 +234,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "aliases_for_result::print", [] |), @@ -247,7 +246,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "aliases_for_result::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/boxing_errors.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/boxing_errors.v index c7bd54a1a..6457c32ab 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/boxing_errors.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/boxing_errors.v @@ -339,11 +339,10 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I32, - Value.Integer 2, - M.read (| i |) - |))) + BinOp.Wrap.mul + Integer.I32 + (Value.Integer 2) + (M.read (| i |)))) ] |) | _ => M.impossible (||) @@ -383,7 +382,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -431,7 +430,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -505,7 +504,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -543,7 +542,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty := + let~ empty := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -556,7 +555,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -594,7 +593,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "boxing_errors::print", [] |), @@ -606,7 +605,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "boxing_errors::print", [] |), @@ -618,7 +617,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "boxing_errors::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_and_then.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_and_then.v index def8b3aca..4dd956ca0 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_and_then.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_and_then.v @@ -47,14 +47,18 @@ Module Impl_core_fmt_Debug_for_combinators_and_then_Food. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "combinators_and_then::Food::CordonBleu" |) in M.alloc (| M.read (| Value.String "CordonBleu" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_and_then::Food::Steak" |) in M.alloc (| M.read (| Value.String "Steak" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_and_then::Food::Sushi" |) in M.alloc (| M.read (| Value.String "Sushi" |) |))) ] |) @@ -118,14 +122,17 @@ Module Impl_core_fmt_Debug_for_combinators_and_then_Day. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_and_then::Day::Monday" |) in M.alloc (| M.read (| Value.String "Monday" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_and_then::Day::Tuesday" |) in M.alloc (| M.read (| Value.String "Tuesday" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_and_then::Day::Wednesday" |) in M.alloc (| M.read (| Value.String "Wednesday" |) |))) ] |) @@ -161,7 +168,9 @@ Definition have_ingredients (τ : list Ty.t) (α : list Value.t) : M := food, [ fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "combinators_and_then::Food::Sushi" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -194,7 +203,9 @@ Definition have_recipe (τ : list Ty.t) (α : list Value.t) : M := food, [ fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "combinators_and_then::Food::CordonBleu" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (M.alloc (| @@ -234,7 +245,9 @@ Definition cookable_v1 (τ : list Ty.t) (α : list Value.t) : M := |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -250,7 +263,8 @@ Definition cookable_v1 (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -335,7 +349,7 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let food := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -389,7 +403,8 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -472,7 +487,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let cordon_bleu := M.copy (| γ0_0 |) in let steak := M.copy (| γ0_1 |) in let sushi := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "combinators_and_then::eat", [] |), @@ -482,7 +497,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "combinators_and_then::eat", [] |), @@ -492,7 +507,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "combinators_and_then::eat", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_map.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_map.v index da0fc7b34..d520ec4d2 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_map.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/combinators_map.v @@ -47,14 +47,17 @@ Module Impl_core_fmt_Debug_for_combinators_map_Food. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_map::Food::Apple" |) in M.alloc (| M.read (| Value.String "Apple" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_map::Food::Carrot" |) in M.alloc (| M.read (| Value.String "Carrot" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "combinators_map::Food::Potato" |) in M.alloc (| M.read (| Value.String "Potato" |) |))) ] |) @@ -244,7 +247,9 @@ Definition peel (τ : list Ty.t) (α : list Value.t) : M := [ Value.StructTuple "combinators_map::Peeled" [ M.read (| food |) ] ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -283,7 +288,9 @@ Definition chop (τ : list Ty.t) (α : list Value.t) : M := [ Value.StructTuple "combinators_map::Chopped" [ M.read (| food |) ] ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -486,7 +493,7 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let food := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -531,7 +538,8 @@ Definition eat (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -585,20 +593,20 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let apple := + let~ apple := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "combinators_map::Food::Apple" [] ] |) in - let carrot := + let~ carrot := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "combinators_map::Food::Carrot" [] ] |) in - let potato := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let cooked_apple := + let~ potato := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ cooked_apple := M.alloc (| M.call_closure (| M.get_function (| "combinators_map::cook", [] |), @@ -615,7 +623,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let cooked_carrot := + let~ cooked_carrot := M.alloc (| M.call_closure (| M.get_function (| "combinators_map::cook", [] |), @@ -632,28 +640,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let cooked_potato := + let~ cooked_potato := M.alloc (| M.call_closure (| M.get_function (| "combinators_map::process", [] |), [ M.read (| potato |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "combinators_map::eat", [] |), [ M.read (| cooked_apple |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "combinators_map::eat", [] |), [ M.read (| cooked_carrot |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "combinators_map::eat", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/defining_an_error_type.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/defining_an_error_type.v index 9b3c31dc8..ec6cdf335 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/defining_an_error_type.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/defining_an_error_type.v @@ -248,11 +248,10 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I32, - Value.Integer 2, - M.read (| i |) - |))) + BinOp.Wrap.mul + Integer.I32 + (Value.Integer 2) + (M.read (| i |)))) ] |) | _ => M.impossible (||) @@ -292,7 +291,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -340,7 +339,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -407,7 +406,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -445,7 +444,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty := + let~ empty := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -458,7 +457,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -496,7 +495,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "defining_an_error_type::print", [] |), @@ -508,7 +507,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "defining_an_error_type::print", [] |), @@ -520,7 +519,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "defining_an_error_type::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/early_returns.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/early_returns.v index d0fceff17..f56c3c0bb 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/early_returns.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/early_returns.v @@ -25,7 +25,7 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let first_number := + let~ first_number := M.copy (| M.match_operator (| M.alloc (| @@ -66,7 +66,7 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let second_number := + let~ second_number := M.copy (| M.match_operator (| M.alloc (| @@ -111,11 +111,10 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := Value.StructTuple "core::result::Result::Ok" [ - BinOp.Panic.mul (| - Integer.I32, - M.read (| first_number |), - M.read (| second_number |) - |) + BinOp.Wrap.mul + Integer.I32 + (M.read (| first_number |)) + (M.read (| second_number |)) ] |) |))) @@ -147,7 +146,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -193,7 +192,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -255,7 +254,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "early_returns::print", [] |), @@ -267,7 +266,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "early_returns::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark.v index 547fcdd93..58707cd54 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark.v @@ -18,7 +18,7 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let first_number := + let~ first_number := M.copy (| M.match_operator (| M.alloc (| @@ -90,7 +90,7 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let second_number := + let~ second_number := M.copy (| M.match_operator (| M.alloc (| @@ -166,11 +166,10 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := Value.StructTuple "core::result::Result::Ok" [ - BinOp.Panic.mul (| - Integer.I32, - M.read (| first_number |), - M.read (| second_number |) - |) + BinOp.Wrap.mul + Integer.I32 + (M.read (| first_number |)) + (M.read (| second_number |)) ] |) |))) @@ -202,7 +201,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -248,7 +247,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -310,7 +309,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "introducing_question_mark::print", [] |), @@ -322,7 +321,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "introducing_question_mark::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v index cb0e18a3e..f706aa77d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/introducing_question_mark_is_an_replacement_for_deprecated_try.v @@ -18,7 +18,7 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let first_number := + let~ first_number := M.copy (| M.match_operator (| M.alloc (| @@ -72,7 +72,7 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let second_number := + let~ second_number := M.copy (| M.match_operator (| M.alloc (| @@ -130,11 +130,10 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := Value.StructTuple "core::result::Result::Ok" [ - BinOp.Panic.mul (| - Integer.I32, - M.read (| first_number |), - M.read (| second_number |) - |) + BinOp.Wrap.mul + Integer.I32 + (M.read (| first_number |)) + (M.read (| second_number |)) ] |) |))) @@ -167,7 +166,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -213,7 +212,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -276,7 +275,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -294,7 +293,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v index c06282308..cd8d9f039 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition.v @@ -17,7 +17,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -172,8 +172,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let numbers := M.copy (| γ0_0 |) in let errors := M.copy (| γ0_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -228,8 +228,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v index b08e0a7ab..5715b1593 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_valid_values_and_failures_via_partition_unwrapped.v @@ -19,7 +19,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -174,7 +174,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let numbers := M.copy (| γ0_0 |) in let errors := M.copy (| γ0_1 |) in - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -261,7 +261,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let errors := + let~ errors := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -351,8 +351,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -399,8 +399,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v index 1a1343f08..4a4624f04 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_collect_via_map_err_and_filter_map.v @@ -19,7 +19,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let errors := + let~ errors := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -72,7 +72,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -290,8 +290,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -331,8 +331,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v index c5a1bdada..ca2b46b6e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_fail_entire_operation_via_collect.v @@ -13,7 +13,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -51,7 +51,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -143,8 +143,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_failed.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_failed.v index eb3031573..ac549b196 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_failed.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_failed.v @@ -13,7 +13,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -51,7 +51,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -143,8 +143,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v index e7fb5fa9a..252e9c538 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/iterating_over_results_handle_via_filter_map.v @@ -16,7 +16,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -54,7 +54,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -147,8 +147,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_combinators.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_combinators.v index 0e4288075..72d47676f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_combinators.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_combinators.v @@ -78,11 +78,10 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let second_number := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I32, - M.read (| first_number |), - M.read (| second_number |) - |))) + BinOp.Wrap.mul + Integer.I32 + (M.read (| first_number |)) + (M.read (| second_number |)))) ] |) | _ => M.impossible (||) @@ -122,7 +121,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -168,7 +167,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -235,28 +234,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let twenty := + let~ twenty := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_combinators::multiply", [] |), [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_combinators::print", [] |), [ M.read (| twenty |) ] |) |) in - let tt_ := + let~ tt_ := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_combinators::multiply", [] |), [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_combinators::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_match.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_match.v index 678f19a1f..824e06456 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_match.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/map_in_result_via_match.v @@ -53,11 +53,10 @@ Definition multiply (τ : list Ty.t) (α : list Value.t) : M := Value.StructTuple "core::result::Result::Ok" [ - BinOp.Panic.mul (| - Integer.I32, - M.read (| first_number |), - M.read (| second_number |) - |) + BinOp.Wrap.mul + Integer.I32 + (M.read (| first_number |)) + (M.read (| second_number |)) ] |))); fun γ => @@ -110,7 +109,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -156,7 +155,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -223,28 +222,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let twenty := + let~ twenty := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_match::multiply", [] |), [ M.read (| Value.String "10" |); M.read (| Value.String "2" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_match::print", [] |), [ M.read (| twenty |) ] |) |) in - let tt_ := + let~ tt_ := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_match::multiply", [] |), [ M.read (| Value.String "t" |); M.read (| Value.String "2" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "map_in_result_via_match::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/multiple_error_types.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/multiple_error_types.v index 7069313ee..3c3d9af00 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/multiple_error_types.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/multiple_error_types.v @@ -13,7 +13,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let vec := M.alloc (| vec |) in M.read (| - let first := + let~ first := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -50,10 +50,10 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| - BinOp.Panic.mul (| - Integer.I32, - Value.Integer 2, - M.call_closure (| + BinOp.Wrap.mul + Integer.I32 + (Value.Integer 2) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "core::result::Result") @@ -67,8 +67,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| M.read (| first |) |) ] |) ] - |) - |) + |)) |) |))) | _, _ => M.impossible @@ -96,7 +95,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -134,7 +133,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty := + let~ empty := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -147,7 +146,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -185,8 +184,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -232,8 +231,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -279,8 +278,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/option_and_unwrap.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/option_and_unwrap.v index 8c85e5a73..c07fa772a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/option_and_unwrap.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/option_and_unwrap.v @@ -26,7 +26,7 @@ Definition give_adult (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.String "lemonade" |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -55,7 +55,7 @@ Definition give_adult (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let inner := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -100,7 +100,8 @@ Definition give_adult (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -149,7 +150,7 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let drink := M.alloc (| drink |) in M.read (| - let inside := + let~ inside := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -162,7 +163,7 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| drink |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -197,8 +198,8 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -266,49 +267,49 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let water := + let~ water := M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| Value.String "water" |) ] |) in - let lemonade := + let~ lemonade := M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| Value.String "lemonade" |) ] |) in - let void := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ void := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "option_and_unwrap::give_adult", [] |), [ M.read (| water |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "option_and_unwrap::give_adult", [] |), [ M.read (| lemonade |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "option_and_unwrap::give_adult", [] |), [ M.read (| void |) ] |) |) in - let coffee := + let~ coffee := M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| Value.String "coffee" |) ] |) in - let nothing := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ nothing := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "option_and_unwrap::drink", [] |), [ M.read (| coffee |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "option_and_unwrap::drink", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/other_uses_of_question_mark.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/other_uses_of_question_mark.v index c1755dfc3..bc922491a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/other_uses_of_question_mark.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/other_uses_of_question_mark.v @@ -108,7 +108,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let first := + let~ first := M.copy (| M.match_operator (| M.alloc (| @@ -226,7 +226,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let parsed := + let~ parsed := M.copy (| M.match_operator (| M.alloc (| @@ -309,7 +309,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.StructTuple "core::result::Result::Ok" - [ BinOp.Panic.mul (| Integer.I32, Value.Integer 2, M.read (| parsed |) |) ] + [ BinOp.Wrap.mul Integer.I32 (Value.Integer 2) (M.read (| parsed |)) ] |) |))) |))) @@ -340,7 +340,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -388,7 +388,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -462,7 +462,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -500,7 +500,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty := + let~ empty := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -513,7 +513,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -551,7 +551,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "other_uses_of_question_mark::print", [] |), @@ -563,7 +563,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "other_uses_of_question_mark::print", [] |), @@ -575,7 +575,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "other_uses_of_question_mark::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/panic.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/panic.v index e87b48317..4f45cb89b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/panic.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/panic.v @@ -17,7 +17,7 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let beverage := M.alloc (| beverage |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -52,8 +52,8 @@ Definition drink (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -110,14 +110,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "panic::drink", [] |), [ M.read (| Value.String "water" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "panic::drink", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options.v index 962ac0806..f3b9c5184 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options.v @@ -92,11 +92,10 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I32, - Value.Integer 2, - M.read (| n |) - |))) + BinOp.Wrap.mul + Integer.I32 + (Value.Integer 2) + (M.read (| n |)))) ] |) | _ => M.impossible (||) @@ -135,7 +134,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -173,7 +172,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty := + let~ empty := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -186,7 +185,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -224,8 +223,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -283,8 +282,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -342,8 +341,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v index 6798bb06b..83afea238 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/pulling_results_out_of_options_with_stop_error_processing.v @@ -14,7 +14,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let vec := M.alloc (| vec |) in M.read (| - let opt := + let~ opt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -101,11 +101,10 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.I32, - Value.Integer 2, - M.read (| n |) - |))) + BinOp.Wrap.mul + Integer.I32 + (Value.Integer 2) + (M.read (| n |)))) ] |) | _ => M.impossible (||) @@ -220,7 +219,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -258,7 +257,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty := + let~ empty := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -271,7 +270,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -309,8 +308,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -366,8 +365,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -423,8 +422,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/result_use_in_main.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/result_use_in_main.v index 33051d1e7..7d330f6ba 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/result_use_in_main.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/result_use_in_main.v @@ -19,8 +19,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (M.catch_return (| ltac:(M.monadic (M.read (| - let number_str := M.copy (| Value.String "10" |) in - let number := + let~ number_str := M.copy (| Value.String "10" |) in + let~ number := M.copy (| M.match_operator (| M.alloc (| @@ -61,8 +61,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v index bd61dc252..87b1df18d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert.v @@ -57,22 +57,47 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert::Fruit::Apple" + |) in M.alloc (| M.read (| Value.String "Apple" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert::Fruit::Orange" + |) in M.alloc (| M.read (| Value.String "Orange" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert::Fruit::Banana" + |) in M.alloc (| M.read (| Value.String "Banana" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert::Fruit::Kiwi" + |) in M.alloc (| M.read (| Value.String "Kiwi" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert::Fruit::Lemon" + |) in M.alloc (| M.read (| Value.String "Lemon" |) |))) ] |) @@ -108,12 +133,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let my_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let apple := + let~ my_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ apple := M.alloc (| Value.StructTuple "unpacking_options_and_defaults_via_get_or_insert::Fruit::Apple" [] |) in - let first_available_fruit := + let~ first_available_fruit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -126,8 +151,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ my_fruit; M.read (| apple |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -173,8 +198,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v index f77cdafc8..cf9418ee8 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_get_or_insert_with.v @@ -57,22 +57,47 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_get_or_insert_ fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Apple" + |) in M.alloc (| M.read (| Value.String "Apple" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Orange" + |) in M.alloc (| M.read (| Value.String "Orange" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Banana" + |) in M.alloc (| M.read (| Value.String "Banana" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Kiwi" + |) in M.alloc (| M.read (| Value.String "Kiwi" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_get_or_insert_with::Fruit::Lemon" + |) in M.alloc (| M.read (| Value.String "Lemon" |) |))) ] |) @@ -119,8 +144,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let my_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let get_lemon_as_fallback := + let~ my_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ get_lemon_as_fallback := M.alloc (| M.closure (fun γ => @@ -133,8 +158,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -174,7 +199,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let first_available_fruit := + let~ first_available_fruit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -191,8 +216,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ my_fruit; M.read (| get_lemon_as_fallback |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -238,8 +263,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -285,7 +310,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let my_apple := + let~ my_apple := M.alloc (| Value.StructTuple "core::option::Option::Some" @@ -295,7 +320,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] ] |) in - let should_be_apple := + let~ should_be_apple := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -312,8 +337,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ my_apple; M.read (| get_lemon_as_fallback |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -359,8 +384,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v index e958b6f94..d12b1f557 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or.v @@ -57,22 +57,47 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_Fruit. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or::Fruit::Apple" + |) in M.alloc (| M.read (| Value.String "Apple" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or::Fruit::Orange" + |) in M.alloc (| M.read (| Value.String "Orange" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or::Fruit::Banana" + |) in M.alloc (| M.read (| Value.String "Banana" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or::Fruit::Kiwi" + |) in M.alloc (| M.read (| Value.String "Kiwi" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or::Fruit::Lemon" + |) in M.alloc (| M.read (| Value.String "Lemon" |) |))) ] |) @@ -112,20 +137,20 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let apple := + let~ apple := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "unpacking_options_and_defaults_via_or::Fruit::Apple" [] ] |) in - let orange := + let~ orange := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "unpacking_options_and_defaults_via_or::Fruit::Orange" [] ] |) in - let no_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let first_available_fruit := + let~ no_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ first_available_fruit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -150,8 +175,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v index d5b7515ed..8b1ef4d1c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_and_defaults_via_or_else.v @@ -57,22 +57,47 @@ Module Impl_core_fmt_Debug_for_unpacking_options_and_defaults_via_or_else_Fruit. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or_else::Fruit::Apple" + |) in M.alloc (| M.read (| Value.String "Apple" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or_else::Fruit::Orange" + |) in M.alloc (| M.read (| Value.String "Orange" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or_else::Fruit::Banana" + |) in M.alloc (| M.read (| Value.String "Banana" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or_else::Fruit::Kiwi" + |) in M.alloc (| M.read (| Value.String "Kiwi" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "unpacking_options_and_defaults_via_or_else::Fruit::Lemon" + |) in M.alloc (| M.read (| Value.String "Lemon" |) |))) ] |) @@ -116,14 +141,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let apple := + let~ apple := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.StructTuple "unpacking_options_and_defaults_via_or_else::Fruit::Apple" [] ] |) in - let no_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let get_kiwi_as_fallback := + let~ no_fruit := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ get_kiwi_as_fallback := M.alloc (| M.closure (fun γ => @@ -136,8 +161,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -181,7 +206,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let get_lemon_as_fallback := + let~ get_lemon_as_fallback := M.alloc (| M.closure (fun γ => @@ -194,8 +219,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -239,7 +264,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let first_available_fruit := + let~ first_available_fruit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -276,8 +301,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_via_question_mark.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_via_question_mark.v index 3bea2a3f9..dcb4cf4ab 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_via_question_mark.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/unpacking_options_via_question_mark.v @@ -297,7 +297,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let p := + let~ p := M.alloc (| Value.StructRecord "unpacking_options_via_question_mark::Person" @@ -327,7 +327,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ]) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -378,7 +378,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/error_handling/wrapping_errors.v b/CoqOfRust/examples/default/examples/rust_book/error_handling/wrapping_errors.v index ea26ee02d..ba83a9d98 100644 --- a/CoqOfRust/examples/default/examples/rust_book/error_handling/wrapping_errors.v +++ b/CoqOfRust/examples/default/examples/rust_book/error_handling/wrapping_errors.v @@ -38,6 +38,7 @@ Module Impl_core_fmt_Debug_for_wrapping_errors_DoubleError. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := M.is_struct_tuple (| γ, "wrapping_errors::DoubleError::EmptyVec" |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -116,7 +117,8 @@ Module Impl_core_fmt_Display_for_wrapping_errors_DoubleError. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "wrapping_errors::DoubleError::EmptyVec" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", @@ -149,7 +151,8 @@ Module Impl_core_fmt_Display_for_wrapping_errors_DoubleError. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "wrapping_errors::DoubleError::Parse" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "core::fmt::Formatter", @@ -218,7 +221,9 @@ Module Impl_core_error_Error_for_wrapping_errors_DoubleError. M.read (| self |), [ fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "wrapping_errors::DoubleError::EmptyVec" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -290,7 +295,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let first := + let~ first := M.copy (| M.match_operator (| M.alloc (| @@ -400,7 +405,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let parsed := + let~ parsed := M.copy (| M.match_operator (| M.alloc (| @@ -475,7 +480,7 @@ Definition double_first (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.StructTuple "core::result::Result::Ok" - [ BinOp.Panic.mul (| Integer.I32, Value.Integer 2, M.read (| parsed |) |) ] + [ BinOp.Wrap.mul Integer.I32 (Value.Integer 2) (M.read (| parsed |)) ] |) |))) |))) @@ -511,7 +516,7 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -559,8 +564,8 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -628,8 +633,8 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let source := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -705,7 +710,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let numbers := + let~ numbers := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -743,7 +748,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty := + let~ empty := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -756,7 +761,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let strings := + let~ strings := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -794,7 +799,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "wrapping_errors::print", [] |), @@ -806,7 +811,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "wrapping_errors::print", [] |), @@ -818,7 +823,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "wrapping_errors::print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v b/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v index 193f708d9..9d0a8fc56 100644 --- a/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v +++ b/CoqOfRust/examples/default/examples/rust_book/expressions/blocks.v @@ -28,31 +28,27 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 5 |) in - let y := + let~ x := M.alloc (| Value.Integer 5 |) in + let~ y := M.copy (| - let x_squared := - M.alloc (| BinOp.Panic.mul (| Integer.U32, M.read (| x |), M.read (| x |) |) |) in - let x_cube := - M.alloc (| - BinOp.Panic.mul (| Integer.U32, M.read (| x_squared |), M.read (| x |) |) - |) in + let~ x_squared := + M.alloc (| BinOp.Wrap.mul Integer.U32 (M.read (| x |)) (M.read (| x |)) |) in + let~ x_cube := + M.alloc (| BinOp.Wrap.mul Integer.U32 (M.read (| x_squared |)) (M.read (| x |)) |) in M.alloc (| - BinOp.Panic.add (| - Integer.U32, - BinOp.Panic.add (| Integer.U32, M.read (| x_cube |), M.read (| x_squared |) |), - M.read (| x |) - |) + BinOp.Wrap.add + Integer.U32 + (BinOp.Wrap.add Integer.U32 (M.read (| x_cube |)) (M.read (| x_squared |))) + (M.read (| x |)) |) |) in - let z := + let~ z := M.copy (| - let _ := - M.alloc (| BinOp.Panic.mul (| Integer.U32, Value.Integer 2, M.read (| x |) |) |) in + let~ _ := M.alloc (| BinOp.Wrap.mul Integer.U32 (Value.Integer 2) (M.read (| x |)) |) in M.alloc (| Value.Tuple [] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -88,8 +84,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -125,8 +121,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/expressions/variable_binding_and_expression.v b/CoqOfRust/examples/default/examples/rust_book/expressions/variable_binding_and_expression.v index 65dfe3535..5300a3388 100644 --- a/CoqOfRust/examples/default/examples/rust_book/expressions/variable_binding_and_expression.v +++ b/CoqOfRust/examples/default/examples/rust_book/expressions/variable_binding_and_expression.v @@ -17,10 +17,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 5 |) in - let _ := x in - let _ := M.alloc (| BinOp.Panic.add (| Integer.I32, M.read (| x |), Value.Integer 1 |) |) in - let _ := M.alloc (| Value.Integer 15 |) in + let~ x := M.alloc (| Value.Integer 5 |) in + let~ _ := x in + let~ _ := M.alloc (| BinOp.Wrap.add Integer.I32 (M.read (| x |)) (Value.Integer 1) |) in + let~ _ := M.alloc (| Value.Integer 15 |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v index d811b70fd..59c0e09eb 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_into_iter.v @@ -21,7 +21,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let names := + let~ names := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -95,7 +95,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -117,7 +117,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -137,7 +138,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.String "Ferris" |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -169,7 +170,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter.v index a6d8db193..f3c270d91 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter.v @@ -21,7 +21,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let names := + let~ names := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -107,7 +107,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -126,7 +126,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -147,7 +149,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.String "Ferris" |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -179,7 +181,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -238,8 +240,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v index 82a7ab136..0b1247dcf 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_iterators_iter_mut.v @@ -20,7 +20,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let names := + let~ names := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -58,7 +58,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -106,7 +106,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -125,7 +125,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -167,8 +169,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v index 0151e00d9..7e2590d18 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_completely_inclusive.v @@ -51,7 +51,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -70,7 +70,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -89,11 +90,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 15 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 15)) (Value.Integer 0) |)) in let _ := @@ -101,8 +101,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -140,11 +140,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 3 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 3)) (Value.Integer 0) |)) in let _ := @@ -152,8 +151,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -197,11 +196,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 5 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 5)) (Value.Integer 0) |)) in let _ := @@ -209,8 +207,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -246,8 +244,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v index 64bb3083e..9033d4390 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/for_and_range_inclusive_to_exclusive.v @@ -46,7 +46,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -63,7 +63,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -82,11 +83,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 15 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 15)) (Value.Integer 0) |)) in let _ := @@ -94,8 +94,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -133,11 +133,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 3 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 3)) (Value.Integer 0) |)) in let _ := @@ -145,8 +144,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -190,11 +189,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 5 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 5)) (Value.Integer 0) |)) in let _ := @@ -202,8 +200,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -239,8 +237,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_else.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_else.v index 184e4eab1..61a54abe2 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_else.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_else.v @@ -35,8 +35,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let n := M.alloc (| Value.Integer 5 |) in - let _ := + let~ n := M.alloc (| Value.Integer 5 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -45,8 +45,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| n |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -101,8 +101,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| BinOp.Pure.gt (M.read (| n |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -147,8 +147,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -195,7 +195,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let big_n := + let~ big_n := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -211,8 +211,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -242,13 +242,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - M.alloc (| - BinOp.Panic.mul (| Integer.I32, Value.Integer 10, M.read (| n |) |) - |))); + M.alloc (| BinOp.Wrap.mul Integer.I32 (Value.Integer 10) (M.read (| n |)) |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -277,14 +275,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - M.alloc (| - BinOp.Panic.div (| Integer.I32, M.read (| n |), Value.Integer 2 |) - |))) + M.alloc (| BinOp.Wrap.div Integer.I32 (M.read (| n |)) (Value.Integer 2) |))) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let.v index d6cfb2d80..cf316b3a2 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let.v @@ -42,11 +42,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let number := + let~ number := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.Integer 7 ] |) in - let letter := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let emoticon := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let _ := + let~ letter := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ emoticon := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -56,8 +56,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -104,7 +104,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -114,8 +114,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -161,8 +161,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -195,7 +195,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let i_like_letters := M.alloc (| Value.Bool false |) in + let~ i_like_letters := M.alloc (| Value.Bool false |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -205,8 +205,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -260,8 +260,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ := M.use i_like_letters in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -294,8 +294,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_challenge.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_challenge.v index 14029baac..6daeee5a0 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_challenge.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_challenge.v @@ -32,15 +32,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.StructTuple "if_let_challenge::Foo::Bar" [] |) in + let~ a := M.alloc (| Value.StructTuple "if_let_challenge::Foo::Bar" [] |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => ltac:(M.monadic (let γ := a in - let _ := - let _ := + let _ := M.is_struct_tuple (| γ, "if_let_challenge::Foo::Bar" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_dont_use_match.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_dont_use_match.v index e54ea45bd..f285c8207 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_dont_use_match.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_dont_use_match.v @@ -23,9 +23,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let optional := + let~ optional := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.Integer 7 ] |) in - let _ := + let~ _ := M.match_operator (| optional, [ @@ -34,8 +34,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_match_enum_values.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_match_enum_values.v index f7131e1a1..e861f659e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_match_enum_values.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/if_let_match_enum_values.v @@ -61,21 +61,22 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.StructTuple "if_let_match_enum_values::Foo::Bar" [] |) in - let b := M.alloc (| Value.StructTuple "if_let_match_enum_values::Foo::Baz" [] |) in - let c := + let~ a := M.alloc (| Value.StructTuple "if_let_match_enum_values::Foo::Bar" [] |) in + let~ b := M.alloc (| Value.StructTuple "if_let_match_enum_values::Foo::Baz" [] |) in + let~ c := M.alloc (| Value.StructTuple "if_let_match_enum_values::Foo::Qux" [ Value.Integer 100 ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => ltac:(M.monadic (let γ := a in - let _ := - let _ := + let _ := M.is_struct_tuple (| γ, "if_let_match_enum_values::Foo::Bar" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -103,15 +104,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => ltac:(M.monadic (let γ := b in - let _ := - let _ := + let _ := M.is_struct_tuple (| γ, "if_let_match_enum_values::Foo::Bar" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -139,7 +141,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -153,8 +155,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let value := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -215,8 +217,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let value := M.copy (| γ0_0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 100 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/infinite_loop.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/infinite_loop.v index 20f948a12..a421e89f7 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/infinite_loop.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/infinite_loop.v @@ -34,9 +34,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let count := M.alloc (| Value.Integer 0 |) in - let _ := - let _ := + let~ count := M.alloc (| Value.Integer 0 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -58,10 +58,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := let β := count in - M.write (| β, BinOp.Panic.add (| Integer.U32, M.read (| β |), Value.Integer 1 |) |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.U32 (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -74,8 +74,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -106,8 +106,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -158,8 +158,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_nesting_and_labels.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_nesting_and_labels.v index 903c112bd..fdfaed614 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_nesting_and_labels.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_nesting_and_labels.v @@ -27,11 +27,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.loop (| ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -55,14 +55,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.loop (| ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -93,8 +93,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -121,8 +121,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |))) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_returning_from_loops.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_returning_from_loops.v index f2d4e781a..b27960e7f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_returning_from_loops.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/loop_returning_from_loops.v @@ -21,17 +21,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let counter := M.alloc (| Value.Integer 0 |) in - let result := + let~ counter := M.alloc (| Value.Integer 0 |) in + let~ result := M.copy (| M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := let β := counter in - M.write (| - β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 1 |) - |) in + M.write (| β, BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -50,7 +47,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ result; M.alloc (| Value.Integer 20 |) ] |), [ @@ -78,7 +75,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match.v index 50fb90c57..9be0143b3 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match.v @@ -37,9 +37,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let number := M.alloc (| Value.Integer 13 |) in - let _ := - let _ := + let~ number := M.alloc (| Value.Integer 13 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -78,14 +78,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| number, [ fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -143,7 +143,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic match γ with | [] => - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -173,7 +173,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -197,7 +197,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -223,8 +223,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let boolean := M.alloc (| Value.Bool true |) in - let binary := + let~ boolean := M.alloc (| Value.Bool true |) in + let~ binary := M.copy (| M.match_operator (| boolean, @@ -240,8 +240,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding.v index 0830afd60..f5727d637 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding.v @@ -32,8 +32,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -60,7 +60,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -92,7 +92,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -138,7 +138,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -184,7 +184,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v index a24ae83e3..0b98ab3c2 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_binding_destructure_enum_variants.v @@ -47,7 +47,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let n := M.copy (| γ0_0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 42 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -95,7 +95,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v index 7dfc7463a..18a3eee03 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_arrays_slices.v @@ -45,7 +45,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let array := + let~ array := M.alloc (| Value.Array [ Value.Integer 1; Value.Integer (-2); Value.Integer 6 ] |) in M.match_operator (| array, @@ -58,7 +58,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let second := M.copy (| γ0_1 |) in let third := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -117,7 +117,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_2 := M.SubPointer.get_slice_index (| γ, 2 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 1 |) in let third := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -167,7 +167,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_rest := M.SubPointer.get_slice_rest (| γ, 2, 0 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer (-1) |) in let second := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -220,7 +220,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 3 |) in let second := M.copy (| γ0_1 |) in let tail := M.copy (| γ0_rest |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -280,7 +280,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let first := M.copy (| γ0_0 |) in let middle := M.copy (| γ0_rest |) in let last := M.copy (| γ0_rev0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_enums.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_enums.v index a01782b3a..fbee7c414 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_enums.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_enums.v @@ -79,14 +79,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let color := + let~ color := M.alloc (| Value.StructTuple "match_destructuring_enums::Color::RGB" [ Value.Integer 122; Value.Integer 17; Value.Integer 40 ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -111,7 +111,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "match_destructuring_enums::Color::Red" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -137,7 +138,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "match_destructuring_enums::Color::Blue" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -163,7 +165,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "match_destructuring_enums::Color::Green" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -210,7 +213,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let r := M.copy (| γ0_0 |) in let g := M.copy (| γ0_1 |) in let b := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -294,7 +297,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let h := M.copy (| γ0_0 |) in let s := M.copy (| γ0_1 |) in let v := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -378,7 +381,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let h := M.copy (| γ0_0 |) in let s := M.copy (| γ0_1 |) in let l := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -462,7 +465,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let c := M.copy (| γ0_0 |) in let m := M.copy (| γ0_1 |) in let y := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -553,7 +556,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let m := M.copy (| γ0_1 |) in let y := M.copy (| γ0_2 |) in let k := M.copy (| γ0_3 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v index df027f603..99d5324b6 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_pointers_ref.v @@ -58,8 +58,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let reference := M.alloc (| M.alloc (| Value.Integer 4 |) |) in - let _ := + let~ reference := M.alloc (| M.alloc (| Value.Integer 4 |) |) in + let~ _ := M.match_operator (| reference, [ @@ -67,7 +67,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ := M.read (| γ |) in let val := M.copy (| γ |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -112,14 +112,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.read (| reference |), [ fun γ => ltac:(M.monadic (let val := M.copy (| γ |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -164,23 +164,23 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let _not_a_reference := M.alloc (| Value.Integer 3 |) in + let~ _not_a_reference := M.alloc (| Value.Integer 3 |) in M.match_operator (| M.alloc (| Value.Integer 3 |), [ fun γ => ltac:(M.monadic (let _is_a_reference := M.alloc (| γ |) in - let value := M.alloc (| Value.Integer 5 |) in - let mut_value := M.alloc (| Value.Integer 6 |) in - let _ := + let~ value := M.alloc (| Value.Integer 5 |) in + let~ mut_value := M.alloc (| Value.Integer 6 |) in + let~ _ := M.match_operator (| value, [ fun γ => ltac:(M.monadic (let r := M.alloc (| γ |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -233,14 +233,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let m := M.alloc (| γ |) in - let _ := + let~ _ := let β := M.read (| m |) in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 10 |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 10) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_structs.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_structs.v index f8bfaa1a1..47e9c40b3 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_structs.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_structs.v @@ -32,7 +32,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let foo := + let~ foo := M.alloc (| Value.StructRecord "match_destructuring_structs::Foo" @@ -60,7 +60,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.is_constant_or_break_match (| M.read (| γ1_0 |), Value.Integer 1 |) in let b := M.copy (| γ1_1 |) in let y := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -128,7 +128,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 2 |) in let i := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -180,7 +180,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "y" |) in let y := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples.v index 7dc23c55e..9181e186e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples.v @@ -25,10 +25,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let triple := + let~ triple := M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer (-2); Value.Integer 3 ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -78,7 +78,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let y := M.copy (| γ0_1 |) in let z := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -136,7 +136,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -171,7 +171,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -207,7 +207,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 3 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 4 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -239,7 +239,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v index ecbba7dd4..9dc0ec4b6 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_destructuring_tuples_fixed.v @@ -25,10 +25,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let triple := + let~ triple := M.alloc (| Value.Tuple [ Value.Integer 0; Value.Integer (-2); Value.Integer 3 ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -78,7 +78,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 0 |) in let y := M.copy (| γ0_1 |) in let z := M.copy (| γ0_2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -136,7 +136,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -171,7 +171,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 2 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -207,7 +207,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_2 := M.SubPointer.get_tuple_field (| γ, 2 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_0 |), Value.Integer 3 |) in let _ := M.is_constant_or_break_match (| M.read (| γ0_2 |), Value.Integer 4 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -239,7 +239,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards.v index 7282c35a7..82c53561d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards.v @@ -41,7 +41,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let temperature := + let~ temperature := M.alloc (| Value.StructTuple "match_guards::Temperature::Celsius" [ Value.Integer 35 ] |) in @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let t := M.copy (| γ0_0 |) in let γ := M.alloc (| BinOp.Pure.gt (M.read (| t |)) (Value.Integer 30) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -111,7 +111,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let t := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -165,7 +165,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let t := M.copy (| γ0_0 |) in let γ := M.alloc (| BinOp.Pure.gt (M.read (| t |)) (Value.Integer 86) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -217,7 +217,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let t := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards_unreachable.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards_unreachable.v index e054bb8e3..d1383a394 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards_unreachable.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/match_guards_unreachable.v @@ -18,7 +18,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let number := M.alloc (| Value.Integer 4 |) in + let~ number := M.alloc (| Value.Integer 4 |) in M.match_operator (| number, [ @@ -27,7 +27,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let i := M.copy (| γ |) in let γ := M.alloc (| BinOp.Pure.eq (M.read (| i |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -54,7 +54,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let i := M.copy (| γ |) in let γ := M.alloc (| BinOp.Pure.gt (M.read (| i |)) (Value.Integer 0) |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while.v index caf79f998..d08b2ac94 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while.v @@ -28,7 +28,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let n := M.alloc (| Value.Integer 1 |) in + let~ n := M.alloc (| Value.Integer 1 |) in M.loop (| ltac:(M.monadic (M.match_operator (| @@ -39,7 +39,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ := M.use (M.alloc (| BinOp.Pure.lt (M.read (| n |)) (Value.Integer 101) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49,11 +49,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 15 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 15)) (Value.Integer 0) |)) in let _ := @@ -61,8 +60,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -99,11 +98,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 3 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 3)) (Value.Integer 0) |)) in let _ := @@ -111,8 +109,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -149,11 +147,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.use (M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| n |), - Value.Integer 5 - |)) + (BinOp.Wrap.rem + Integer.I32 + (M.read (| n |)) + (Value.Integer 5)) (Value.Integer 0) |)) in let _ := @@ -161,8 +158,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -197,8 +194,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -252,11 +249,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := + let~ _ := let β := n in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -264,7 +261,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| M.never_to_any (| M.read (| - let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) |) diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let.v index 25dab5fff..2b8f0ec6f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let.v @@ -28,7 +28,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let optional := + let~ optional := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.Integer 0 ] |) in M.loop (| ltac:(M.monadic @@ -55,8 +55,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| BinOp.Pure.gt (M.read (| i |)) (Value.Integer 9) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -82,7 +82,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| optional, Value.StructTuple "core::option::Option::None" [] @@ -90,8 +90,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -134,18 +134,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| optional, Value.StructTuple "core::option::Option::Some" - [ - BinOp.Panic.add (| - Integer.I32, - M.read (| i |), - Value.Integer 1 - |) - ] + [ BinOp.Wrap.add Integer.I32 (M.read (| i |)) (Value.Integer 1) ] |) in M.alloc (| Value.Tuple [] |))) ] @@ -155,7 +149,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| M.never_to_any (| M.read (| - let _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) |) diff --git a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let_match_is_weird.v b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let_match_is_weird.v index 6aca83190..face1b161 100644 --- a/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let_match_is_weird.v +++ b/CoqOfRust/examples/default/examples/rust_book/flow_of_control/while_let_match_is_weird.v @@ -33,7 +33,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let optional := + let~ optional := M.alloc (| Value.StructTuple "core::option::Option::Some" [ Value.Integer 0 ] |) in M.loop (| ltac:(M.monadic @@ -59,8 +59,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| BinOp.Pure.gt (M.read (| i |)) (Value.Integer 9) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -86,7 +86,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| optional, Value.StructTuple "core::option::Option::None" [] @@ -94,8 +94,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -138,18 +138,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| optional, Value.StructTuple "core::option::Option::Some" - [ - BinOp.Panic.add (| - Integer.I32, - M.read (| i |), - Value.Integer 1 - |) - ] + [ BinOp.Wrap.add Integer.I32 (M.read (| i |)) (Value.Integer 1) ] |) in M.alloc (| Value.Tuple [] |))) ] diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.v b/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.v index 40488e774..39d314f00 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/associated_functions_and_methods.v @@ -151,19 +151,10 @@ Module Impl_associated_functions_and_methods_Rectangle. M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs", [] |), [ - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| x1 |), - M.read (| x2 |) - |), - BinOp.Panic.sub (| - Integer.Usize, - M.read (| y1 |), - M.read (| y2 |) - |) - |) + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.sub Integer.Usize (M.read (| x1 |)) (M.read (| x2 |))) + (BinOp.Wrap.sub Integer.Usize (M.read (| y1 |)) (M.read (| y2 |))) ] |) |))) @@ -238,33 +229,21 @@ Module Impl_associated_functions_and_methods_Rectangle. let x2 := M.copy (| γ0_0 |) in let y2 := M.copy (| γ0_1 |) in M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - M.read (| UnsupportedLiteral |), - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| UnsupportedLiteral |)) + (BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs", [] |), - [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| x1 |), - M.read (| x2 |) - |) + [ BinOp.Wrap.sub Integer.Usize (M.read (| x1 |)) (M.read (| x2 |)) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.path "f64", "abs", [] |), - [ - BinOp.Panic.sub (| - Integer.Usize, - M.read (| y1 |), - M.read (| y2 |) - |) + [ BinOp.Wrap.sub Integer.Usize (M.read (| y1 |)) (M.read (| y2 |)) ] - |) - |) - |) + |))) |))) ] |))) @@ -293,7 +272,7 @@ Module Impl_associated_functions_and_methods_Rectangle. let x := M.alloc (| x |) in let y := M.alloc (| y |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -304,8 +283,8 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "x" |) in - M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| x |) |) |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| x |)) |) in + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -316,8 +295,8 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "x" |) in - M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| x |) |) |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| x |)) |) in + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -328,8 +307,8 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "y" |) in - M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| y |) |) |) in - let _ := + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| y |)) |) in + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -340,7 +319,7 @@ Module Impl_associated_functions_and_methods_Rectangle. "associated_functions_and_methods::Point", "y" |) in - M.write (| β, BinOp.Panic.add (| Integer.Usize, M.read (| β |), M.read (| y |) |) |) in + M.write (| β, BinOp.Wrap.add Integer.Usize (M.read (| β |)) (M.read (| y |)) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -398,8 +377,8 @@ Module Impl_associated_functions_and_methods_Pair. |) in let first := M.copy (| γ0_0 |) in let second := M.copy (| γ0_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -510,7 +489,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let rectangle := + let~ rectangle := M.alloc (| Value.StructRecord "associated_functions_and_methods::Rectangle" @@ -535,8 +514,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |)) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -586,8 +565,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -637,7 +616,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let square := + let~ square := M.alloc (| Value.StructRecord "associated_functions_and_methods::Rectangle" @@ -662,7 +641,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -673,7 +652,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ square; M.read (| UnsupportedLiteral |); M.read (| UnsupportedLiteral |) ] |) |) in - let pair_ := + let~ pair_ := M.alloc (| Value.StructTuple "associated_functions_and_methods::Pair" @@ -700,7 +679,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v b/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v index d65b1a98a..d9a3f19b0 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_example_sum_odd_numbers.v @@ -31,8 +31,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -114,8 +114,8 @@ Module main. ltac:(M.monadic (let up_to := M.alloc (| up_to |) in M.read (| - let acc := M.alloc (| Value.Integer 0 |) in - let _ := + let~ acc := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -140,7 +140,7 @@ Module main. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -157,7 +157,9 @@ Module main. [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -167,16 +169,15 @@ Module main. 0 |) in let i := M.copy (| γ0_0 |) in - let addition := + let~ addition := M.copy (| M.match_operator (| M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.U32, - M.read (| i |), - Value.Integer 2 - |)) + (BinOp.Wrap.rem + Integer.U32 + (M.read (| i |)) + (Value.Integer 2)) (Value.Integer 1) |), [ @@ -201,15 +202,14 @@ Module main. ] |) |) in - let _ := + let~ _ := let β := acc in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - M.read (| addition |) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| β |)) + (M.read (| addition |)) |) in M.alloc (| Value.Tuple [] |))) ] diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v b/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v index cadb2a841..9834a54cf 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/diverging_functions_no_info_in_return_type.v @@ -22,14 +22,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := + let~ a := M.alloc (| M.call_closure (| M.get_function (| "diverging_functions_no_info_in_return_type::some_fn", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions.v index 9b4916aeb..f3df363a0 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions.v @@ -21,7 +21,7 @@ Definition is_divisible_by (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -38,7 +38,7 @@ Definition is_divisible_by (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| lhs |), M.read (| rhs |) |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| lhs |)) (M.read (| rhs |))) (Value.Integer 0) |) |))) @@ -81,8 +81,8 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -124,8 +124,8 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -170,8 +170,8 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -198,8 +198,8 @@ Definition fizzbuzz (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -297,7 +297,7 @@ Definition fizzbuzz_to (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -316,7 +316,8 @@ Definition fizzbuzz_to (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -326,7 +327,7 @@ Definition fizzbuzz_to (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let n := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "functions::fizzbuzz", [] |), @@ -357,7 +358,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "functions::fizzbuzz_to", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures.v index 8ec8e33d0..47245d927 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures.v @@ -35,8 +35,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let outer_var := M.alloc (| Value.Integer 42 |) in - let closure_annotated := + let~ outer_var := M.alloc (| Value.Integer 42 |) in + let~ closure_annotated := M.alloc (| M.closure (fun γ => @@ -49,17 +49,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.I32, - M.read (| i |), - M.read (| outer_var |) - |))) + BinOp.Wrap.add Integer.I32 (M.read (| i |)) (M.read (| outer_var |)))) ] |) | _ => M.impossible (||) end)) |) in - let closure_inferred := + let~ closure_inferred := M.alloc (| M.closure (fun γ => @@ -72,18 +68,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let i := M.copy (| γ |) in - BinOp.Panic.add (| - Integer.I32, - M.read (| i |), - M.read (| outer_var |) - |))) + BinOp.Wrap.add Integer.I32 (M.read (| i |)) (M.read (| outer_var |)))) ] |) | _ => M.impossible (||) end)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -135,8 +127,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -188,7 +180,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let one := + let~ one := M.alloc (| M.closure (fun γ => @@ -202,8 +194,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_input_parameters.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_input_parameters.v index f84d6dac1..7a2904e6b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_input_parameters.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_input_parameters.v @@ -18,7 +18,7 @@ Definition apply (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -108,15 +108,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let greeting := M.copy (| Value.String "hello" |) in - let farewell := + let~ greeting := M.copy (| Value.String "hello" |) in + let~ farewell := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |), [ M.read (| Value.String "goodbye" |) ] |) |) in - let diary := + let~ diary := M.alloc (| M.closure (fun γ => @@ -129,8 +129,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -173,7 +173,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -184,8 +184,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ farewell; M.read (| Value.String "!!!" |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -228,8 +228,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -258,7 +258,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -275,7 +275,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -285,7 +285,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| diary |) ] |) |) in - let double := + let~ double := M.alloc (| M.closure (fun γ => @@ -298,14 +298,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let x := M.copy (| γ |) in - BinOp.Panic.mul (| Integer.I32, Value.Integer 2, M.read (| x |) |))) + BinOp.Wrap.mul Integer.I32 (Value.Integer 2) (M.read (| x |)))) ] |) | _ => M.impossible (||) end)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_output_parameters.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_output_parameters.v index e55834ddb..cfc149435 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_output_parameters.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_as_output_parameters.v @@ -13,7 +13,7 @@ Definition create_fn (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let text := + let~ text := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |), @@ -32,7 +32,7 @@ Definition create_fn (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -104,7 +104,7 @@ Definition create_fnmut (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let text := + let~ text := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |), @@ -123,7 +123,7 @@ Definition create_fnmut (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -195,7 +195,7 @@ Definition create_fnonce (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let text := + let~ text := M.alloc (| M.call_closure (| M.get_trait_method (| "alloc::borrow::ToOwned", Ty.path "str", [], "to_owned", [] |), @@ -214,7 +214,7 @@ Definition create_fnonce (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -290,28 +290,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let fn_plain := + let~ fn_plain := M.alloc (| M.call_closure (| M.get_function (| "functions_closures_as_output_parameters::create_fn", [] |), [] |) |) in - let fn_mut := + let~ fn_mut := M.alloc (| M.call_closure (| M.get_function (| "functions_closures_as_output_parameters::create_fnmut", [] |), [] |) |) in - let fn_once := + let~ fn_once := M.alloc (| M.call_closure (| M.get_function (| "functions_closures_as_output_parameters::create_fnonce", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -324,7 +324,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fn_plain; Value.Tuple [] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -337,7 +337,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fn_mut; Value.Tuple [] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_capturing.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_capturing.v index 4840b0f0b..4c09113c4 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_capturing.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_capturing.v @@ -74,7 +74,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let color := + let~ color := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -87,7 +87,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| Value.String "green" |) ] |) |) in - let print := + let~ print := M.alloc (| M.closure (fun γ => @@ -100,7 +100,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -149,7 +149,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -162,8 +162,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ print; Value.Tuple [] ] |) |) in - let _reborrow := M.alloc (| color |) in - let _ := + let~ _reborrow := M.alloc (| color |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -176,9 +176,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ print; Value.Tuple [] ] |) |) in - let _color_moved := M.copy (| color |) in - let count := M.alloc (| Value.Integer 0 |) in - let inc := + let~ _color_moved := M.copy (| color |) in + let~ count := M.alloc (| Value.Integer 0 |) in + let~ inc := M.alloc (| M.closure (fun γ => @@ -191,14 +191,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := let β := count in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -248,7 +248,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -261,7 +261,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ inc; Value.Tuple [] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -274,8 +274,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ inc; Value.Tuple [] ] |) |) in - let _count_reborrowed := M.alloc (| count |) in - let movable := + let~ _count_reborrowed := M.alloc (| count |) in + let~ movable := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -288,7 +288,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 3 ] |) |) in - let consume := + let~ consume := M.alloc (| M.closure (fun γ => @@ -301,8 +301,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -352,7 +352,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -373,7 +373,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_Iterator_any.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_Iterator_any.v index e14eca86d..adfcda738 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_Iterator_any.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_Iterator_any.v @@ -33,7 +33,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let vec1 := + let~ vec1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -66,7 +66,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let vec2 := + let~ vec2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -99,8 +99,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -201,8 +201,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -291,8 +291,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -342,8 +342,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -395,12 +395,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let array1 := + let~ array1 := M.alloc (| Value.Array [ Value.Integer 1; Value.Integer 2; Value.Integer 3 ] |) in - let array2 := + let~ array2 := M.alloc (| Value.Array [ Value.Integer 4; Value.Integer 5; Value.Integer 6 ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -489,8 +489,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v index 43d6481cb..21392a1a5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_find.v @@ -35,7 +35,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let vec1 := + let~ vec1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -68,7 +68,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let vec2 := + let~ vec2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -101,7 +101,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let iter := + let~ iter := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -125,7 +125,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let into_iter := + let~ into_iter := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -140,8 +140,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| vec2 |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -232,8 +232,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -313,12 +313,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let array1 := + let~ array1 := M.alloc (| Value.Array [ Value.Integer 1; Value.Integer 2; Value.Integer 3 ] |) in - let array2 := + let~ array2 := M.alloc (| Value.Array [ Value.Integer 4; Value.Integer 5; Value.Integer 6 ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -418,8 +418,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v index 668e7b13c..1fba73681 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_example_searching_through_iterators_Iterator_position.v @@ -21,7 +21,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -62,7 +62,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let index_of_first_even_number := + let~ index_of_first_even_number := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -113,11 +113,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ := M.read (| γ |) in let x := M.copy (| γ |) in BinOp.Pure.eq - (BinOp.Panic.rem (| - Integer.I32, - M.read (| x |), - Value.Integer 2 - |)) + (BinOp.Wrap.rem Integer.I32 (M.read (| x |)) (Value.Integer 2)) (Value.Integer 0))) ] |) @@ -126,7 +122,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -171,7 +167,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -204,7 +200,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let index_of_first_negative_number := + let~ index_of_first_negative_number := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -250,7 +246,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -295,7 +291,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v index 060543b6a..751934d90 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_forced_capturing_with_move.v @@ -26,7 +26,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let haystack := + let~ haystack := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let contains := + let~ contains := M.alloc (| M.closure (fun γ => @@ -99,8 +99,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -151,8 +151,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_input_functions.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_input_functions.v index 34ed8fc28..d6edf867e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_input_functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_input_functions.v @@ -12,7 +12,7 @@ Definition call_me (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::Fn", F, [ Ty.tuple [] ], "call", [] |), @@ -36,8 +36,8 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -76,7 +76,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let closure := + let~ closure := M.alloc (| M.closure (fun γ => @@ -89,7 +89,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -120,7 +120,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -130,7 +130,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| closure |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define.v index 31c497211..2ac0cd571 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define.v @@ -32,7 +32,7 @@ Module main. ltac:(M.monadic (let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v index 4a12b24c7..b1013f348 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_closures_type_anonymity_define_and_use.v @@ -15,7 +15,7 @@ Definition apply (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let f := M.alloc (| f |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::ops::function::Fn", F, [ Ty.tuple [] ], "call", [] |), @@ -45,8 +45,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 7 |) in - let print := + let~ x := M.alloc (| Value.Integer 7 |) in + let~ print := M.alloc (| M.closure (fun γ => @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -108,7 +108,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | _ => M.impossible (||) end)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/functions_order.v b/CoqOfRust/examples/default/examples/rust_book/functions/functions_order.v index e5af98ea0..53ea2667b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/functions_order.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/functions_order.v @@ -29,7 +29,7 @@ Module Impl_functions_order_SomeType. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "functions_order::SomeType", "meth2", [] |), @@ -69,7 +69,7 @@ Definition depends_on_trait_impl (τ : list Ty.t) (α : list Value.t) : M := (let u := M.alloc (| u |) in let b := M.alloc (| b |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -82,7 +82,7 @@ Definition depends_on_trait_impl (τ : list Ty.t) (α : list Value.t) : M := [ M.alloc (| Value.StructTuple "functions_order::OtherType" [ M.read (| b |) ] |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -201,7 +201,7 @@ Module inner_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "functions_order::inner_mod::tar", [] |), [] |) |) in @@ -229,7 +229,7 @@ Module inner_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "functions_order::inner_mod::nested_mod::tack", [] |), @@ -264,13 +264,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "functions_order::foo", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "functions_order::inner_mod::bar", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "functions_order::SomeType", "meth1", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/functions/higher_order_functions.v b/CoqOfRust/examples/default/examples/rust_book/functions/higher_order_functions.v index 05ada293d..c99f3d50a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/functions/higher_order_functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/functions/higher_order_functions.v @@ -12,7 +12,7 @@ Definition is_odd (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let n := M.alloc (| n |) in BinOp.Pure.eq - (BinOp.Panic.rem (| Integer.U32, M.read (| n |), Value.Integer 2 |)) + (BinOp.Wrap.rem Integer.U32 (M.read (| n |)) (Value.Integer 2)) (Value.Integer 1))) | _, _ => M.impossible end. @@ -56,8 +56,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -83,9 +83,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let upper := M.alloc (| Value.Integer 1000 |) in - let acc := M.alloc (| Value.Integer 0 |) in - let _ := + let~ upper := M.alloc (| Value.Integer 1000 |) in + let~ acc := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -107,7 +107,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -126,7 +126,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -136,13 +138,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let n := M.copy (| γ0_0 |) in - let n_squared := + let~ n_squared := M.alloc (| - BinOp.Panic.mul (| - Integer.U32, - M.read (| n |), - M.read (| n |) - |) + BinOp.Wrap.mul Integer.U32 (M.read (| n |)) (M.read (| n |)) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -187,15 +185,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := acc in M.write (| β, - BinOp.Panic.add (| - Integer.U32, - M.read (| β |), - M.read (| n_squared |) - |) + BinOp.Wrap.add + Integer.U32 + (M.read (| β |)) + (M.read (| n_squared |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -210,8 +207,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -250,7 +247,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let sum_of_squared_odd_numbers := + let~ sum_of_squared_odd_numbers := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -349,11 +346,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let n := M.copy (| γ |) in - BinOp.Panic.mul (| - Integer.U32, - M.read (| n |), - M.read (| n |) - |))) + BinOp.Wrap.mul + Integer.U32 + (M.read (| n |)) + (M.read (| n |)))) ] |) | _ => M.impossible (||) @@ -406,8 +402,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics.v index 50025de90..f62e2d08d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics.v @@ -43,18 +43,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _s := + let~ _s := M.alloc (| Value.StructTuple "generics::Single" [ Value.StructTuple "generics::A" [] ] |) in - let _char := + let~ _char := M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.UnicodeChar 97 ] |) in - let _t := + let~ _t := M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.StructTuple "generics::A" [] ] |) in - let _i32 := M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.Integer 6 ] |) in - let _char := + let~ _i32 := M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.Integer 6 ] |) in + let~ _char := M.alloc (| Value.StructTuple "generics::SingleGen" [ Value.UnicodeChar 97 ] |) in M.alloc (| Value.Tuple [] |) |))) diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_problem.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_problem.v index 5a429c8c5..a6687dd16 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_problem.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_problem.v @@ -136,9 +136,9 @@ Definition difference (τ : list Ty.t) (α : list Value.t) : M := | [ A; B; C ], [ container ] => ltac:(M.monadic (let container := M.alloc (| container |) in - BinOp.Panic.sub (| - Integer.I32, - M.call_closure (| + BinOp.Wrap.sub + Integer.I32 + (M.call_closure (| M.get_trait_method (| "generics_associated_types_problem::Contains", C, @@ -147,8 +147,8 @@ Definition difference (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| container |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "generics_associated_types_problem::Contains", C, @@ -157,8 +157,7 @@ Definition difference (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| container |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -188,16 +187,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let number_1 := M.alloc (| Value.Integer 3 |) in - let number_2 := M.alloc (| Value.Integer 10 |) in - let container := + let~ number_1 := M.alloc (| Value.Integer 3 |) in + let~ number_2 := M.alloc (| Value.Integer 10 |) in + let~ container := M.alloc (| Value.StructTuple "generics_associated_types_problem::Container" [ M.read (| number_1 |); M.read (| number_2 |) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -267,8 +266,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -320,8 +319,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -373,8 +372,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_solution.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_solution.v index 2ec65ba65..2f794f1f8 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_solution.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_associated_types_solution.v @@ -162,9 +162,9 @@ Definition difference (τ : list Ty.t) (α : list Value.t) : M := | [ C ], [ container ] => ltac:(M.monadic (let container := M.alloc (| container |) in - BinOp.Panic.sub (| - Integer.I32, - M.call_closure (| + BinOp.Wrap.sub + Integer.I32 + (M.call_closure (| M.get_trait_method (| "generics_associated_types_solution::Contains", C, @@ -173,8 +173,8 @@ Definition difference (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| container |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_trait_method (| "generics_associated_types_solution::Contains", C, @@ -183,8 +183,7 @@ Definition difference (τ : list Ty.t) (α : list Value.t) : M := [] |), [ M.read (| container |) ] - |) - |))) + |)))) | _, _ => M.impossible end. @@ -234,16 +233,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let number_1 := M.alloc (| Value.Integer 3 |) in - let number_2 := M.alloc (| Value.Integer 10 |) in - let container := + let~ number_1 := M.alloc (| Value.Integer 3 |) in + let~ number_2 := M.alloc (| Value.Integer 10 |) in + let~ container := M.alloc (| Value.StructTuple "generics_associated_types_solution::Container" [ M.read (| number_1 |); M.read (| number_2 |) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -313,8 +312,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -366,8 +365,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -419,8 +418,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.v index b25afe9fc..ac26ea662 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds.v @@ -81,23 +81,22 @@ Module Impl_generics_bounds_HasArea_for_generics_bounds_Rectangle. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.mul (| - Integer.Usize, - M.read (| + BinOp.Wrap.mul + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "generics_bounds::Rectangle", "length" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "generics_bounds::Rectangle", "height" |) - |) - |))) + |)))) | _, _ => M.impossible end. @@ -120,8 +119,8 @@ Definition print_debug (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let t := M.alloc (| t |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -208,7 +207,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let rectangle := + let~ rectangle := M.alloc (| Value.StructRecord "generics_bounds::Rectangle" @@ -217,7 +216,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("height", M.read (| UnsupportedLiteral |)) ] |) in - let _triangle := + let~ _triangle := M.alloc (| Value.StructRecord "generics_bounds::Triangle" @@ -226,7 +225,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("height", M.read (| UnsupportedLiteral |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -236,8 +235,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ rectangle ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v index c0509e06a..b407f6544 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_bounds_test_case_empty_bounds.v @@ -101,14 +101,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let cardinal := + let~ cardinal := M.alloc (| Value.StructTuple "generics_bounds_test_case_empty_bounds::Cardinal" [] |) in - let blue_jay := + let~ blue_jay := M.alloc (| Value.StructTuple "generics_bounds_test_case_empty_bounds::BlueJay" [] |) in - let _turkey := + let~ _turkey := M.alloc (| Value.StructTuple "generics_bounds_test_case_empty_bounds::Turkey" [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -158,8 +158,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_functions.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_functions.v index 6a07f10aa..636ba854f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_functions.v @@ -89,7 +89,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::reg_fn", [] |), @@ -100,7 +100,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::gen_spec_t", [] |), @@ -111,21 +111,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::gen_spec_i32", [] |), [ Value.StructTuple "generics_functions::SGen" [ Value.Integer 6 ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::generic", [ Ty.path "char" ] |), [ Value.StructTuple "generics_functions::SGen" [ Value.UnicodeChar 97 ] ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "generics_functions::generic", [ Ty.path "char" ] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_implementation.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_implementation.v index 84f782d85..7b8710386 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_implementation.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_implementation.v @@ -79,18 +79,18 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := + let~ x := M.alloc (| Value.StructRecord "generics_implementation::Val" [ ("val", M.read (| UnsupportedLiteral |)) ] |) in - let y := + let~ y := M.alloc (| Value.StructRecord "generics_implementation::GenVal" [ ("gen_val", Value.Integer 3) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_multiple_bounds.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_multiple_bounds.v index 0ee34bcad..b71900a7a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_multiple_bounds.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_multiple_bounds.v @@ -13,8 +13,8 @@ Definition compare_prints (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let t := M.alloc (| t |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -50,8 +50,8 @@ Definition compare_prints (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -109,8 +109,8 @@ Definition compare_types (τ : list Ty.t) (α : list Value.t) : M := (let t := M.alloc (| t |) in let u := M.alloc (| u |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -146,8 +146,8 @@ Definition compare_types (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -208,10 +208,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let string := M.copy (| Value.String "words" |) in - let array := + let~ string := M.copy (| Value.String "words" |) in + let~ array := M.alloc (| Value.Array [ Value.Integer 1; Value.Integer 2; Value.Integer 3 ] |) in - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -244,7 +244,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -254,7 +254,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ string ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom.v index 5df35ed7d..41c9d5f68 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom.v @@ -31,17 +31,16 @@ Module Impl_generics_new_type_idiom_Years. Value.StructTuple "generics_new_type_idiom::Days" [ - BinOp.Panic.mul (| - Integer.I64, - M.read (| + BinOp.Wrap.mul + Integer.I64 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "generics_new_type_idiom::Years", 0 |) - |), - Value.Integer 365 - |) + |)) + (Value.Integer 365) ])) | _, _ => M.impossible end. @@ -65,17 +64,16 @@ Module Impl_generics_new_type_idiom_Days. Value.StructTuple "generics_new_type_idiom::Years" [ - BinOp.Panic.div (| - Integer.I64, - M.read (| + BinOp.Wrap.div + Integer.I64 + (M.read (| M.SubPointer.get_struct_tuple_field (| M.read (| self |), "generics_new_type_idiom::Days", 0 |) - |), - Value.Integer 365 - |) + |)) + (Value.Integer 365) ])) | _, _ => M.impossible end. @@ -121,9 +119,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let age := + let~ age := M.alloc (| Value.StructTuple "generics_new_type_idiom::Years" [ Value.Integer 5 ] |) in - let age_days := + let~ age_days := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -134,8 +132,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ age ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -182,8 +180,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v index e89920ba1..a2b4553cd 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_new_type_idiom_as_base_type.v @@ -20,11 +20,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let years := + let~ years := M.alloc (| Value.StructTuple "generics_new_type_idiom_as_base_type::Years" [ Value.Integer 42 ] |) in - let years_as_primitive_1 := + let~ years_as_primitive_1 := M.copy (| M.SubPointer.get_struct_tuple_field (| years, diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type.v index b038300f7..f8d3cefea 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type.v @@ -200,19 +200,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _tuple1 := + let~ _tuple1 := M.alloc (| Value.StructTuple "generics_phantom_type::PhantomTuple" [ Value.UnicodeChar 81; Value.StructTuple "core::marker::PhantomData" [] ] |) in - let _tuple2 := + let~ _tuple2 := M.alloc (| Value.StructTuple "generics_phantom_type::PhantomTuple" [ Value.UnicodeChar 81; Value.StructTuple "core::marker::PhantomData" [] ] |) in - let _struct1 := + let~ _struct1 := M.alloc (| Value.StructRecord "generics_phantom_type::PhantomStruct" @@ -221,7 +221,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("phantom", Value.StructTuple "core::marker::PhantomData" []) ] |) in - let _struct2 := + let~ _struct2 := M.alloc (| Value.StructRecord "generics_phantom_type::PhantomStruct" diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v index bcc90e812..ed0fd1d01 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_phantom_type_test_case_unit_clarification.v @@ -265,23 +265,22 @@ Module Impl_core_ops_arith_Add_for_generics_phantom_type_test_case_unit_clarific Value.StructTuple "generics_phantom_type_test_case_unit_clarification::Length" [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_tuple_field (| self, "generics_phantom_type_test_case_unit_clarification::Length", 0 |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_tuple_field (| rhs, "generics_phantom_type_test_case_unit_clarification::Length", 0 |) - |) - |); + |)); Value.StructTuple "core::marker::PhantomData" [] ])) | _, _ => M.impossible @@ -325,19 +324,19 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let one_foot := + let~ one_foot := M.alloc (| Value.StructTuple "generics_phantom_type_test_case_unit_clarification::Length" [ M.read (| UnsupportedLiteral |); Value.StructTuple "core::marker::PhantomData" [] ] |) in - let one_meter := + let~ one_meter := M.alloc (| Value.StructTuple "generics_phantom_type_test_case_unit_clarification::Length" [ M.read (| UnsupportedLiteral |); Value.StructTuple "core::marker::PhantomData" [] ] |) in - let two_feet := + let~ two_feet := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -356,7 +355,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| one_foot |); M.read (| one_foot |) ] |) |) in - let two_meters := + let~ two_meters := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -375,8 +374,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| one_meter |); M.read (| one_meter |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -421,8 +420,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_traits.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_traits.v index 0a4dda686..8a79cc5a9 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_traits.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_traits.v @@ -60,9 +60,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let empty := M.alloc (| Value.StructTuple "generics_traits::Empty" [] |) in - let null := M.alloc (| Value.StructTuple "generics_traits::Null" [] |) in - let _ := + let~ empty := M.alloc (| Value.StructTuple "generics_traits::Empty" [] |) in + let~ null := M.alloc (| Value.StructTuple "generics_traits::Null" [] |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/generics/generics_where_clauses.v b/CoqOfRust/examples/default/examples/rust_book/generics/generics_where_clauses.v index aba801395..537f4e3ea 100644 --- a/CoqOfRust/examples/default/examples/rust_book/generics/generics_where_clauses.v +++ b/CoqOfRust/examples/default/examples/rust_book/generics/generics_where_clauses.v @@ -19,8 +19,8 @@ Module Impl_generics_where_clauses_PrintInOption_where_core_fmt_Debug_core_optio ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -88,7 +88,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let vec := + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -121,7 +121,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/examples/default/examples/rust_book/guessing_game/guessing_game.v b/CoqOfRust/examples/default/examples/rust_book/guessing_game/guessing_game.v index 781c26f4d..7543cdfa7 100644 --- a/CoqOfRust/examples/default/examples/rust_book/guessing_game/guessing_game.v +++ b/CoqOfRust/examples/default/examples/rust_book/guessing_game/guessing_game.v @@ -60,8 +60,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -81,14 +81,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let secret_number := + let~ secret_number := M.alloc (| M.call_closure (| M.get_function (| "guessing_game::gen_range", [] |), [] |) |) in M.loop (| ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -112,14 +112,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let guess := + let~ guess := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -147,7 +147,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let guess := + let~ guess := M.copy (| M.match_operator (| M.alloc (| @@ -195,8 +195,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -249,7 +249,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Less" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -275,7 +276,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Greater" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -301,11 +303,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/hello_world/formatted_print.v b/CoqOfRust/examples/default/examples/rust_book/hello_world/formatted_print.v index 0aee3927d..776d22b34 100644 --- a/CoqOfRust/examples/default/examples/rust_book/hello_world/formatted_print.v +++ b/CoqOfRust/examples/default/examples/rust_book/hello_world/formatted_print.v @@ -68,8 +68,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -99,8 +99,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -133,8 +133,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -171,8 +171,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -204,8 +204,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -244,8 +244,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -284,8 +284,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -324,8 +324,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -364,8 +364,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -435,8 +435,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -506,8 +506,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -587,8 +587,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -620,10 +620,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let number := M.copy (| UnsupportedLiteral |) in - let width := M.alloc (| Value.Integer 5 |) in - let _ := - let _ := + let~ number := M.copy (| UnsupportedLiteral |) in + let~ width := M.alloc (| Value.Integer 5 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/hello_world/hello_world.v b/CoqOfRust/examples/default/examples/rust_book/hello_world/hello_world.v index 91e395844..51597fe36 100644 --- a/CoqOfRust/examples/default/examples/rust_book/hello_world/hello_world.v +++ b/CoqOfRust/examples/default/examples/rust_book/hello_world/hello_world.v @@ -14,8 +14,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_example.v b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_example.v index d348611df..55455a0d8 100644 --- a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_example.v +++ b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_example.v @@ -12,7 +12,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_designators.v b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_designators.v index 2a4b228c7..44027aa22 100644 --- a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_designators.v +++ b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_designators.v @@ -12,8 +12,8 @@ Definition foo (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -70,8 +70,8 @@ Definition bar (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -137,16 +137,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "macro_rules_designators::foo", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "macro_rules_designators::bar", [] |), [] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -186,11 +186,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.add (| - Integer.U32, - Value.Integer 1, - Value.Integer 1 - |) + BinOp.Wrap.add Integer.U32 (Value.Integer 1) (Value.Integer 1) |) ] |) @@ -202,8 +198,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -242,25 +238,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Ty.path "u32" ] |), [ - let x := M.alloc (| Value.Integer 1 |) in + let~ x := M.alloc (| Value.Integer 1 |) in M.alloc (| - BinOp.Panic.sub (| - Integer.U32, - BinOp.Panic.add (| - Integer.U32, - BinOp.Panic.mul (| - Integer.U32, - M.read (| x |), - M.read (| x |) - |), - BinOp.Panic.mul (| - Integer.U32, - Value.Integer 2, - M.read (| x |) - |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U32 + (BinOp.Wrap.add + Integer.U32 + (BinOp.Wrap.mul + Integer.U32 + (M.read (| x |)) + (M.read (| x |))) + (BinOp.Wrap.mul + Integer.U32 + (Value.Integer 2) + (M.read (| x |)))) + (Value.Integer 1) |) ] |) diff --git a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_dsl.v b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_dsl.v index b37bcea0e..c608300c1 100644 --- a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_dsl.v +++ b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_dsl.v @@ -17,11 +17,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let val := - M.alloc (| BinOp.Panic.add (| Integer.Usize, Value.Integer 1, Value.Integer 2 |) |) in - let _ := - let _ := + let~ _ := + let~ val := + M.alloc (| BinOp.Wrap.add Integer.Usize (Value.Integer 1) (Value.Integer 2) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -59,16 +59,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let val := + let~ val := M.alloc (| - BinOp.Panic.mul (| - Integer.Usize, - BinOp.Panic.add (| Integer.Usize, Value.Integer 1, Value.Integer 2 |), - BinOp.Panic.div (| Integer.Usize, Value.Integer 3, Value.Integer 4 |) - |) + BinOp.Wrap.mul + Integer.Usize + (BinOp.Wrap.add Integer.Usize (Value.Integer 1) (Value.Integer 2)) + (BinOp.Wrap.div Integer.Usize (Value.Integer 3) (Value.Integer 4)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_overload.v b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_overload.v index ba218ed51..57d9a1cd6 100644 --- a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_overload.v +++ b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_overload.v @@ -12,8 +12,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -64,19 +64,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| LogicalOp.and (| BinOp.Pure.eq - (BinOp.Panic.add (| - Integer.I32, - Value.Integer 1, - Value.Integer 1 - |)) + (BinOp.Wrap.add + Integer.I32 + (Value.Integer 1) + (Value.Integer 1)) (Value.Integer 2), ltac:(M.monadic (BinOp.Pure.eq - (BinOp.Panic.mul (| - Integer.I32, - Value.Integer 2, - Value.Integer 2 - |)) + (BinOp.Wrap.mul + Integer.I32 + (Value.Integer 2) + (Value.Integer 2)) (Value.Integer 4))) |) |) @@ -90,8 +88,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_repeat.v b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_repeat.v index 818f157da..cb2a38594 100644 --- a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_repeat.v +++ b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_repeat.v @@ -13,8 +13,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -44,8 +44,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -76,11 +76,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "i32" ] |), [ - BinOp.Panic.add (| - Integer.I32, - Value.Integer 1, - Value.Integer 2 - |); + BinOp.Wrap.add + Integer.I32 + (Value.Integer 1) + (Value.Integer 2); Value.Integer 2 ] |) @@ -95,8 +94,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -131,11 +130,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "i32" ] |), [ - BinOp.Panic.mul (| - Integer.I32, - Value.Integer 2, - Value.Integer 3 - |); + BinOp.Wrap.mul + Integer.I32 + (Value.Integer 2) + (Value.Integer 3); Value.Integer 4 ] |) diff --git a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v index 9e9a73887..dfd1f202f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v +++ b/CoqOfRust/examples/default/examples/rust_book/macro_rules/macro_rules_variadic_interfaces.v @@ -15,11 +15,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let val := - M.alloc (| BinOp.Panic.add (| Integer.Usize, Value.Integer 1, Value.Integer 2 |) |) in - let _ := - let _ := + let~ _ := + let~ val := + M.alloc (| BinOp.Wrap.add Integer.Usize (Value.Integer 1) (Value.Integer 2) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -57,11 +57,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let val := - M.alloc (| BinOp.Panic.add (| Integer.Usize, Value.Integer 3, Value.Integer 4 |) |) in - let _ := - let _ := + let~ _ := + let~ val := + M.alloc (| BinOp.Wrap.add Integer.Usize (Value.Integer 3) (Value.Integer 4) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -99,16 +99,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let val := + let~ val := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.mul (| Integer.Usize, Value.Integer 2, Value.Integer 3 |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.mul Integer.Usize (Value.Integer 2) (Value.Integer 3)) + (Value.Integer 1) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/modules/struct_visibility.v b/CoqOfRust/examples/default/examples/rust_book/modules/struct_visibility.v index 24ecdf9dd..c509e6792 100644 --- a/CoqOfRust/examples/default/examples/rust_book/modules/struct_visibility.v +++ b/CoqOfRust/examples/default/examples/rust_book/modules/struct_visibility.v @@ -71,14 +71,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let open_box := + let~ open_box := M.alloc (| Value.StructRecord "struct_visibility::my::OpenBox" [ ("contents", M.read (| Value.String "public information" |)) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -123,7 +123,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _closed_box := + let~ _closed_box := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/modules/super_and_self.v b/CoqOfRust/examples/default/examples/rust_book/modules/super_and_self.v index 1026f18b1..23536e251 100644 --- a/CoqOfRust/examples/default/examples/rust_book/modules/super_and_self.v +++ b/CoqOfRust/examples/default/examples/rust_book/modules/super_and_self.v @@ -11,8 +11,8 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -50,8 +50,8 @@ Module cool. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -94,8 +94,8 @@ Module my. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -137,8 +137,8 @@ Module my. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -201,8 +201,8 @@ Module my. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -227,23 +227,23 @@ Module my. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::my::function", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::my::function", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::my::cool::function", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::function", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::cool::function", [] |), [] |) |) in @@ -265,7 +265,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "super_and_self::my::indirect_call", [] |), [] |) |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/modules/the_use_as_declaration.v b/CoqOfRust/examples/default/examples/rust_book/modules/the_use_as_declaration.v index 7c0eecf48..a33fa86b2 100644 --- a/CoqOfRust/examples/default/examples/rust_book/modules/the_use_as_declaration.v +++ b/CoqOfRust/examples/default/examples/rust_book/modules/the_use_as_declaration.v @@ -11,8 +11,8 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -51,8 +51,8 @@ Module deeply. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -113,15 +113,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "the_use_as_declaration::deeply::nested::function", [] |), [] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -139,16 +139,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "the_use_as_declaration::deeply::nested::function", [] |), [] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -171,7 +171,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "the_use_as_declaration::function", [] |), [] |) |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v b/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v index 6f1330870..5c647c990 100644 --- a/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v +++ b/CoqOfRust/examples/default/examples/rust_book/modules/visibility.v @@ -12,8 +12,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -56,8 +56,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -99,8 +99,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -129,7 +129,7 @@ Module my_mod. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::private_function", [] |), @@ -155,8 +155,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -198,8 +198,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -247,8 +247,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -278,7 +278,7 @@ Module my_mod. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::nested::public_function_in_nested", [] |), @@ -305,8 +305,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -356,8 +356,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -411,8 +411,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -442,15 +442,15 @@ Module my_mod. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::nested::public_function_in_my_mod", [] |), [] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -471,7 +471,7 @@ Module my_mod. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::nested::public_function_in_super_mod", [] |), @@ -498,8 +498,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -547,8 +547,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -594,8 +594,8 @@ Module my_mod. | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -645,8 +645,8 @@ Definition function (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -718,28 +718,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::function", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::function", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::indirect_access", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::nested::function", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::call_public_function_in_my_mod", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "visibility::my_mod::public_function_in_crate", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/primitives/arrays_and_slices.v b/CoqOfRust/examples/default/examples/rust_book/primitives/arrays_and_slices.v index ba4bfdd73..d8d3988d7 100644 --- a/CoqOfRust/examples/default/examples/rust_book/primitives/arrays_and_slices.v +++ b/CoqOfRust/examples/default/examples/rust_book/primitives/arrays_and_slices.v @@ -13,8 +13,8 @@ Definition analyze_slice (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let slice := M.alloc (| slice |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -58,8 +58,8 @@ Definition analyze_slice (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -170,15 +170,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let xs := + let~ xs := M.alloc (| Value.Array [ Value.Integer 1; Value.Integer 2; Value.Integer 3; Value.Integer 4; Value.Integer 5 ] |) in - let ys := M.alloc (| repeat (Value.Integer 0) 500 |) in - let _ := - let _ := + let~ ys := M.alloc (| repeat (Value.Integer 0) 500 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -222,8 +222,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -267,8 +267,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -318,8 +318,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -368,8 +368,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -390,15 +390,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "arrays_and_slices::analyze_slice", [] |), [ (* Unsize *) M.pointer_coercion xs ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -420,7 +420,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "arrays_and_slices::analyze_slice", [] |), @@ -443,8 +443,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let empty_array := M.alloc (| Value.Array [] |) in - let _ := + let~ empty_array := M.alloc (| Value.Array [] |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.alloc (| empty_array |); M.alloc (| M.alloc (| Value.Array [] |) |) ] @@ -487,7 +487,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -520,7 +520,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -581,7 +581,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -631,18 +631,17 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ ("start", Value.Integer 0); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "i32" ], "len", [] |), [ (* Unsize *) M.pointer_coercion xs ] - |), - Value.Integer 1 - |)) + |)) + (Value.Integer 1)) ] ] |) @@ -653,7 +652,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -670,7 +669,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -701,7 +701,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let xval := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -760,6 +760,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/primitives/compound_types.v b/CoqOfRust/examples/default/examples/rust_book/primitives/compound_types.v index 48fcfe112..a6b68f74e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/primitives/compound_types.v +++ b/CoqOfRust/examples/default/examples/rust_book/primitives/compound_types.v @@ -33,16 +33,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let logical := M.alloc (| Value.Bool true |) in - let a_float := M.copy (| UnsupportedLiteral |) in - let an_integer := M.alloc (| Value.Integer 5 |) in - let default_float := M.copy (| UnsupportedLiteral |) in - let default_integer := M.alloc (| Value.Integer 7 |) in - let inferred_type := M.alloc (| Value.Integer 12 |) in - let _ := M.write (| inferred_type, Value.Integer 4294967296 |) in - let mutable := M.alloc (| Value.Integer 12 |) in - let _ := M.write (| mutable, Value.Integer 21 |) in - let mutable := M.alloc (| Value.Bool true |) in + let~ logical := M.alloc (| Value.Bool true |) in + let~ a_float := M.copy (| UnsupportedLiteral |) in + let~ an_integer := M.alloc (| Value.Integer 5 |) in + let~ default_float := M.copy (| UnsupportedLiteral |) in + let~ default_integer := M.alloc (| Value.Integer 7 |) in + let~ inferred_type := M.alloc (| Value.Integer 12 |) in + let~ _ := M.write (| inferred_type, Value.Integer 4294967296 |) in + let~ mutable := M.alloc (| Value.Integer 12 |) in + let~ _ := M.write (| mutable, Value.Integer 21 |) in + let~ mutable := M.alloc (| Value.Bool true |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/primitives/literals_operators.v b/CoqOfRust/examples/default/examples/rust_book/primitives/literals_operators.v index c8fafaa49..d355d86cc 100644 --- a/CoqOfRust/examples/default/examples/rust_book/primitives/literals_operators.v +++ b/CoqOfRust/examples/default/examples/rust_book/primitives/literals_operators.v @@ -31,8 +31,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -60,11 +60,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.add (| - Integer.U32, - Value.Integer 1, - Value.Integer 2 - |) + BinOp.Wrap.add Integer.U32 (Value.Integer 1) (Value.Integer 2) |) ] |) @@ -76,8 +72,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -105,11 +101,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - Value.Integer 1, - Value.Integer 2 - |) + BinOp.Wrap.sub Integer.I32 (Value.Integer 1) (Value.Integer 2) |) ] |) @@ -121,8 +113,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -168,8 +160,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -215,8 +207,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -255,8 +247,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -333,8 +325,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -411,8 +403,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -489,8 +481,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -517,11 +509,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new_display", [ Ty.path "u32" ] |), - [ - M.alloc (| - BinOp.Panic.shl (| Value.Integer 1, Value.Integer 5 |) - |) - ] + [ M.alloc (| BinOp.Wrap.shl (Value.Integer 1) (Value.Integer 5) |) ] |) ] |)) @@ -531,8 +519,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -561,10 +549,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "new_lower_hex", [ Ty.path "u32" ] |), - [ - M.alloc (| - BinOp.Panic.shr (| Value.Integer 128, Value.Integer 2 |) - |) + [ M.alloc (| BinOp.Wrap.shr (Value.Integer 128) (Value.Integer 2) |) ] |) ] @@ -575,8 +560,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v b/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v index 1d6cc89a7..d994b219b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v +++ b/CoqOfRust/examples/default/examples/rust_book/primitives/tuples.v @@ -135,7 +135,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let long_tuple := + let~ long_tuple := M.alloc (| Value.Tuple [ @@ -153,8 +153,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := Value.Bool true ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -193,8 +193,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -233,7 +233,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let tuple_of_tuples := + let~ tuple_of_tuples := M.alloc (| Value.Tuple [ @@ -242,8 +242,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := Value.Integer (-2) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -289,9 +289,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let pair_ := M.alloc (| Value.Tuple [ Value.Integer 1; Value.Bool true ] |) in - let _ := - let _ := + let~ pair_ := M.alloc (| Value.Tuple [ Value.Integer 1; Value.Bool true ] |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -327,8 +327,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -374,8 +374,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -414,8 +414,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -454,7 +454,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let tuple := + let~ tuple := M.alloc (| Value.Tuple [ @@ -477,8 +477,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let b := M.copy (| γ0_1 |) in let c := M.copy (| γ0_2 |) in let d := M.copy (| γ0_3 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -548,7 +548,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let matrix := + let~ matrix := M.alloc (| Value.StructTuple "tuples::Matrix" @@ -559,8 +559,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| UnsupportedLiteral |) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing.v index c7189636c..6f77412f4 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing.v @@ -12,8 +12,8 @@ Definition eat_box_i32 (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let boxed_i32 := M.alloc (| boxed_i32 |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -74,8 +74,8 @@ Definition borrow_i32 (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let borrowed_i32 := M.alloc (| borrowed_i32 |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -155,7 +155,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let boxed_i32 := + let~ boxed_i32 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -168,24 +168,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 5 ] |) |) in - let stacked_i32 := M.alloc (| Value.Integer 6 |) in - let _ := + let~ stacked_i32 := M.alloc (| Value.Integer 6 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_borrowing::borrow_i32", [] |), [ M.read (| boxed_i32 |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_borrowing::borrow_i32", [] |), [ stacked_i32 ] |) |) in - let _ := - let _ref_to_i32 := M.alloc (| M.read (| boxed_i32 |) |) in - let _ := + let~ _ := + let~ _ref_to_i32 := M.alloc (| M.read (| boxed_i32 |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_borrowing::borrow_i32", [] |), @@ -193,7 +193,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_borrowing::eat_box_i32", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v index 97648c9f6..a7c523d32 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_aliasing.v @@ -70,16 +70,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let point := + let~ point := M.alloc (| Value.StructRecord "scoping_rules_borrowing_aliasing::Point" [ ("x", Value.Integer 0); ("y", Value.Integer 0); ("z", Value.Integer 0) ] |) in - let borrowed_point := M.alloc (| point |) in - let another_borrow := M.alloc (| point |) in - let _ := - let _ := + let~ borrowed_point := M.alloc (| point |) in + let~ another_borrow := M.alloc (| point |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -154,8 +154,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -230,8 +230,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let mutable_borrow := M.alloc (| point |) in - let _ := + let~ mutable_borrow := M.alloc (| point |) in + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| mutable_borrow |), @@ -240,7 +240,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), Value.Integer 5 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| mutable_borrow |), @@ -249,7 +249,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), Value.Integer 2 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| mutable_borrow |), @@ -258,8 +258,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), Value.Integer 1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -334,9 +334,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let new_borrowed_point := M.alloc (| point |) in - let _ := - let _ := + let~ new_borrowed_point := M.alloc (| point |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v index 97b296b98..32f827121 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_mutablity.v @@ -74,8 +74,8 @@ Definition borrow_book (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let book := M.alloc (| book |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -155,7 +155,7 @@ Definition new_edition (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let book := M.alloc (| book |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| book |), @@ -164,8 +164,8 @@ Definition new_edition (τ : list Ty.t) (α : list Value.t) : M := |), Value.Integer 2014 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -265,7 +265,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let immutabook := + let~ immutabook := M.alloc (| Value.StructRecord "scoping_rules_borrowing_mutablity::Book" @@ -276,22 +276,22 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("year", Value.Integer 1979) ] |) in - let mutabook := M.copy (| immutabook |) in - let _ := + let~ mutabook := M.copy (| immutabook |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_borrowing_mutablity::borrow_book", [] |), [ immutabook ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_borrowing_mutablity::borrow_book", [] |), [ mutabook ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_borrowing_mutablity::new_edition", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v index fe765b5aa..e8678d864 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_borrowing_the_ref_pattern.v @@ -103,16 +103,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let c := M.alloc (| Value.UnicodeChar 81 |) in + let~ c := M.alloc (| Value.UnicodeChar 81 |) in M.match_operator (| c, [ fun γ => ltac:(M.monadic (let ref_c1 := M.alloc (| γ |) in - let ref_c2 := M.alloc (| c |) in - let _ := - let _ := + let~ ref_c2 := M.alloc (| c |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -161,13 +161,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let point := + let~ point := M.alloc (| Value.StructRecord "scoping_rules_borrowing_the_ref_pattern::Point" [ ("x", Value.Integer 0); ("y", Value.Integer 0) ] |) in - let _copy_of_x := + let~ _copy_of_x := M.copy (| M.match_operator (| point, @@ -191,8 +191,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let mutable_point := M.copy (| point |) in - let _ := + let~ mutable_point := M.copy (| point |) in + let~ _ := M.match_operator (| mutable_point, [ @@ -211,12 +211,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "y" |) in let mut_ref_to_y := M.alloc (| γ0_1 |) in - let _ := M.write (| M.read (| mut_ref_to_y |), Value.Integer 1 |) in + let~ _ := M.write (| M.read (| mut_ref_to_y |), Value.Integer 1 |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -280,8 +280,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -345,7 +345,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let mutable_tuple := + let~ mutable_tuple := M.alloc (| Value.Tuple [ @@ -362,7 +362,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := Value.Integer 3 ] |) in - let _ := + let~ _ := M.match_operator (| mutable_tuple, [ @@ -371,12 +371,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_tuple_field (| γ, 0 |) in let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let last := M.alloc (| γ0_1 |) in - let _ := M.write (| M.read (| last |), Value.Integer 2 |) in + let~ _ := M.write (| M.read (| last |), Value.Integer 2 |) in M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v index e9ec861b7..fa7b5d052 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes.v @@ -27,11 +27,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let i := M.alloc (| Value.Integer 3 |) in - let _ := - let borrow1 := M.alloc (| i |) in - let _ := - let _ := + let~ i := M.alloc (| Value.Integer 3 |) in + let~ _ := + let~ borrow1 := M.alloc (| i |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -69,9 +69,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let borrow2 := M.alloc (| i |) in - let _ := - let _ := + let~ borrow2 := M.alloc (| i |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v index 9eee568fb..ecff315bb 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_bounds.v @@ -66,8 +66,8 @@ Definition print (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let t := M.alloc (| t |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -127,8 +127,8 @@ Definition print_ref (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let t := M.alloc (| t |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -188,9 +188,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 7 |) in - let ref_x := M.alloc (| Value.StructTuple "scoping_rules_lifetimes_bounds::Ref" [ x ] |) in - let _ := + let~ x := M.alloc (| Value.Integer 7 |) in + let~ ref_x := M.alloc (| Value.StructTuple "scoping_rules_lifetimes_bounds::Ref" [ x ] |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -200,7 +200,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ ref_x ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v index f778e9a07..e03987ac4 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_coercion.v @@ -62,11 +62,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let first := M.alloc (| Value.Integer 2 |) in - let _ := - let second := M.alloc (| Value.Integer 3 |) in - let _ := - let _ := + let~ first := M.alloc (| Value.Integer 2 |) in + let~ _ := + let~ second := M.alloc (| Value.Integer 3 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -115,8 +115,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v index fabc6eb8b..d32d56f35 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_elision.v @@ -12,8 +12,8 @@ Definition elided_input (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -71,8 +71,8 @@ Definition annotated_input (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -169,23 +169,23 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 3 |) in - let _ := + let~ x := M.alloc (| Value.Integer 3 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_elision::elided_input", [] |), [ x ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_elision::annotated_input", [] |), [ x ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -234,8 +234,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v index 1f1edc387..b73046e09 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_functions.v @@ -12,8 +12,8 @@ Definition print_one (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -70,9 +70,9 @@ Definition add_one (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let x := M.alloc (| x |) in M.read (| - let _ := + let~ _ := let β := M.read (| x |) in - M.write (| β, BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 1 |) |) in + M.write (| β, BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -92,8 +92,8 @@ Definition print_multi (τ : list Ty.t) (α : list Value.t) : M := (let x := M.alloc (| x |) in let y := M.alloc (| y |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -187,45 +187,45 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 7 |) in - let y := M.alloc (| Value.Integer 9 |) in - let _ := + let~ x := M.alloc (| Value.Integer 7 |) in + let~ y := M.alloc (| Value.Integer 9 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_functions::print_one", [] |), [ x ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_functions::print_multi", [] |), [ x; y ] |) |) in - let z := + let~ z := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_functions::pass_x", [] |), [ x; y ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_functions::print_one", [] |), [ M.read (| z |) ] |) |) in - let t := M.alloc (| Value.Integer 3 |) in - let _ := + let~ t := M.alloc (| Value.Integer 3 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_functions::add_one", [] |), [ t ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_lifetimes_functions::print_one", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v index bfa38a9b3..749f5f78c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_methods.v @@ -22,14 +22,14 @@ Module Impl_scoping_rules_lifetimes_methods_Owner. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_tuple_field (| M.read (| self |), "scoping_rules_lifetimes_methods::Owner", 0 |) in - M.write (| β, BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 1 |) |) in + M.write (| β, BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -48,8 +48,8 @@ Module Impl_scoping_rules_lifetimes_methods_Owner. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -113,11 +113,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let owner := + let~ owner := M.alloc (| Value.StructTuple "scoping_rules_lifetimes_methods::Owner" [ Value.Integer 18 ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -128,7 +128,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ owner ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v index a334fd4de..cac911ece 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_reference_lifetime_static.v @@ -59,10 +59,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let static_string := M.copy (| Value.String "I'm in read-only memory" |) in - let _ := - let _ := + let~ _ := + let~ static_string := M.copy (| Value.String "I'm in read-only memory" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -102,9 +102,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let lifetime_num := M.alloc (| Value.Integer 9 |) in - let coerced_static := + let~ _ := + let~ lifetime_num := M.alloc (| Value.Integer 9 |) in + let~ coerced_static := M.alloc (| M.call_closure (| M.get_function (| @@ -114,8 +114,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ lifetime_num ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -155,8 +155,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v index 512607ec8..ecd9c8ff4 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_structs.v @@ -227,24 +227,24 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 18 |) in - let y := M.alloc (| Value.Integer 15 |) in - let single := + let~ x := M.alloc (| Value.Integer 18 |) in + let~ y := M.alloc (| Value.Integer 15 |) in + let~ single := M.alloc (| Value.StructTuple "scoping_rules_lifetimes_structs::Borrowed" [ x ] |) in - let double := + let~ double := M.alloc (| Value.StructRecord "scoping_rules_lifetimes_structs::NamedBorrowed" [ ("x", x); ("y", y) ] |) in - let reference := + let~ reference := M.alloc (| Value.StructTuple "scoping_rules_lifetimes_structs::Either::Ref" [ x ] |) in - let number := + let~ number := M.alloc (| Value.StructTuple "scoping_rules_lifetimes_structs::Either::Num" [ M.read (| y |) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -283,8 +283,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -323,8 +323,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -363,8 +363,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v index 8653cab34..a18977e86 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_lifetimes_traits.v @@ -87,7 +87,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let b := + let~ b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -100,8 +100,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v index 3e9ab2f4f..f7a6cbd93 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules.v @@ -14,8 +14,8 @@ Definition destroy_box (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let c := M.alloc (| c |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -108,10 +108,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 5 |) in - let y := M.copy (| x |) in - let _ := - let _ := + let~ x := M.alloc (| Value.Integer 5 |) in + let~ y := M.copy (| x |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -159,7 +159,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let a := + let~ a := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -172,8 +172,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 5 ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -216,8 +216,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let b := M.copy (| a |) in - let _ := + let~ b := M.copy (| a |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_ownership_and_rules::destroy_box", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v index a1cd3c185..bdc067e27 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_mutablity.v @@ -26,7 +26,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let immutable_box := + let~ immutable_box := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -39,8 +39,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 5 ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -83,9 +83,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let mutable_box := M.copy (| immutable_box |) in - let _ := - let _ := + let~ mutable_box := M.copy (| immutable_box |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -128,9 +128,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := M.write (| M.read (| mutable_box |), Value.Integer 4 |) in - let _ := - let _ := + let~ _ := M.write (| M.read (| mutable_box |), Value.Integer 4 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v index 9704c240e..47d1f5f49 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_ownership_and_rules_partial_moves.v @@ -33,7 +33,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let person := + let~ person := M.alloc (| Value.StructRecord "scoping_rules_ownership_and_rules_partial_moves::main::Person" @@ -81,8 +81,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in let name := M.copy (| γ0_0 |) in let age := M.alloc (| γ0_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -133,8 +133,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -177,8 +177,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii.v index e43bbea9a..ce523bf48 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii.v @@ -14,7 +14,7 @@ Definition create_box (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _box1 := + let~ _box1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -61,7 +61,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _box2 := + let~ _box2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -74,8 +74,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 5 ] |) |) in - let _ := - let _box3 := + let~ _ := + let~ _box3 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -113,7 +113,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -130,7 +130,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -139,7 +140,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "scoping_rules_raii::create_box", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v index b217373aa..eb8ff3567 100644 --- a/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v +++ b/CoqOfRust/examples/default/examples/rust_book/scoping_rules/scoping_rules_raii_desctructor.v @@ -22,8 +22,8 @@ Module Impl_core_ops_drop_Drop_for_scoping_rules_raii_desctructor_ToDrop. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -71,9 +71,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.StructTuple "scoping_rules_raii_desctructor::ToDrop" [] |) in - let _ := - let _ := + let~ x := M.alloc (| Value.StructTuple "scoping_rules_raii_desctructor::ToDrop" [] |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/arc.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/arc.v index 07f11a5da..4068cecdd 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/arc.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/arc.v @@ -27,7 +27,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let apple := + let~ apple := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -40,7 +40,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| Value.String "the same apple" |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -65,7 +65,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -82,7 +82,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -91,7 +93,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "core::option::Option::Some", 0 |) in - let apple := + let~ apple := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109,7 +111,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ apple ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -128,8 +130,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -212,7 +214,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::thread::sleep", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/box_stack_heap.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/box_stack_heap.v index 182440aac..f5e6be085 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/box_stack_heap.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/box_stack_heap.v @@ -206,11 +206,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let point := + let~ point := M.alloc (| M.call_closure (| M.get_function (| "box_stack_heap::origin", [] |), [] |) |) in - let rectangle := + let~ rectangle := M.alloc (| Value.StructRecord "box_stack_heap::Rectangle" @@ -224,7 +224,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ]) ] |) in - let boxed_rectangle := + let~ boxed_rectangle := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -251,7 +251,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let boxed_point := + let~ boxed_point := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -264,7 +264,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "box_stack_heap::origin", [] |), [] |) ] |) |) in - let box_in_a_box := + let~ box_in_a_box := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -282,8 +282,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "box_stack_heap::boxed_origin", [] |), [] |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -332,8 +332,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -382,8 +382,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -439,8 +439,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -496,8 +496,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -558,9 +558,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let unboxed_point := M.copy (| M.read (| boxed_point |) |) in - let _ := - let _ := + let~ unboxed_point := M.copy (| M.read (| boxed_point |) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map.v index 3fb2f08f1..2439d6822 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map.v @@ -95,7 +95,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let contacts := + let~ contacts := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -112,7 +112,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -129,7 +129,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ contacts; M.read (| Value.String "Daniel" |); M.read (| Value.String "798-1364" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -146,7 +146,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ contacts; M.read (| Value.String "Ashley" |); M.read (| Value.String "645-7689" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -163,7 +163,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ contacts; M.read (| Value.String "Katie" |); M.read (| Value.String "435-8291" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -180,7 +180,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ contacts; M.read (| Value.String "Robert" |); M.read (| Value.String "956-1745" |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -205,7 +205,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let γ0_0 := M.read (| γ0_0 |) in let number := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -257,7 +257,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -284,7 +284,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -301,7 +301,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ contacts; M.read (| Value.String "Daniel" |); M.read (| Value.String "164-6743" |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -326,7 +326,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let γ0_0 := M.read (| γ0_0 |) in let number := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -378,7 +378,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -405,7 +405,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -462,7 +462,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -484,7 +484,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -498,8 +499,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let contact := M.copy (| γ1_0 |) in let γ1_1 := M.read (| γ1_1 |) in let number := M.copy (| γ1_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v index 6a85aab2a..e3dee0bff 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_alternate_or_custom_key_types.v @@ -145,7 +145,7 @@ Module Impl_core_hash_Hash_for_hash_map_alternate_or_custom_key_types_Account. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -243,8 +243,8 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := let username := M.alloc (| username |) in let password := M.alloc (| password |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -281,8 +281,8 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -319,8 +319,8 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -340,7 +340,7 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let logon := + let~ logon := M.alloc (| Value.StructRecord "hash_map_alternate_or_custom_key_types::Account" @@ -369,8 +369,8 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let account_info := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -394,8 +394,8 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -444,8 +444,8 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -497,7 +497,7 @@ Definition try_logon (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -556,7 +556,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let accounts := + let~ accounts := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -573,7 +573,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let account := + let~ account := M.alloc (| Value.StructRecord "hash_map_alternate_or_custom_key_types::Account" @@ -582,7 +582,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("password", M.read (| Value.String "password123" |)) ] |) in - let account_info := + let~ account_info := M.alloc (| Value.StructRecord "hash_map_alternate_or_custom_key_types::AccountInfo" @@ -591,7 +591,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("email", M.read (| Value.String "j.everyman@email.com" |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -608,7 +608,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ accounts; M.read (| account |); M.read (| account_info |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "hash_map_alternate_or_custom_key_types::try_logon", [] |), @@ -619,7 +619,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "hash_map_alternate_or_custom_key_types::try_logon", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_hash_set.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_hash_set.v index 9cde1f671..a6613eb56 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_hash_set.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/hash_map_hash_set.v @@ -46,7 +46,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := + let~ a := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -109,7 +109,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -172,7 +172,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -205,7 +205,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -238,7 +238,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -251,8 +251,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ b; Value.Integer 5 ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -292,8 +292,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -333,8 +333,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -414,8 +414,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -498,8 +498,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -582,8 +582,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/option.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/option.v index c0029fbd5..50497edad 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/option.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/option.v @@ -33,8 +33,7 @@ Definition checked_division (τ : list Ty.t) (α : list Value.t) : M := (M.alloc (| Value.StructTuple "core::option::Option::Some" - [ BinOp.Panic.div (| Integer.I32, M.read (| dividend |), M.read (| divisor |) |) - ] + [ BinOp.Wrap.div Integer.I32 (M.read (| dividend |)) (M.read (| divisor |)) ] |))) ] |) @@ -72,7 +71,8 @@ Definition try_division (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (let _ := + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -129,7 +129,7 @@ Definition try_division (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let quotient := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -225,28 +225,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "option::try_division", [] |), [ Value.Integer 4; Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "option::try_division", [] |), [ Value.Integer 1; Value.Integer 0 ] |) |) in - let none := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let _equivalent_none := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in - let optional_float := + let~ none := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ _equivalent_none := M.alloc (| Value.StructTuple "core::option::Option::None" [] |) in + let~ optional_float := M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| UnsupportedLiteral |) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -305,8 +305,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/panic.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/panic.v index 4c38e6643..3b1a1e4e5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/panic.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/panic.v @@ -40,7 +40,7 @@ Definition division (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| - BinOp.Panic.div (| Integer.I32, M.read (| dividend |), M.read (| divisor |) |) + BinOp.Wrap.div Integer.I32 (M.read (| dividend |)) (M.read (| divisor |)) |))) ] |) @@ -68,7 +68,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _x := + let~ _x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -81,15 +81,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "panic::division", [] |), [ Value.Integer 3; Value.Integer 0 ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/rc.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/rc.v index 8e2ff6831..a68d90828 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/rc.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/rc.v @@ -43,7 +43,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let rc_examples := + let~ rc_examples := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -56,8 +56,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| Value.String "Rc examples" |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -77,7 +77,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let rc_a := + let~ rc_a := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -90,8 +90,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| rc_examples |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -146,9 +146,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := - let _ := + let~ _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -173,7 +173,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let rc_b := + let~ rc_b := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -188,8 +188,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ rc_a ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -244,8 +244,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -300,8 +300,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -365,8 +365,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -432,8 +432,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -479,8 +479,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -506,8 +506,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -562,8 +562,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.v index 988709d19..f72bd2034 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result.v @@ -48,14 +48,26 @@ Module checked. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| γ, "result::checked::MathError::DivisionByZero" |) in M.alloc (| M.read (| Value.String "DivisionByZero" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "result::checked::MathError::NonPositiveLogarithm" + |) in M.alloc (| M.read (| Value.String "NonPositiveLogarithm" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "result::checked::MathError::NegativeSquareRoot" + |) in M.alloc (| M.read (| Value.String "NegativeSquareRoot" |) |))) ] |) @@ -119,7 +131,7 @@ Module checked. (M.alloc (| Value.StructTuple "core::result::Result::Ok" - [ BinOp.Panic.div (| Integer.Usize, M.read (| x |), M.read (| y |) |) ] + [ BinOp.Wrap.div Integer.Usize (M.read (| x |)) (M.read (| y |)) ] |))) ] |) @@ -458,8 +470,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.v index 0b62e6f1f..c300fc69e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/result_chaining_with_question_mark.v @@ -48,14 +48,29 @@ Module checked. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "result_chaining_with_question_mark::checked::MathError::DivisionByZero" + |) in M.alloc (| M.read (| Value.String "DivisionByZero" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "result_chaining_with_question_mark::checked::MathError::NonPositiveLogarithm" + |) in M.alloc (| M.read (| Value.String "NonPositiveLogarithm" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "result_chaining_with_question_mark::checked::MathError::NegativeSquareRoot" + |) in M.alloc (| M.read (| Value.String "NegativeSquareRoot" |) |))) ] |) @@ -120,7 +135,7 @@ Module checked. (M.alloc (| Value.StructTuple "core::result::Result::Ok" - [ BinOp.Panic.div (| Integer.Usize, M.read (| x |), M.read (| y |) |) ] + [ BinOp.Wrap.div Integer.Usize (M.read (| x |)) (M.read (| y |)) ] |))) ] |) @@ -260,7 +275,7 @@ Module checked. M.catch_return (| ltac:(M.monadic (M.read (| - let ratio := + let~ ratio := M.copy (| M.match_operator (| M.alloc (| @@ -343,7 +358,7 @@ Module checked. ] |) |) in - let ln := + let~ ln := M.copy (| M.match_operator (| M.alloc (| @@ -486,13 +501,29 @@ Module checked. why, [ fun γ => - ltac:(M.monadic (Value.String "logarithm of non-positive number")); + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "result_chaining_with_question_mark::checked::MathError::NonPositiveLogarithm" + |) in + Value.String "logarithm of non-positive number")); fun γ => ltac:(M.monadic - (M.alloc (| M.read (| Value.String "division by zero" |) |))); + (let _ := + M.is_struct_tuple (| + γ, + "result_chaining_with_question_mark::checked::MathError::DivisionByZero" + |) in + M.alloc (| M.read (| Value.String "division by zero" |) |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "result_chaining_with_question_mark::checked::MathError::NegativeSquareRoot" + |) in + M.alloc (| M.read (| Value.String "square root of negative number" |) |))) ] @@ -506,7 +537,7 @@ Module checked. (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let value := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -565,7 +596,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "result_chaining_with_question_mark::checked::op", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings.v index a1d5b020f..71c805d4f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings.v @@ -48,9 +48,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let pangram := M.copy (| Value.String "the quick brown fox jumps over the lazy dog" |) in - let _ := - let _ := + let~ pangram := M.copy (| Value.String "the quick brown fox jumps over the lazy dog" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -86,8 +86,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -107,7 +107,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -146,7 +146,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -165,7 +165,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -175,8 +177,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let word := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -230,7 +232,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let chars := + let~ chars := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -252,7 +254,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -276,7 +278,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -289,14 +291,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ chars ] |) |) in - let string := + let~ string := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), [] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -319,7 +321,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -338,7 +340,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -348,7 +352,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let c := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -359,7 +363,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ string; M.read (| c |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -377,13 +381,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let chars_to_trim := + let~ chars_to_trim := M.alloc (| (* Unsize *) M.pointer_coercion (M.alloc (| Value.Array [ Value.UnicodeChar 32; Value.UnicodeChar 44 ] |)) |) in - let trimmed_str := + let~ trimmed_str := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -406,8 +410,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -446,7 +450,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let alice := + let~ alice := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -459,7 +463,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.read (| Value.String "I like dogs" |) ] |) |) in - let bob := + let~ bob := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -483,8 +487,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -523,8 +527,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v index af71b97dc..9c3aa6bc6 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_byte_strings_as_non_utf8.v @@ -42,9 +42,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let bytestring := M.alloc (| M.read (| UnsupportedLiteral |) |) in - let _ := - let _ := + let~ bytestring := M.alloc (| M.read (| UnsupportedLiteral |) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -87,9 +87,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let escaped := M.copy (| UnsupportedLiteral |) in - let _ := - let _ := + let~ escaped := M.copy (| UnsupportedLiteral |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -132,9 +132,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let raw_bytestring := M.copy (| UnsupportedLiteral |) in - let _ := - let _ := + let~ raw_bytestring := M.copy (| UnsupportedLiteral |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -174,7 +174,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -190,8 +190,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let my_str := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -238,9 +238,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _quotes := M.copy (| UnsupportedLiteral |) in - let shift_jis := M.copy (| UnsupportedLiteral |) in - let _ := + let~ _quotes := M.copy (| UnsupportedLiteral |) in + let~ shift_jis := M.copy (| UnsupportedLiteral |) in + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -254,7 +254,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let my_str := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -302,7 +302,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let e := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_literals_and_escapes.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_literals_and_escapes.v index 462a8e400..ba7fc92ce 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_literals_and_escapes.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_literals_and_escapes.v @@ -28,9 +28,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let byte_escape := M.copy (| Value.String "I'm writing Rust!" |) in - let _ := - let _ := + let~ byte_escape := M.copy (| Value.String "I'm writing Rust!" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -69,10 +69,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let unicode_codepoint := M.copy (| Value.String (String.String "029" "") |) in - let character_name := M.copy (| Value.String """DOUBLE-STRUCK CAPITAL R""" |) in - let _ := - let _ := + let~ unicode_codepoint := M.copy (| Value.String (String.String "029" "") |) in + let~ character_name := M.copy (| Value.String """DOUBLE-STRUCK CAPITAL R""" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -120,15 +120,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let long_string := + let~ long_string := M.copy (| Value.String "String literals can span multiple lines. The linebreak and indentation here -><- can be escaped too!" |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_raw_string_literals.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_raw_string_literals.v index 2819e49a1..b9187ed0e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_raw_string_literals.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/strings_raw_string_literals.v @@ -22,9 +22,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let raw_str := M.copy (| Value.String "Escapes don't work here: \x3F \u{211D}" |) in - let _ := - let _ := + let~ raw_str := M.copy (| Value.String "Escapes don't work here: \x3F \u{211D}" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -60,9 +60,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let quotes := M.copy (| Value.String "And then I said: ""There is no escape!""" |) in - let _ := - let _ := + let~ quotes := M.copy (| Value.String "And then I said: ""There is no escape!""" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -98,10 +98,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let longer_delimiter := + let~ longer_delimiter := M.copy (| Value.String "A string with ""# in it. And even ""##!" |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_library_types/vectors.v b/CoqOfRust/examples/default/examples/rust_book/std_library_types/vectors.v index e06ddaee7..83c1802ed 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_library_types/vectors.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_library_types/vectors.v @@ -58,7 +58,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let collected_iterator := + let~ collected_iterator := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -79,8 +79,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -123,7 +123,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let xs := + let~ xs := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -156,8 +156,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -200,8 +200,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -221,7 +221,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -234,8 +234,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ xs; Value.Integer 4 ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -275,8 +275,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -328,8 +328,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -381,8 +381,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -434,8 +434,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -453,7 +453,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -496,7 +496,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -513,7 +513,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -523,8 +525,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let x := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -578,7 +580,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -634,7 +636,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -654,7 +656,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -667,8 +671,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let x := M.copy (| γ1_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -731,7 +735,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -774,7 +778,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -791,7 +795,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -801,15 +807,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let x := M.copy (| γ0_0 |) in - let _ := + let~ _ := let β := M.read (| x |) in M.write (| β, - BinOp.Panic.mul (| - Integer.I32, - M.read (| β |), - Value.Integer 3 - |) + BinOp.Wrap.mul Integer.I32 (M.read (| β |)) (Value.Integer 3) |) in M.alloc (| Value.Tuple [] |))) ] @@ -818,8 +820,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/channels.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/channels.v index ac5bf441e..1d8780035 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/channels.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/channels.v @@ -66,7 +66,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let tx := M.copy (| γ0_0 |) in let rx := M.copy (| γ0_1 |) in - let children := + let~ children := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -82,7 +82,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -113,7 +113,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -132,7 +132,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -144,7 +149,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let id := M.copy (| γ0_0 |) in - let thread_tx := + let~ thread_tx := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -159,7 +164,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ tx ] |) |) in - let child := + let~ child := M.alloc (| M.call_closure (| M.get_function (| @@ -181,7 +186,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -216,8 +221,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -285,7 +290,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -310,7 +315,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let ids := + let~ ids := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -331,7 +336,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -362,7 +367,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -381,7 +386,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -392,7 +402,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -432,7 +442,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -458,7 +468,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -482,7 +492,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -494,7 +509,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let child := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -536,8 +551,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes.v index b582c9aec..d98109e3c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes.v @@ -24,7 +24,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let output := + let~ output := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -147,7 +147,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -177,8 +177,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -225,7 +225,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let s := + (let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -255,8 +255,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_pipes.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_pipes.v index 2cd5c88bf..c22d09206 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_pipes.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_pipes.v @@ -46,7 +46,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let process := + let~ process := M.copy (| M.match_operator (| M.alloc (| @@ -153,7 +153,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -245,7 +245,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -271,7 +271,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), @@ -362,7 +362,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_wait.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_wait.v index 086a0f2f9..19ea07f0c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_wait.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/child_processes_wait.v @@ -14,7 +14,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let child := + let~ child := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -53,7 +53,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _result := + let~ _result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -71,8 +71,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_create.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_create.v index 668787c57..2f83bddb3 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_create.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_create.v @@ -38,21 +38,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let path := + let~ path := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "new", [ Ty.path "str" ] |), [ M.read (| Value.String "lorem_ipsum.txt" |) ] |) |) in - let display := + let~ display := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "display", [] |), [ M.read (| path |) ] |) |) in - let file := + let~ file := M.copy (| M.match_operator (| M.alloc (| @@ -213,7 +213,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_open.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_open.v index be5e98922..08db86307 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_open.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_open.v @@ -28,21 +28,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let path := + let~ path := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "new", [ Ty.path "str" ] |), [ M.read (| Value.String "hello.txt" |) ] |) |) in - let display := + let~ display := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "display", [] |), [ M.read (| path |) ] |) |) in - let file := + let~ file := M.copy (| M.match_operator (| M.alloc (| @@ -124,7 +124,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), @@ -204,7 +204,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines.v index 09467233a..ab196976a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines.v @@ -18,7 +18,7 @@ Definition read_lines (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (M.never_to_any (| M.read (| - let file := + let~ file := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -88,7 +88,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let lines := + let~ lines := M.alloc (| M.call_closure (| M.get_function (| "file_io_read_lines::read_lines", [] |), @@ -132,7 +132,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -155,7 +155,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -165,8 +166,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let line := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v index 41a2f31ad..54be5385e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/file_io_read_lines_efficient_method.v @@ -18,7 +18,7 @@ Definition read_lines (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let file := + let~ file := M.copy (| M.match_operator (| M.alloc (| @@ -198,7 +198,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -221,7 +221,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -246,8 +248,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let ip := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/filesystem_operations.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/filesystem_operations.v index ee8f1b7b7..0e03dab2b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/filesystem_operations.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/filesystem_operations.v @@ -19,7 +19,7 @@ Definition cat (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let f := + let~ f := M.copy (| M.match_operator (| M.alloc (| @@ -98,7 +98,7 @@ Definition cat (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloc::string::String", "new", [] |), @@ -155,7 +155,7 @@ Definition echo (τ : list Ty.t) (α : list Value.t) : M := M.catch_return (| ltac:(M.monadic (M.read (| - let f := + let~ f := M.copy (| M.match_operator (| M.alloc (| @@ -394,8 +394,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -413,7 +413,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -430,7 +430,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let why := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -489,8 +489,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -510,7 +510,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -547,8 +547,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let why := M.copy (| γ |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -611,8 +611,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -632,7 +632,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -662,8 +662,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let why := M.copy (| γ |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -726,8 +726,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -747,7 +747,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -783,8 +783,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let why := M.copy (| γ |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -847,8 +847,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -868,7 +868,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -876,7 +876,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -916,8 +916,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let why := M.copy (| γ |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -992,8 +992,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1011,7 +1011,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1034,7 +1034,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let why := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1091,7 +1091,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Ok", 0 |) in let s := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1134,8 +1134,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1153,7 +1153,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1170,7 +1170,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::result::Result::Err", 0 |) in let why := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1247,7 +1247,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1264,7 +1264,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -1276,8 +1281,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let path := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1361,8 +1366,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |)))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1380,7 +1385,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1410,8 +1415,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let why := M.copy (| γ |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1474,8 +1479,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -1493,7 +1498,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1523,8 +1528,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let why := M.copy (| γ |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.v index 14237c70c..a8938619a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/foreign_function_interface.v @@ -47,21 +47,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let z := + let~ z := M.alloc (| Value.StructRecord "foreign_function_interface::Complex" [ ("re", M.read (| UnsupportedLiteral |)); ("im", M.read (| UnsupportedLiteral |)) ] |) in - let z_sqrt := + let~ z_sqrt := M.alloc (| M.call_closure (| M.get_function (| "foreign_function_interface::csqrtf", [] |), [ M.read (| z |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -109,8 +109,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/path.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/path.v index 3c1024241..8ef357e59 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/path.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/path.v @@ -32,21 +32,21 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let path := + let~ path := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "new", [ Ty.path "str" ] |), [ M.read (| Value.String "." |) ] |) |) in - let _display := + let~ _display := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::path::Path", "display", [] |), [ M.read (| path |) ] |) |) in - let new_path := + let~ new_path := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -80,7 +80,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -91,7 +91,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ new_path; M.read (| Value.String "c" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -102,7 +102,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ new_path; M.read (| Value.String "myfile.tar.gz" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -134,7 +134,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| @@ -150,7 +151,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let γ0_0 := M.SubPointer.get_struct_tuple_field (| γ, "core::option::Option::Some", 0 |) in let s := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments.v index cfadc3415..8ec7fafea 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments.v @@ -19,7 +19,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let args := + let~ args := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -36,8 +36,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ M.call_closure (| M.get_function (| "std::env::args", [] |), [] |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -92,8 +92,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -125,9 +125,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -139,9 +139,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |), [ args ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) |) ] |); diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments_parsing.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments_parsing.v index 0e7561f16..082af8819 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments_parsing.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/program_arguments_parsing.v @@ -12,8 +12,8 @@ Definition increase (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let number := M.alloc (| number |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -41,11 +41,10 @@ Definition increase (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.add (| - Integer.I32, - M.read (| number |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I32 + (M.read (| number |)) + (Value.Integer 1) |) ] |) @@ -75,8 +74,8 @@ Definition decrease (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let number := M.alloc (| number |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -104,11 +103,10 @@ Definition decrease (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.sub (| - Integer.I32, - M.read (| number |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.I32 + (M.read (| number |)) + (Value.Integer 1) |) ] |) @@ -143,8 +141,8 @@ Definition help (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -233,7 +231,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (M.catch_return (| ltac:(M.monadic (M.read (| - let args := + let~ args := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -267,8 +265,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -350,7 +348,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.read (| γ0_0 |), Value.Integer 42 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -377,7 +375,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -408,7 +406,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Integer 3 |) in - let cmd := + let~ cmd := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -423,7 +421,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ args; Value.Integer 1 ] |) |) in - let num := + let~ num := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -438,7 +436,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ args; Value.Integer 2 ] |) |) in - let number := + let~ number := M.copy (| M.match_operator (| M.alloc (| @@ -484,8 +482,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_eprint", [] |), @@ -515,7 +513,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -574,8 +572,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_eprint", [] |), @@ -604,7 +602,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "program_arguments_parsing::help", [] |), @@ -616,7 +614,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.alloc (| M.call_closure (| M.get_function (| "program_arguments_parsing::help", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/threads.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/threads.v index ab4160075..3e7ae1f6e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/threads.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/threads.v @@ -26,7 +26,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let children := + let~ children := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -42,7 +42,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -70,7 +70,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -87,7 +87,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -97,7 +99,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let i := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -134,8 +136,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -235,7 +237,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -257,7 +259,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := diff --git a/CoqOfRust/examples/default/examples/rust_book/std_misc/threads_test_case_map_reduce.v b/CoqOfRust/examples/default/examples/rust_book/std_misc/threads_test_case_map_reduce.v index 398efe9de..e9b093a5a 100644 --- a/CoqOfRust/examples/default/examples/rust_book/std_misc/threads_test_case_map_reduce.v +++ b/CoqOfRust/examples/default/examples/rust_book/std_misc/threads_test_case_map_reduce.v @@ -93,7 +93,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let data := + let~ data := M.copy (| Value.String "86967897737416471853297327050364959 @@ -105,7 +105,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 69920216438980873548808413720956532 16278424637452589860345374828574668" |) in - let children := + let~ children := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -121,14 +121,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let chunked_data := + let~ chunked_data := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "str", "split_whitespace", [] |), [ M.read (| data |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -162,7 +162,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -181,7 +181,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -194,8 +196,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let data_segment := M.copy (| γ1_1 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -251,7 +253,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -288,7 +290,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.read (| - let result := + let~ result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -403,8 +405,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -495,7 +497,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let final_result := + let~ final_result := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -605,8 +607,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/testing/documentation_testing.v b/CoqOfRust/examples/default/examples/rust_book/testing/documentation_testing.v index d71768b39..58d64a2e5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/testing/documentation_testing.v +++ b/CoqOfRust/examples/default/examples/rust_book/testing/documentation_testing.v @@ -12,7 +12,7 @@ Definition add (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - BinOp.Panic.add (| Integer.I32, M.read (| a |), M.read (| b |) |))) + BinOp.Wrap.add Integer.I32 (M.read (| a |)) (M.read (| b |)))) | _, _ => M.impossible end. @@ -34,7 +34,7 @@ Definition div (τ : list Ty.t) (α : list Value.t) : M := (let a := M.alloc (| a |) in let b := M.alloc (| b |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -57,7 +57,7 @@ Definition div (τ : list Ty.t) (α : list Value.t) : M := fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - M.alloc (| BinOp.Panic.div (| Integer.I32, M.read (| a |), M.read (| b |) |) |) + M.alloc (| BinOp.Wrap.div Integer.I32 (M.read (| a |)) (M.read (| b |)) |) |))) | _, _ => M.impossible end. diff --git a/CoqOfRust/examples/default/examples/rust_book/testing/unit_testing.v b/CoqOfRust/examples/default/examples/rust_book/testing/unit_testing.v index a40d41a56..3cd0e808b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/testing/unit_testing.v +++ b/CoqOfRust/examples/default/examples/rust_book/testing/unit_testing.v @@ -12,7 +12,7 @@ Definition add (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - BinOp.Panic.add (| Integer.I32, M.read (| a |), M.read (| b |) |))) + BinOp.Wrap.add Integer.I32 (M.read (| a |)) (M.read (| b |)))) | _, _ => M.impossible end. @@ -29,7 +29,7 @@ Definition bad_add (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let a := M.alloc (| a |) in let b := M.alloc (| b |) in - BinOp.Panic.sub (| Integer.I32, M.read (| a |), M.read (| b |) |))) + BinOp.Wrap.sub Integer.I32 (M.read (| a |)) (M.read (| b |)))) | _, _ => M.impossible end. @@ -46,7 +46,7 @@ Module tests. | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -85,7 +85,7 @@ Module tests. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -130,7 +130,7 @@ Module tests. | [], [] => ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -169,7 +169,7 @@ Module tests. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/clone.v b/CoqOfRust/examples/default/examples/rust_book/traits/clone.v index c65873896..789ada5e4 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/clone.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/clone.v @@ -201,10 +201,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let unit_ := M.alloc (| Value.StructTuple "clone::Unit" [] |) in - let copied_unit := M.copy (| unit_ |) in - let _ := - let _ := + let~ unit_ := M.alloc (| Value.StructTuple "clone::Unit" [] |) in + let~ copied_unit := M.copy (| unit_ |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -241,8 +241,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -278,7 +278,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let pair_ := + let~ pair_ := M.alloc (| Value.StructTuple "clone::Pair" @@ -305,8 +305,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -343,9 +343,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let moved_pair := M.copy (| pair_ |) in - let _ := - let _ := + let~ moved_pair := M.copy (| pair_ |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -381,22 +381,22 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let cloned_pair := + let~ cloned_pair := M.alloc (| M.call_closure (| M.get_trait_method (| "core::clone::Clone", Ty.path "clone::Pair", [], "clone", [] |), [ moved_pair ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::drop", [ Ty.path "clone::Pair" ] |), [ M.read (| moved_pair |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/derive.v b/CoqOfRust/examples/default/examples/rust_book/traits/derive.v index 84da762c7..61ad0a5cb 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/derive.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/derive.v @@ -153,11 +153,10 @@ Module Impl_derive_Inches. Value.StructTuple "derive::Centimeters" [ - BinOp.Panic.mul (| - Integer.Usize, - M.rust_cast (M.read (| inches |)), - M.read (| UnsupportedLiteral |) - |) + BinOp.Wrap.mul + Integer.Usize + (M.rust_cast (M.read (| inches |))) + (M.read (| UnsupportedLiteral |)) ] |))) ] @@ -209,10 +208,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _one_second := M.alloc (| Value.StructTuple "derive::Seconds" [ Value.Integer 1 ] |) in - let foot := M.alloc (| Value.StructTuple "derive::Inches" [ Value.Integer 12 ] |) in - let _ := - let _ := + let~ _one_second := M.alloc (| Value.StructTuple "derive::Seconds" [ Value.Integer 1 ] |) in + let~ foot := M.alloc (| Value.StructTuple "derive::Inches" [ Value.Integer 12 ] |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -251,11 +250,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let meter := + let~ meter := M.alloc (| Value.StructTuple "derive::Centimeters" [ M.read (| UnsupportedLiteral |) ] |) in - let cmp := + let~ cmp := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -294,8 +293,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/disambiguating_overlapping_traits.v b/CoqOfRust/examples/default/examples/rust_book/traits/disambiguating_overlapping_traits.v index adf9edf6a..bea650ce8 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/disambiguating_overlapping_traits.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/disambiguating_overlapping_traits.v @@ -108,7 +108,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let form := + let~ form := M.alloc (| Value.StructRecord "disambiguating_overlapping_traits::Form" @@ -127,7 +127,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("age", Value.Integer 28) ] |) in - let username := + let~ username := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -140,7 +140,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ form ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -192,7 +192,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -221,7 +221,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let age := + let~ age := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -234,7 +234,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ form ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.alloc (| Value.Integer 28 |); age ] |), [ @@ -262,7 +262,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/drop.v b/CoqOfRust/examples/default/examples/rust_book/traits/drop.v index 6f406cad4..d7dfbd1a2 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/drop.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/drop.v @@ -22,8 +22,8 @@ Module Impl_core_ops_drop_Drop_for_drop_Droppable. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -117,26 +117,26 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _a := + let~ _a := M.alloc (| Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "a" |)) ] |) in - let _ := - let _b := + let~ _ := + let~ _b := M.alloc (| Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "b" |)) ] |) in - let _ := - let _c := + let~ _ := + let~ _c := M.alloc (| Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "c" |)) ] |) in - let _d := + let~ _d := M.alloc (| Value.StructRecord "drop::Droppable" [ ("name", M.read (| Value.String "d" |)) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -161,8 +161,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -186,8 +186,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -212,8 +212,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -233,15 +233,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "core::mem::drop", [ Ty.path "drop::Droppable" ] |), [ M.read (| _a |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/hash.v b/CoqOfRust/examples/default/examples/rust_book/traits/hash.v index f2d656e22..abb7e0b31 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/hash.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/hash.v @@ -21,7 +21,7 @@ Module Impl_core_hash_Hash_for_hash_Person. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u32", [], "hash", [ __H ] |), @@ -35,7 +35,7 @@ Module Impl_core_hash_Hash_for_hash_Person. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -93,14 +93,14 @@ Definition calculate_hash (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let t := M.alloc (| t |) in M.read (| - let s := + let~ s := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "std::hash::random::DefaultHasher", "new", [] |), [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -152,7 +152,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let person1 := + let~ person1 := M.alloc (| Value.StructRecord "hash::Person" @@ -172,7 +172,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("phone", Value.Integer 5556667777) ] |) in - let person2 := + let~ person2 := M.alloc (| Value.StructRecord "hash::Person" @@ -192,7 +192,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ("phone", Value.Integer 5556667777) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/impl_trait_as_return_type.v b/CoqOfRust/examples/default/examples/rust_book/traits/impl_trait_as_return_type.v index 020289a87..19d91a9d7 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/impl_trait_as_return_type.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/impl_trait_as_return_type.v @@ -183,7 +183,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let v1 := + let~ v1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -216,7 +216,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let v2 := + let~ v2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -245,14 +245,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let v3 := + let~ v3 := M.alloc (| M.call_closure (| M.get_function (| "impl_trait_as_return_type::combine_vecs", [] |), [ M.read (| v1 |); M.read (| v2 |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -305,7 +305,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -334,7 +334,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -387,7 +387,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -416,7 +416,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -469,7 +469,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -498,7 +498,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -551,7 +551,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -580,7 +580,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -633,7 +633,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -662,8 +662,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v b/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v index bd3877735..134f9b2f4 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/iterators.v @@ -32,7 +32,7 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let current := + let~ current := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -40,7 +40,7 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. "curr" |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -55,24 +55,23 @@ Module Impl_core_iter_traits_iterator_Iterator_for_iterators_Fibonacci. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), "iterators::Fibonacci", "next" |), - BinOp.Panic.add (| - Integer.U32, - M.read (| current |), - M.read (| + BinOp.Wrap.add + Integer.U32 + (M.read (| current |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "iterators::Fibonacci", "next" |) - |) - |) + |)) |) in M.alloc (| Value.StructTuple "core::option::Option::Some" [ M.read (| current |) ] |) |))) @@ -148,14 +147,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let sequence := + let~ sequence := M.alloc (| Value.StructRecord "core::ops::range::Range" [ ("start", Value.Integer 0); ("end_", Value.Integer 3) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -176,8 +175,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -228,8 +227,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -280,8 +279,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -332,8 +331,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -384,8 +383,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -406,7 +405,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -431,7 +430,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -448,7 +447,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -458,8 +459,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -509,8 +510,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -535,7 +536,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -572,7 +573,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -591,7 +592,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -601,8 +604,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -652,8 +655,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -678,7 +681,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -736,7 +739,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -759,7 +762,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -769,8 +774,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -820,12 +825,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |))) ] |)) in - let array := + let~ array := M.alloc (| Value.Array [ Value.Integer 1; Value.Integer 3; Value.Integer 3; Value.Integer 7 ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -897,7 +902,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -914,7 +919,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ fun γ => ltac:(M.monadic - (M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => ltac:(M.monadic (let γ0_0 := @@ -924,8 +930,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := 0 |) in let i := M.copy (| γ0_0 |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/operator_overloading.v b/CoqOfRust/examples/default/examples/rust_book/traits/operator_overloading.v index 124706e3a..7ffb14d6f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/operator_overloading.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/operator_overloading.v @@ -99,8 +99,8 @@ Module Impl_core_ops_arith_Add_operator_overloading_Bar_for_operator_overloading (let self := M.alloc (| self |) in let _rhs := M.alloc (| _rhs |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -157,8 +157,8 @@ Module Impl_core_ops_arith_Add_operator_overloading_Foo_for_operator_overloading (let self := M.alloc (| self |) in let _rhs := M.alloc (| _rhs |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -206,8 +206,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -262,8 +262,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/returning_traits_with_dyn.v b/CoqOfRust/examples/default/examples/rust_book/traits/returning_traits_with_dyn.v index 85da5a304..86856e7d2 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/returning_traits_with_dyn.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/returning_traits_with_dyn.v @@ -162,16 +162,16 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let random_number := M.copy (| UnsupportedLiteral |) in - let animal := + let~ random_number := M.copy (| UnsupportedLiteral |) in + let~ animal := M.alloc (| M.call_closure (| M.get_function (| "returning_traits_with_dyn::random_animal", [] |), [ M.read (| random_number |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v b/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v index 56a75b121..c993748ab 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/supertraits.v @@ -30,7 +30,7 @@ Definition comp_sci_student_greeting (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let student := M.alloc (| student |) in M.read (| - let res := + let~ res := M.alloc (| M.call_closure (| M.get_function (| "alloc::fmt::format", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/traits/traits.v b/CoqOfRust/examples/default/examples/rust_book/traits/traits.v index d1a918a67..8b924e33f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/traits/traits.v +++ b/CoqOfRust/examples/default/examples/rust_book/traits/traits.v @@ -16,8 +16,8 @@ Module Animal. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -151,8 +151,8 @@ Module Impl_traits_Sheep. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -211,8 +211,8 @@ Module Impl_traits_Sheep. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := - let _ := + (let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -261,7 +261,7 @@ Module Impl_traits_Sheep. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -367,8 +367,8 @@ Module Impl_traits_Animal_for_traits_Sheep. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -471,28 +471,28 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let dolly := + let~ dolly := M.alloc (| M.call_closure (| M.get_trait_method (| "traits::Animal", Ty.path "traits::Sheep", [], "new", [] |), [ M.read (| Value.String "Dolly" |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "traits::Animal", Ty.path "traits::Sheep", [], "talk", [] |), [ dolly ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "traits::Sheep", "shear", [] |), [ dolly ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "traits::Animal", Ty.path "traits::Sheep", [], "talk", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v b/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v index daec8d822..891f64712 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/aliasing.v @@ -28,10 +28,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let nanoseconds := M.copy (| M.use (M.alloc (| Value.Integer 5 |)) |) in - let inches := M.copy (| M.use (M.alloc (| Value.Integer 2 |)) |) in - let _ := - let _ := + let~ nanoseconds := M.copy (| M.use (M.alloc (| Value.Integer 5 |)) |) in + let~ inches := M.copy (| M.use (M.alloc (| Value.Integer 2 |)) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -80,11 +80,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| nanoseconds |), - M.read (| inches |) - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| nanoseconds |)) + (M.read (| inches |)) |) ] |) diff --git a/CoqOfRust/examples/default/examples/rust_book/types/casting.v b/CoqOfRust/examples/default/examples/rust_book/types/casting.v index 1b5e3f29f..cc2a1d2ec 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/casting.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/casting.v @@ -86,11 +86,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let decimal := M.copy (| UnsupportedLiteral |) in - let integer := M.alloc (| M.rust_cast (M.read (| decimal |)) |) in - let character := M.alloc (| M.rust_cast (M.read (| integer |)) |) in - let _ := - let _ := + let~ decimal := M.copy (| UnsupportedLiteral |) in + let~ integer := M.alloc (| M.rust_cast (M.read (| decimal |)) |) in + let~ character := M.alloc (| M.rust_cast (M.read (| integer |)) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -147,8 +147,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -187,8 +187,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -227,8 +227,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -267,8 +267,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -299,11 +299,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |), [ M.alloc (| - BinOp.Panic.rem (| - Integer.I32, - Value.Integer 1000, - Value.Integer 256 - |) + BinOp.Wrap.rem + Integer.I32 + (Value.Integer 1000) + (Value.Integer 256) |) ] |) @@ -315,8 +314,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -355,8 +354,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -395,8 +394,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -435,8 +434,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -475,8 +474,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -515,8 +514,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -555,8 +554,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -599,8 +598,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -650,8 +649,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -701,8 +700,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/types/inference.v b/CoqOfRust/examples/default/examples/rust_book/types/inference.v index 55f8cc215..21d943ee3 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/inference.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/inference.v @@ -24,8 +24,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let elem := M.alloc (| Value.Integer 5 |) in - let vec := + let~ elem := M.alloc (| Value.Integer 5 |) in + let~ vec := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -38,7 +38,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -51,8 +51,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ vec; M.read (| elem |) ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/types/literals.v b/CoqOfRust/examples/default/examples/rust_book/types/literals.v index 83eca24b4..bf3d75896 100644 --- a/CoqOfRust/examples/default/examples/rust_book/types/literals.v +++ b/CoqOfRust/examples/default/examples/rust_book/types/literals.v @@ -25,13 +25,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 1 |) in - let y := M.alloc (| Value.Integer 2 |) in - let z := M.copy (| UnsupportedLiteral |) in - let i := M.alloc (| Value.Integer 1 |) in - let f := M.copy (| UnsupportedLiteral |) in - let _ := - let _ := + let~ x := M.alloc (| Value.Integer 1 |) in + let~ y := M.alloc (| Value.Integer 2 |) in + let~ z := M.copy (| UnsupportedLiteral |) in + let~ i := M.alloc (| Value.Integer 1 |) in + let~ f := M.copy (| UnsupportedLiteral |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -80,8 +80,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -130,8 +130,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -180,8 +180,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -230,8 +230,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/calling_unsafe_functions.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/calling_unsafe_functions.v index 2835e4e8e..cca47ef5b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/calling_unsafe_functions.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/calling_unsafe_functions.v @@ -20,7 +20,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let some_vector := + let~ some_vector := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -54,7 +54,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let pointer := + let~ pointer := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -67,7 +67,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ some_vector ] |) |) in - let length := + let~ length := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -80,14 +80,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := [ some_vector ] |) |) in - let my_slice := + let~ my_slice := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u32" ] |), [ M.read (| pointer |); M.read (| length |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -145,7 +145,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly.v index 3dcc285d9..c96e16016 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly.v @@ -15,7 +15,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _ := InlineAssembly in + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v index cab147c45..be7240225 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_clobbered_registers.v @@ -41,11 +41,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let name_buf := M.alloc (| repeat (Value.Integer 0) 12 |) in - let _ := - let _ := InlineAssembly in + let~ name_buf := M.alloc (| repeat (Value.Integer 0) 12 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let name := + let~ name := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -64,8 +64,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := ] |) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v index 63d8109b2..d8c35c64e 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_explicit_register_operands.v @@ -16,8 +16,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let cmd := M.alloc (| Value.Integer 209 |) in - let _ := InlineAssembly in + let~ cmd := M.alloc (| Value.Integer 209 |) in + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v index 8a43ecea6..19aa91fe3 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_implemented.v @@ -18,12 +18,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer 4 |) in - let b := M.alloc (| Value.Integer 4 |) in - let _ := - let _ := InlineAssembly in + let~ a := M.alloc (| Value.Integer 4 |) in + let~ b := M.alloc (| Value.Integer 4 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer 8 |) ] |), [ @@ -51,7 +51,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v index cdeb9de75..346f4b10d 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_case_non_used.v @@ -25,13 +25,13 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer 4 |) in - let b := M.alloc (| Value.Integer 4 |) in - let c := M.alloc (| Value.Integer 4 |) in - let _ := - let _ := InlineAssembly in + let~ a := M.alloc (| Value.Integer 4 |) in + let~ b := M.alloc (| Value.Integer 4 |) in + let~ c := M.alloc (| Value.Integer 4 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer 12 |) ] |), [ @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v index 8ed2e95ee..a1f00a8e5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inlateout_mul.v @@ -56,17 +56,16 @@ Module main. (let a := M.alloc (| a |) in let b := M.alloc (| b |) in M.read (| - let lo := M.copy (| Value.DeclaredButUndefined |) in - let hi := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let _ := InlineAssembly in + let~ lo := M.copy (| Value.DeclaredButUndefined |) in + let~ hi := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in M.alloc (| - BinOp.Panic.add (| - Integer.U128, - BinOp.Panic.shl (| M.rust_cast (M.read (| hi |)), Value.Integer 64 |), - M.rust_cast (M.read (| lo |)) - |) + BinOp.Wrap.add + Integer.U128 + (BinOp.Wrap.shl (M.rust_cast (M.read (| hi |))) (Value.Integer 64)) + (M.rust_cast (M.read (| lo |))) |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inout.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inout.v index b1d356f30..f59fb1575 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inout.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inout.v @@ -18,12 +18,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 3 |) in - let y := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let _ := InlineAssembly in + let~ x := M.alloc (| Value.Integer 3 |) in + let~ y := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ y; M.alloc (| Value.Integer 8 |) ] |), [ @@ -51,7 +51,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v index 2de29989b..b7b02fd1c 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs.v @@ -17,11 +17,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let _ := InlineAssembly in + let~ x := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ x; M.alloc (| Value.Integer 5 |) ] |), [ @@ -49,7 +49,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v index 5c3961825..755aa2c49 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example.v @@ -23,12 +23,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let i := M.alloc (| Value.Integer 3 |) in - let o := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let _ := InlineAssembly in + let~ i := M.alloc (| Value.Integer 3 |) in + let~ o := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ o; M.alloc (| Value.Integer 8 |) ] |), [ @@ -56,7 +56,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v index 1176bb814..05a00a588 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_inputs_and_outputs_another_example_without_mov.v @@ -17,11 +17,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 3 |) in - let _ := - let _ := InlineAssembly in + let~ x := M.alloc (| Value.Integer 3 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ x; M.alloc (| Value.Integer 8 |) ] |), [ @@ -49,7 +49,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_labels.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_labels.v index a898ea563..b1a11169f 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_labels.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_labels.v @@ -27,11 +27,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer 0 |) in - let _ := - let _ := InlineAssembly in + let~ a := M.alloc (| Value.Integer 0 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer 5 |) ] |), [ @@ -59,7 +59,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v index 7c002ea91..5672ab8dd 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_memory_address_operands.v @@ -31,7 +31,7 @@ Module main. ltac:(M.monadic (let control := M.alloc (| control |) in M.read (| - let _ := InlineAssembly in + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_options.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_options.v index 69c26dd4d..f1ae6e462 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_options.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_options.v @@ -22,12 +22,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a := M.alloc (| Value.Integer 4 |) in - let b := M.alloc (| Value.Integer 4 |) in - let _ := - let _ := InlineAssembly in + let~ a := M.alloc (| Value.Integer 4 |) in + let~ b := M.alloc (| Value.Integer 4 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ a; M.alloc (| Value.Integer 8 |) ] |), [ @@ -55,7 +55,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v index 11220db6d..db5acb5e5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_register_template_modifiers.v @@ -19,11 +19,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 171 |) in - let _ := - let _ := InlineAssembly in + let~ x := M.alloc (| Value.Integer 171 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ x; M.alloc (| Value.Integer 43947 |) ] |), [ @@ -51,7 +51,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v index 95d0a255f..24ef96b98 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_scratch_register.v @@ -25,18 +25,15 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let x := M.alloc (| Value.Integer 4 |) in - let _ := - let _ := InlineAssembly in + let~ x := M.alloc (| Value.Integer 4 |) in + let~ _ := + let~ _ := InlineAssembly in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple - [ - x; - M.alloc (| BinOp.Panic.mul (| Integer.U64, Value.Integer 4, Value.Integer 6 |) |) - ] + [ x; M.alloc (| BinOp.Wrap.mul Integer.U64 (Value.Integer 4) (Value.Integer 6) |) ] |), [ fun γ => @@ -63,7 +60,7 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v index 4f51961fd..58d176ff6 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/inline_assembly_symbol_operands_and_abi_clobbers.v @@ -48,8 +48,8 @@ Module main. ltac:(M.monadic (let arg := M.alloc (| arg |) in M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -85,7 +85,7 @@ Module main. |) |) in M.alloc (| Value.Tuple [] |) in - M.alloc (| BinOp.Panic.mul (| Integer.I32, M.read (| arg |), Value.Integer 2 |) |) + M.alloc (| BinOp.Wrap.mul Integer.I32 (M.read (| arg |)) (Value.Integer 2) |) |))) | _, _ => M.impossible end. @@ -119,8 +119,8 @@ Module main. ltac:(M.monadic (let arg := M.alloc (| arg |) in M.read (| - let result := M.copy (| Value.DeclaredButUndefined |) in - let _ := InlineAssembly in + let~ result := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := InlineAssembly in result |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/raw_pointers.v b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/raw_pointers.v index 1a496f79c..a886ba0f1 100644 --- a/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/raw_pointers.v +++ b/CoqOfRust/examples/default/examples/rust_book/unsafe_operations/raw_pointers.v @@ -15,8 +15,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let raw_p := M.alloc (| M.alloc (| Value.Integer 10 |) |) in - let _ := + let~ raw_p := M.alloc (| M.alloc (| Value.Integer 10 |) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ diff --git a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/declare_first.v b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/declare_first.v index 6eff4c78e..886ad0b02 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/declare_first.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/declare_first.v @@ -31,17 +31,14 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let a_binding := M.copy (| Value.DeclaredButUndefined |) in - let _ := - let x := M.alloc (| Value.Integer 2 |) in - let _ := - M.write (| - a_binding, - BinOp.Panic.mul (| Integer.I32, M.read (| x |), M.read (| x |) |) - |) in + let~ a_binding := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := + let~ x := M.alloc (| Value.Integer 2 |) in + let~ _ := + M.write (| a_binding, BinOp.Wrap.mul Integer.I32 (M.read (| x |)) (M.read (| x |)) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -78,10 +75,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let another_binding := M.copy (| Value.DeclaredButUndefined |) in - let _ := M.write (| another_binding, Value.Integer 1 |) in - let _ := - let _ := + let~ another_binding := M.copy (| Value.DeclaredButUndefined |) in + let~ _ := M.write (| another_binding, Value.Integer 1 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/freezing.v b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/freezing.v index eb553e9a6..8f6168a39 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/freezing.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/freezing.v @@ -25,11 +25,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _mutable_integer := M.alloc (| Value.Integer 7 |) in - let _ := - let _mutable_integer := M.copy (| _mutable_integer |) in + let~ _mutable_integer := M.alloc (| Value.Integer 7 |) in + let~ _ := + let~ _mutable_integer := M.copy (| _mutable_integer |) in M.alloc (| Value.Tuple [] |) in - let _ := M.write (| _mutable_integer, Value.Integer 3 |) in + let~ _ := M.write (| _mutable_integer, Value.Integer 3 |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/mutability.v b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/mutability.v index 55385c8a1..b297c64f5 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/mutability.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/mutability.v @@ -23,10 +23,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let _immutable_binding := M.alloc (| Value.Integer 1 |) in - let mutable_binding := M.alloc (| Value.Integer 1 |) in - let _ := - let _ := + let~ _immutable_binding := M.alloc (| Value.Integer 1 |) in + let~ mutable_binding := M.alloc (| Value.Integer 1 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -65,11 +65,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := let β := mutable_binding in - M.write (| β, BinOp.Panic.add (| Integer.I32, M.read (| β |), Value.Integer 1 |) |) in - let _ := - let _ := + M.write (| β, BinOp.Wrap.add Integer.I32 (M.read (| β |)) (Value.Integer 1) |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/scope.v b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/scope.v index bc2b7bb76..0613d6444 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/scope.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/scope.v @@ -27,11 +27,11 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let long_lived_binding := M.alloc (| Value.Integer 1 |) in - let _ := - let short_lived_binding := M.alloc (| Value.Integer 2 |) in - let _ := - let _ := + let~ long_lived_binding := M.alloc (| Value.Integer 1 |) in + let~ _ := + let~ short_lived_binding := M.alloc (| Value.Integer 2 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -71,8 +71,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_bindings.v b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_bindings.v index 4b5bb773c..c749cae22 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_bindings.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_bindings.v @@ -28,12 +28,12 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let an_integer := M.alloc (| Value.Integer 1 |) in - let a_boolean := M.alloc (| Value.Bool true |) in - let unit_ := M.alloc (| Value.Tuple [] |) in - let copied_integer := M.copy (| an_integer |) in - let _ := - let _ := + let~ an_integer := M.alloc (| Value.Integer 1 |) in + let~ a_boolean := M.alloc (| Value.Bool true |) in + let~ unit_ := M.alloc (| Value.Tuple [] |) in + let~ copied_integer := M.copy (| an_integer |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -72,8 +72,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -110,8 +110,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -150,8 +150,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let _unused_variable := M.alloc (| Value.Integer 3 |) in - let _noisy_unused_variable := M.alloc (| Value.Integer 2 |) in + let~ _unused_variable := M.alloc (| Value.Integer 3 |) in + let~ _noisy_unused_variable := M.alloc (| Value.Integer 2 |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible diff --git a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_shadowing.v b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_shadowing.v index 5eb95f218..4ea31df4b 100644 --- a/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_shadowing.v +++ b/CoqOfRust/examples/default/examples/rust_book/variable_bindings/variable_shadowing.v @@ -25,10 +25,10 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := | [], [] => ltac:(M.monadic (M.read (| - let shadowed_binding := M.alloc (| Value.Integer 1 |) in - let _ := - let _ := - let _ := + let~ shadowed_binding := M.alloc (| Value.Integer 1 |) in + let~ _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -67,9 +67,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let shadowed_binding := M.copy (| Value.String "abc" |) in - let _ := - let _ := + let~ shadowed_binding := M.copy (| Value.String "abc" |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -109,8 +109,8 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) in M.alloc (| Value.Tuple [] |) in M.alloc (| Value.Tuple [] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -149,9 +149,9 @@ Definition main (τ : list Ty.t) (α : list Value.t) : M := |) |) in M.alloc (| Value.Tuple [] |) in - let shadowed_binding := M.alloc (| Value.Integer 2 |) in - let _ := - let _ := + let~ shadowed_binding := M.alloc (| Value.Integer 2 |) in + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), diff --git a/CoqOfRust/examples/default/examples/subtle.v b/CoqOfRust/examples/default/examples/subtle.v index 44d683103..f76ebcbd4 100644 --- a/CoqOfRust/examples/default/examples/subtle.v +++ b/CoqOfRust/examples/default/examples/subtle.v @@ -115,7 +115,7 @@ Module Impl_core_convert_From_subtle_Choice_for_bool. ltac:(M.monadic (let source := M.alloc (| source |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -123,7 +123,7 @@ Module Impl_core_convert_From_subtle_Choice_for_bool. ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -253,7 +253,7 @@ Module Impl_core_ops_bit_BitAndAssign_for_subtle_Choice. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -338,7 +338,7 @@ Module Impl_core_ops_bit_BitOrAssign_for_subtle_Choice. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -423,7 +423,7 @@ Module Impl_core_ops_bit_BitXorAssign_for_subtle_Choice. (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -515,7 +515,7 @@ Definition black_box (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let input := M.alloc (| input |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -523,7 +523,7 @@ Definition black_box (τ : list Ty.t) (α : list Value.t) : M := ltac:(M.monadic (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -662,14 +662,14 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ T ], "len", [] |), [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -712,8 +712,8 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let x := M.alloc (| Value.Integer 1 |) in - let _ := + let~ x := M.alloc (| Value.Integer 1 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -767,7 +767,7 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -789,7 +789,9 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -804,7 +806,7 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_slice_T. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let ai := M.copy (| γ1_0 |) in let bi := M.copy (| γ1_1 |) in - let _ := + let~ _ := let β := x in M.write (| β, @@ -928,7 +930,7 @@ Module Impl_subtle_ConstantTimeEq_for_u8. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -941,17 +943,16 @@ Module Impl_subtle_ConstantTimeEq_for_u8. [ M.read (| self |); M.read (| other |) ] |) |) in - let y := + let~ y := M.alloc (| - BinOp.Panic.shr (| - BinOp.Pure.bit_or + BinOp.Wrap.shr + (BinOp.Pure.bit_or (M.read (| x |)) (M.call_closure (| M.get_associated_function (| Ty.path "u8", "wrapping_neg", [] |), [ M.read (| x |) ] - |)), - BinOp.Panic.sub (| Integer.I32, Value.Integer 8, Value.Integer 1 |) - |) + |))) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 8) (Value.Integer 1)) |) in M.alloc (| M.call_closure (| @@ -1042,7 +1043,7 @@ Module Impl_subtle_ConstantTimeEq_for_u16. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1055,17 +1056,16 @@ Module Impl_subtle_ConstantTimeEq_for_u16. [ M.read (| self |); M.read (| other |) ] |) |) in - let y := + let~ y := M.alloc (| - BinOp.Panic.shr (| - BinOp.Pure.bit_or + BinOp.Wrap.shr + (BinOp.Pure.bit_or (M.read (| x |)) (M.call_closure (| M.get_associated_function (| Ty.path "u16", "wrapping_neg", [] |), [ M.read (| x |) ] - |)), - BinOp.Panic.sub (| Integer.I32, Value.Integer 16, Value.Integer 1 |) - |) + |))) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 16) (Value.Integer 1)) |) in M.alloc (| M.call_closure (| @@ -1152,7 +1152,7 @@ Module Impl_subtle_ConstantTimeEq_for_u32. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1165,17 +1165,16 @@ Module Impl_subtle_ConstantTimeEq_for_u32. [ M.read (| self |); M.read (| other |) ] |) |) in - let y := + let~ y := M.alloc (| - BinOp.Panic.shr (| - BinOp.Pure.bit_or + BinOp.Wrap.shr + (BinOp.Pure.bit_or (M.read (| x |)) (M.call_closure (| M.get_associated_function (| Ty.path "u32", "wrapping_neg", [] |), [ M.read (| x |) ] - |)), - BinOp.Panic.sub (| Integer.I32, Value.Integer 32, Value.Integer 1 |) - |) + |))) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 32) (Value.Integer 1)) |) in M.alloc (| M.call_closure (| @@ -1262,7 +1261,7 @@ Module Impl_subtle_ConstantTimeEq_for_u64. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1275,17 +1274,16 @@ Module Impl_subtle_ConstantTimeEq_for_u64. [ M.read (| self |); M.read (| other |) ] |) |) in - let y := + let~ y := M.alloc (| - BinOp.Panic.shr (| - BinOp.Pure.bit_or + BinOp.Wrap.shr + (BinOp.Pure.bit_or (M.read (| x |)) (M.call_closure (| M.get_associated_function (| Ty.path "u64", "wrapping_neg", [] |), [ M.read (| x |) ] - |)), - BinOp.Panic.sub (| Integer.I32, Value.Integer 64, Value.Integer 1 |) - |) + |))) + (BinOp.Wrap.sub Integer.I32 (Value.Integer 64) (Value.Integer 1)) |) in M.alloc (| M.call_closure (| @@ -1372,7 +1370,7 @@ Module Impl_subtle_ConstantTimeEq_for_usize. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1385,28 +1383,25 @@ Module Impl_subtle_ConstantTimeEq_for_usize. [ M.read (| self |); M.read (| other |) ] |) |) in - let y := + let~ y := M.alloc (| - BinOp.Panic.shr (| - BinOp.Pure.bit_or + BinOp.Wrap.shr + (BinOp.Pure.bit_or (M.read (| x |)) (M.call_closure (| M.get_associated_function (| Ty.path "usize", "wrapping_neg", [] |), [ M.read (| x |) ] - |)), - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.mul (| - Integer.Usize, - M.call_closure (| + |))) + (BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.mul + Integer.Usize + (M.call_closure (| M.get_function (| "core::mem::size_of", [ Ty.path "usize" ] |), [] - |), - Value.Integer 8 - |), - Value.Integer 1 - |) - |) + |)) + (Value.Integer 8)) + (Value.Integer 1)) |) in M.alloc (| M.call_closure (| @@ -1480,7 +1475,7 @@ Module ConditionallySelectable. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| self |), M.call_closure (| @@ -1509,8 +1504,8 @@ Module ConditionallySelectable. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let t := M.copy (| M.read (| a |) |) in - let _ := + let~ t := M.copy (| M.read (| a |) |) in + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1523,7 +1518,7 @@ Module ConditionallySelectable. [ M.read (| a |); M.read (| b |); M.read (| choice |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1564,7 +1559,7 @@ Module Impl_subtle_ConditionallySelectable_for_u8. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -1622,7 +1617,7 @@ Module Impl_subtle_ConditionallySelectable_for_u8. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -1634,7 +1629,7 @@ Module Impl_subtle_ConditionallySelectable_for_u8. |)) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -1669,7 +1664,7 @@ Module Impl_subtle_ConditionallySelectable_for_u8. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -1681,16 +1676,16 @@ Module Impl_subtle_ConditionallySelectable_for_u8. |)) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -1730,7 +1725,7 @@ Module Impl_subtle_ConditionallySelectable_for_i8. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -1790,7 +1785,7 @@ Module Impl_subtle_ConditionallySelectable_for_i8. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -1804,7 +1799,7 @@ Module Impl_subtle_ConditionallySelectable_for_i8. |) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -1839,7 +1834,7 @@ Module Impl_subtle_ConditionallySelectable_for_i8. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -1853,16 +1848,16 @@ Module Impl_subtle_ConditionallySelectable_for_i8. |) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -1902,7 +1897,7 @@ Module Impl_subtle_ConditionallySelectable_for_u16. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -1960,7 +1955,7 @@ Module Impl_subtle_ConditionallySelectable_for_u16. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -1972,7 +1967,7 @@ Module Impl_subtle_ConditionallySelectable_for_u16. |)) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -2007,7 +2002,7 @@ Module Impl_subtle_ConditionallySelectable_for_u16. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2019,16 +2014,16 @@ Module Impl_subtle_ConditionallySelectable_for_u16. |)) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -2068,7 +2063,7 @@ Module Impl_subtle_ConditionallySelectable_for_i16. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2128,7 +2123,7 @@ Module Impl_subtle_ConditionallySelectable_for_i16. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2142,7 +2137,7 @@ Module Impl_subtle_ConditionallySelectable_for_i16. |) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -2177,7 +2172,7 @@ Module Impl_subtle_ConditionallySelectable_for_i16. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2191,16 +2186,16 @@ Module Impl_subtle_ConditionallySelectable_for_i16. |) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -2240,7 +2235,7 @@ Module Impl_subtle_ConditionallySelectable_for_u32. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2298,7 +2293,7 @@ Module Impl_subtle_ConditionallySelectable_for_u32. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2310,7 +2305,7 @@ Module Impl_subtle_ConditionallySelectable_for_u32. |)) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -2345,7 +2340,7 @@ Module Impl_subtle_ConditionallySelectable_for_u32. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2357,16 +2352,16 @@ Module Impl_subtle_ConditionallySelectable_for_u32. |)) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -2406,7 +2401,7 @@ Module Impl_subtle_ConditionallySelectable_for_i32. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2466,7 +2461,7 @@ Module Impl_subtle_ConditionallySelectable_for_i32. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2480,7 +2475,7 @@ Module Impl_subtle_ConditionallySelectable_for_i32. |) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -2515,7 +2510,7 @@ Module Impl_subtle_ConditionallySelectable_for_i32. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2529,16 +2524,16 @@ Module Impl_subtle_ConditionallySelectable_for_i32. |) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -2578,7 +2573,7 @@ Module Impl_subtle_ConditionallySelectable_for_u64. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2636,7 +2631,7 @@ Module Impl_subtle_ConditionallySelectable_for_u64. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2648,7 +2643,7 @@ Module Impl_subtle_ConditionallySelectable_for_u64. |)) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -2683,7 +2678,7 @@ Module Impl_subtle_ConditionallySelectable_for_u64. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.alloc (| M.rust_cast (UnOp.Panic.neg (| @@ -2695,16 +2690,16 @@ Module Impl_subtle_ConditionallySelectable_for_u64. |)) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -2744,7 +2739,7 @@ Module Impl_subtle_ConditionallySelectable_for_i64. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2804,7 +2799,7 @@ Module Impl_subtle_ConditionallySelectable_for_i64. let other := M.alloc (| other |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2818,7 +2813,7 @@ Module Impl_subtle_ConditionallySelectable_for_i64. |) |)) |) in - let _ := + let~ _ := let β := M.read (| self |) in M.write (| β, @@ -2853,7 +2848,7 @@ Module Impl_subtle_ConditionallySelectable_for_i64. let b := M.alloc (| b |) in let choice := M.alloc (| choice |) in M.read (| - let mask := + let~ mask := M.copy (| M.use (M.alloc (| @@ -2867,16 +2862,16 @@ Module Impl_subtle_ConditionallySelectable_for_i64. |) |)) |) in - let t := + let~ t := M.alloc (| BinOp.Pure.bit_and (M.read (| mask |)) (BinOp.Pure.bit_xor (M.read (| M.read (| a |) |)) (M.read (| M.read (| b |) |))) |) in - let _ := + let~ _ := let β := M.read (| a |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in - let _ := + let~ _ := let β := M.read (| b |) in M.write (| β, BinOp.Pure.bit_xor (M.read (| β |)) (M.read (| t |)) |) in M.alloc (| Value.Tuple [] |) @@ -2962,7 +2957,7 @@ Module Impl_subtle_ConditionallyNegatable_where_subtle_ConditionallySelectable_T (let self := M.alloc (| self |) in let choice := M.alloc (| choice |) in M.read (| - let self_neg := + let~ self_neg := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2975,7 +2970,7 @@ Module Impl_subtle_ConditionallyNegatable_where_subtle_ConditionallySelectable_T [ M.read (| M.use (M.alloc (| M.read (| self |) |)) |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3248,7 +3243,7 @@ Module Impl_subtle_CtOption_T. (let self := M.alloc (| self |) in let msg := M.alloc (| msg |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -3293,7 +3288,7 @@ Module Impl_subtle_CtOption_T. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -3378,7 +3373,7 @@ Module Impl_subtle_CtOption_T. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple @@ -3423,7 +3418,7 @@ Module Impl_subtle_CtOption_T. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" [] |) in @@ -3705,7 +3700,7 @@ Module Impl_subtle_CtOption_T. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let tmp := + let~ tmp := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3758,7 +3753,7 @@ Module Impl_subtle_CtOption_T. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3805,7 +3800,7 @@ Module Impl_subtle_CtOption_T. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let is_none := + let~ is_none := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3816,7 +3811,7 @@ Module Impl_subtle_CtOption_T. [ self ] |) |) in - let f := + let~ f := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3949,7 +3944,7 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_subtle_CtOpt (let self := M.alloc (| self |) in let rhs := M.alloc (| rhs |) in M.read (| - let a := + let~ a := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3960,7 +3955,7 @@ Module Impl_subtle_ConstantTimeEq_where_subtle_ConstantTimeEq_T_for_subtle_CtOpt [ M.read (| self |) ] |) |) in - let b := + let~ b := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4100,7 +4095,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let gtb := + let~ gtb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4125,7 +4120,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. ] |) |) in - let ltb := + let~ ltb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4150,8 +4145,8 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. ] |) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4164,19 +4159,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 8) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := ltb in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| ltb |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4184,7 +4179,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4193,12 +4188,12 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. ] |))) |) in - let bit := + let~ bit := M.alloc (| BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4211,19 +4206,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 8) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := bit in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| bit |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4231,7 +4226,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u8. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4301,7 +4296,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let gtb := + let~ gtb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4326,7 +4321,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. ] |) |) in - let ltb := + let~ ltb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4351,8 +4346,8 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. ] |) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4365,19 +4360,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 16) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := ltb in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| ltb |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4385,7 +4380,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4394,12 +4389,12 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. ] |))) |) in - let bit := + let~ bit := M.alloc (| BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4412,19 +4407,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 16) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := bit in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| bit |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4432,7 +4427,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u16. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4498,7 +4493,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let gtb := + let~ gtb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4523,7 +4518,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. ] |) |) in - let ltb := + let~ ltb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4548,8 +4543,8 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. ] |) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4562,19 +4557,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 32) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := ltb in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| ltb |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4582,7 +4577,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4591,12 +4586,12 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. ] |))) |) in - let bit := + let~ bit := M.alloc (| BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4609,19 +4604,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 32) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := bit in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| bit |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4629,7 +4624,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u32. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4695,7 +4690,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let gtb := + let~ gtb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4720,7 +4715,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. ] |) |) in - let ltb := + let~ ltb := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4745,8 +4740,8 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. ] |) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4759,19 +4754,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 64) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := ltb in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| ltb |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| ltb |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4779,7 +4774,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -4788,12 +4783,12 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. ] |))) |) in - let bit := + let~ bit := M.alloc (| BinOp.Pure.bit_and (M.read (| gtb |)) (UnOp.Pure.not (M.read (| ltb |))) |) in - let pow := M.alloc (| Value.Integer 1 |) in - let _ := + let~ pow := M.alloc (| Value.Integer 1 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -4806,19 +4801,19 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. (M.alloc (| BinOp.Pure.lt (M.read (| pow |)) (Value.Integer 64) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := bit in M.write (| β, BinOp.Pure.bit_or (M.read (| β |)) - (BinOp.Panic.shr (| M.read (| bit |), M.read (| pow |) |)) + (BinOp.Wrap.shr (M.read (| bit |)) (M.read (| pow |))) |) in - let _ := + let~ _ := let β := pow in M.write (| β, - BinOp.Panic.add (| Integer.I32, M.read (| β |), M.read (| pow |) |) + BinOp.Wrap.add Integer.I32 (M.read (| β |)) (M.read (| pow |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -4826,7 +4821,7 @@ Module Impl_subtle_ConstantTimeGreater_for_u64. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) diff --git a/CoqOfRust/lib/lib.v b/CoqOfRust/lib/lib.v index 4d38b4e31..67671f666 100644 --- a/CoqOfRust/lib/lib.v +++ b/CoqOfRust/lib/lib.v @@ -33,12 +33,9 @@ Definition assign (target : Value.t) (source : Value.t) : M := (** ** Integer types *) (** A value with an address of type `ref str`. *) -Definition mk_str (s : string) : Value.t := - Value.Pointer (Pointer.Immediate ( - Value.Pointer (Pointer.Immediate ( - Value.String s - )) - )). +Definition mk_str (s : string) : M := + let* pointer := M.alloc (Value.String s) in + M.alloc pointer. Module IntegerDescription. Class C (Self : M.Integer.t) : Set := { diff --git a/CoqOfRust/proofs/M.v b/CoqOfRust/proofs/M.v index 95c2450b9..2bc97ee4c 100644 --- a/CoqOfRust/proofs/M.v +++ b/CoqOfRust/proofs/M.v @@ -1,13 +1,13 @@ Require Import Coq.Strings.String. Require Import CoqOfRust.M. -Require Import CoqOfRust.simulations.M. +Require Import simulations.M. Import List.ListNotations. Local Open Scope list. Local Open Scope type. -Module State. +(* Module State. Class Trait (State Address : Set) : Type := { get_Set (a : Address) : Set; read (a : Address) : State -> option (get_Set a); @@ -41,171 +41,316 @@ Module State. End Valid. End State. -Definition IsTraitMethod - (trait_name : string) - (self_ty : Ty.t) - (trait_tys : list Ty.t) - (method_name : string) - (method : list Ty.t -> list Value.t -> M) : - Prop := - exists (instance : Instance.t), - M.IsTraitInstance - trait_name - self_ty - trait_tys - instance /\ - List.assoc instance method_name = Some (InstanceField.Method method). +Module Stack. + Module State. + Inductive t : list Set -> Set := + | Nil : t [] + | Cons {A : Set} {As : list Set} (x : A) (xs : t As) : t (A :: As). + End State. -Module Run. - Reserved Notation "{{ env , env_to_value , state | e ⇓ to_value | P_state }}". + Module Address. + Definition t : Set := nat. + End Address. - Inductive t `{State.Trait} {Env A : Set} (env : Env) (env_to_value : Env -> Value.t) - (state : State) - (to_value : A -> Value.t + Exception.t) (P_state : State -> Prop) : - M -> Set := - | Pure - (result : A) - (result' : Value.t + Exception.t) : - result' = to_value result -> - P_state state -> - {{ env, env_to_value, state | LowM.Pure result' ⇓ to_value | P_state }} - | CallPrimitiveStateAllocImmediate - (v : Value.t) - (k : Value.t -> M) : - {{ env, env_to_value, state | - k (Value.Pointer (Pointer.Immediate v)) ⇓ to_value - | P_state }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.StateAlloc v) k ⇓ to_value - | P_state }} - | CallPrimitiveStateAllocMutable - (address : Address) - (value : State.get_Set address) - (value' : Value.t) - (pointer_to_value : State.get_Set address -> Value.t) - (state_inter : State) - (k : Value.t -> M) : - let r := Value.Pointer (Pointer.mutable address pointer_to_value) in - value' = pointer_to_value value -> - State.read address state = None -> - State.alloc_write address state value = Some state_inter -> - {{ env, env_to_value, state_inter | k r ⇓ to_value | P_state }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.StateAlloc value') k ⇓ to_value - | P_state }} - | CallPrimitiveStateRead - {A : Set} {pointer_to_value : A -> Value.t} address path big_to_value projection injection - (value : State.get_Set address) - (sub_value : A) - (k : Value.t -> M) : + Definition get_Set (domain : list Set) (address : Address.t) : Set := + List.nth address domain Empty_set. + + Fixpoint read {domain : list Set} (address : Address.t) (state : State.t domain) : + option (get_Set domain address) := + match state with + | State.Nil => None + | State.Cons x xs => + match address with + | O => Some x + | S address' => read address' xs + end + end. + + Fixpoint alloc_write {domain : list Set} + (address : Address.t) + (state : State.t domain) + (value : get_Set domain address) + {struct state} : + option (State.t domain). + Proof. + destruct state as [| ? ? x xs]. + { destruct address, value. } + { destruct address as [| address']; cbn in *. + { exact (Some (State.Cons value xs)). } + { destruct (alloc_write _ address' xs value) as [xs' |]. + { exact (Some (State.Cons x xs')). } + { exact None. } + } + } + Defined. + + Global Instance I {domain : list Set} : State.Trait (State.t domain) Address.t := { + get_Set := get_Set domain; + read := read; + alloc_write := alloc_write; + }. + + Definition alloc {A : Set} {domain : list Set} (state : State.t domain) (value : A) +End Stack. *) + +Module IsTraitMethod. + Inductive t + (trait_name : string) + (self_ty : Ty.t) + (trait_tys : list Ty.t) + (method_name : string) : + (list Ty.t -> list Value.t -> M) -> Prop := + | Explicit (instance : Instance.t) (method : list Ty.t -> list Value.t -> M) : + M.IsTraitInstance + trait_name + self_ty + trait_tys + instance -> + List.assoc instance method_name = Some (InstanceField.Method method) -> + t trait_name self_ty trait_tys method_name method + | Implicit (instance : Instance.t) (method : Ty.t -> list Ty.t -> list Value.t -> M) : + M.IsTraitInstance + trait_name + self_ty + trait_tys + instance -> + List.assoc instance method_name = None -> + M.IsProvidedMethod trait_name method_name method -> + t trait_name self_ty trait_tys method_name (method self_ty). +End IsTraitMethod. + +Module Stack. + Definition t : Set := + list {A : Set @ A}. + + Definition read (stack : t) (address : nat) : option {A : Set @ A} := + List.nth_error stack address. + + Fixpoint write {A : Set} (stack : t) (address : nat) (value : A) : t := + match stack, address with + | _ :: stack, Datatypes.O => existS A value :: stack + | start :: stack, Datatypes.S address => start :: write stack address value + | [], _ => [] + end. + + Lemma read_length_eq {A : Set} (stack_start stack_end : t) : + read (stack_start ++ stack_end) (List.length stack_start) = + read stack_end 0. + Proof. + now induction stack_start. + Qed. + + Definition domain (stack : t) : list Set := + List.map (fun x => match x with Some (existS A _) => A | None => Empty_set end) stack. +End Stack. + +Module HasAllocWith. + Inductive t {A : Set} (to_value : A -> Value.t) (stack : Stack.t) (value : A) : + Pointer.t Value.t -> Stack.t -> Set := + | Immediate : + t to_value stack value (Pointer.Immediate to_value value) stack + | Mutable : + let address := List.length stack in + let pointer := Pointer.mutable address to_value in + let stack' := stack ++ [Some (existS _ value)] in + t to_value stack value pointer stack'. +End HasAllocWith. + +Module HasReadWith. + Inductive t {A : Set} (to_value : A -> Value.t) (stack : Stack.t) (value : A) : + Pointer.t Value.t -> Set := + | Immediate : + t to_value stack value (Pointer.Immediate to_value value) + | Mutable {Big_A : Set} address path big_to_value projection injection (big_value : Big_A) : let mutable := Pointer.Mutable.Make - (Value := Value.t) (A := A) (to_value := pointer_to_value) (Address := Address) - (Big_A := State.get_Set address) + (Value := Value.t) (A := A) (to_value := to_value) + (Big_A := Big_A) address path big_to_value projection injection in - State.read address state = Some value -> - projection value = Some sub_value -> - {{ env, env_to_value, state | - k (pointer_to_value sub_value) ⇓ - to_value - | P_state }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.StateRead mutable) k ⇓ - to_value - | P_state }} - | CallPrimitiveStateWrite - {A : Set} {pointer_to_value : A -> Value.t} address path big_to_value projection injection - (value : A) (value' : Value.t) - (big_value new_big_value : State.get_Set address) - (state_inter : State) - (k : Value.t -> M) : + Stack.read stack address = Some (existS _ big_value) -> + projection big_value = Some value -> + t to_value stack value (Pointer.Mutable mutable). +End HasReadWith. + +Module HasRead. + Definition t {A : Set} + (to_value : A -> Value.t) + (stack : Stack.t) + (pointer : Pointer.t Value.t) : + Set := + { value : A @ HasReadWith.t to_value stack value pointer}. +End HasRead. + +Module HasWriteWith. + Inductive t {A : Set} {to_value : A -> Value.t} (stack : Stack.t) (value : A) : + Pointer.Mutable.t Value.t to_value -> Stack.t -> Set := + | Mutable {Big_A : Set} address path big_to_value projection injection : let mutable := Pointer.Mutable.Make - (Value := Value.t) (A := A) (to_value := pointer_to_value) (Address := Address) - (Big_A := State.get_Set address) + (Value := Value.t) (A := A) (to_value := to_value) + (Big_A := Big_A) address path big_to_value projection injection in - value' = pointer_to_value value -> - State.read address state = Some big_value -> - injection big_value value = Some new_big_value -> - State.alloc_write address state new_big_value = Some state_inter -> - {{ env, env_to_value, state_inter | k (Value.Tuple []) ⇓ to_value | P_state }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.StateWrite mutable value') k ⇓ - to_value - | P_state }} - | CallPrimitiveGetSubPointer {A Sub_A : Set} {pointer_to_value : A -> Value.t} - (mutable : Pointer.Mutable.t Value.t pointer_to_value) - index sub_projection sub_injection sub_to_value - (k : Value.t -> M) : + let stack' := Stack.write stack address value in + HasRead.t to_value stack' (Pointer.Mutable mutable) -> + t stack value mutable stack'. +End HasWriteWith. + +Module HasWrite. + Definition t {A : Set} {to_value : A -> Value.t} + (stack : Stack.t) + (value : A) + (mutable : Pointer.Mutable.t Value.t to_value) : + Set := + { stack' : Stack.t @ HasWriteWith.t stack value mutable stack' }. +End HasWrite. + +Module IsWritePreserved. + Definition t (stack stack' : Stack.t) : Set := + forall (A : Set) (to_value : A -> Value.t) + (value : A) (mutable : Pointer.Mutable.t Value.t to_value), + HasWrite.t stack value mutable -> + HasWrite.t stack' value mutable. + + Definition reflexivity (stack : Stack.t) : t stack stack. + Proof. + unfold t; intros. + assumption. + Defined. + + Definition transitivity {stack1 stack2 stack3 : Stack.t} : + t stack1 stack2 -> t stack2 stack3 -> t stack1 stack3. + Proof. + unfold t; intros. + auto. + Defined. + + Definition alloc {A : Set} {to_value : A -> Value.t} + (stack : Stack.t) (value : A) (pointer : Pointer.t Value.t) (stack' : Stack.t) : + HasAllocWith.t to_value stack value pointer stack' -> + t stack stack'. + Proof. + intros []. + { apply reflexivity. } + { unfold t; intros. + match goal with + | H : HasWrite.t _ _ _ |- _ => destruct H as [? H] + end. + destruct mutable. + eexists. + eapply HasWriteWith.Mutable. + apply H. + } +End IsWritePreserved. + +Module HasSubPointerWith. + Inductive t (index : Pointer.Index.t) : Pointer.t Value.t -> Pointer.t Value.t -> Prop := + | Immediate {A Sub_A : Set} + (to_value : A -> Value.t) (value : A) + (sub_to_value : Sub_A -> Value.t) (sub_value : Sub_A) : + Value.read_path (to_value value) index = Some (sub_to_value sub_value) -> + t index (Pointer.Immediate to_value value) (Pointer.Immediate sub_to_value sub_value) + | Mutable {A Sub_A : Set} {to_value : A -> Value.t} + (mutable : Pointer.Mutable.t Value.t to_value) + sub_projection sub_injection sub_to_value : (* Communtativity of the read *) (forall (a : A), Option.map (sub_projection a) sub_to_value = - Value.read_path (pointer_to_value a) [index] + Value.read_path (to_value a) index ) -> (* Communtativity of the write *) (forall (a : A) (sub_a : Sub_A), - Option.map (sub_injection a sub_a) pointer_to_value = - Value.write_value (pointer_to_value a) [index] (sub_to_value sub_a) + Option.map (sub_injection a sub_a) to_value = + Value.write_value (to_value a) index sub_to_value sub_a ) -> - {{ env, env_to_value, state | - k (Value.Pointer (Pointer.Mutable (Pointer.Mutable.get_sub - mutable index sub_projection sub_injection sub_to_value - ))) ⇓ - to_value - | P_state }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.GetSubPointer mutable index) k ⇓ - to_value - | P_state }} - | CallPrimitiveEnvRead + let mutable' := + Pointer.Mutable.get_sub mutable index sub_projection sub_injection sub_to_value in + t index (Pointer.Mutable mutable) (Pointer.Mutable mutable'). +End HasSubPointerWith. + +Module Run. + Reserved Notation "{{ stack | e ⇓ output_to_value }}". + + Inductive t {Output : Set} (stack : Stack.t) (output_to_value : Output -> Value.t + Exception.t) : + M -> Set := + | Pure + (output : Output) + (output' : Value.t + Exception.t) : + output' = output_to_value output -> + {{ stack | LowM.Pure output' ⇓ output_to_value }} + | CallPrimitiveStateAlloc {A : Set} + (value : A) (value' : Value.t) + (to_value : A -> Value.t) + (pointer : Pointer.t Value.t) + (stack' : Stack.t) + (k : Value.t -> M) : + value' = to_value value -> + HasAllocWith.t to_value stack value pointer stack' -> + {{ stack' | k (Value.Pointer pointer) ⇓ output_to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.StateAlloc value') k ⇓ output_to_value }} + | CallPrimitiveStateRead {A : Set} + (pointer : Pointer.t Value.t) + (value : A) (value' : Value.t) + (to_value : A -> Value.t) + (k : Value.t -> M) : + value' = to_value value -> + HasReadWith.t to_value stack value pointer -> + {{ stack | k value' ⇓ output_to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.StateRead pointer) k ⇓ output_to_value }} + | CallPrimitiveStateWrite + {A : Set} + (value : A) (value' : Value.t) + (to_value : A -> Value.t) + (mutable : Pointer.Mutable.t Value.t to_value) + (stack' : Stack.t) + (k : Value.t -> M) : + value' = to_value value -> + HasWriteWith.t stack value mutable stack' -> + {{ stack' | k (Value.Tuple []) ⇓ output_to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.StateWrite mutable value') k ⇓ output_to_value }} + | CallPrimitiveGetSubPointer + (index : Pointer.Index.t) + (pointer pointer' : Pointer.t Value.t) (k : Value.t -> M) : - {{ env, env_to_value, state | k (env_to_value env) ⇓ to_value | P_state }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive Primitive.EnvRead k ⇓ to_value - | P_state }} + HasSubPointerWith.t index pointer pointer' -> + {{ stack | k (Value.Pointer pointer') ⇓ output_to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.GetSubPointer pointer index) k ⇓ output_to_value }} | CallPrimitiveGetFunction (name : string) (generic_tys : list Ty.t) (function : list Ty.t -> list Value.t -> M) (k : Value.t -> M) : - let closure := - Value.Closure (existS (Value.t, M) (function generic_tys)) in + let closure := Value.Closure (existS (_, _) (function generic_tys)) in M.IsFunction name function -> - {{ env, env_to_value, state | k closure ⇓ to_value | P_state }} -> - {{ env, env_to_value, state | - LowM.CallPrimitive (Primitive.GetFunction name generic_tys) k ⇓ - to_value - | P_state }} + {{ stack | k closure ⇓ output_to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.GetFunction name generic_tys) k ⇓ output_to_value }} | CallPrimitiveGetAssociatedFunction (ty : Ty.t) (name : string) (generic_tys : list Ty.t) (associated_function : list Ty.t -> list Value.t -> M) (k : Value.t -> M) : - let closure := - Value.Closure (existS (Value.t, M) (associated_function generic_tys)) in + let closure := Value.Closure (existS (_, _) (associated_function generic_tys)) in M.IsAssociatedFunction ty name associated_function -> - {{ env, env_to_value, state | k closure ⇓ to_value | P_state }} -> - {{ env, env_to_value, state | + {{ stack | k closure ⇓ output_to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.GetAssociatedFunction ty name generic_tys) k ⇓ - to_value - | P_state }} + output_to_value + }} | CallPrimitiveGetTraitMethod (trait_name : string) (self_ty : Ty.t) (trait_tys : list Ty.t) (method_name : string) (generic_tys : list Ty.t) (method : list Ty.t -> list Value.t -> M) (k : Value.t -> M) : - let closure := - Value.Closure (existS (Value.t, M) (method generic_tys)) in - IsTraitMethod trait_name self_ty trait_tys method_name method -> - {{ env, env_to_value, state | k closure ⇓ to_value | P_state }} -> - {{ env, env_to_value, state | + let closure := Value.Closure (existS (_, _) (method generic_tys)) in + IsTraitMethod.t trait_name self_ty trait_tys method_name method -> + {{ stack | k closure ⇓ output_to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.GetTraitMethod trait_name @@ -214,56 +359,62 @@ Module Run. method_name generic_tys) k ⇓ - to_value - | P_state }} - | CallClosure {A_inter : Set} - (to_value_inter : A_inter -> Value.t + Exception.t) (P_state_inter : State -> Prop) + output_to_value + }} + | CallClosure {Output' : Set} + (output_to_value' : Output' -> Value.t + Exception.t) (f : list Value.t -> M) (args : list Value.t) (k : Value.t + Exception.t -> M) : - let closure := Value.Closure (existS (Value.t, M) f) in - {{ env, env_to_value, state | f args ⇓ to_value_inter | P_state_inter }} -> - (forall (value_inter : A_inter) (state_inter : State), - P_state_inter state_inter -> - {{ env, env_to_value, state_inter | k (to_value_inter value_inter) ⇓ to_value | P_state }} + let closure := Value.Closure (existS (_, _) f) in + {{ stack | f args ⇓ output_to_value' }} -> + (forall (output' : Output') (stack' : Stack.t), + (* We do not de-allocate what was already there on the stack. *) + IsWritePreserved.t stack stack' -> + {{ stack' | k (output_to_value' output') ⇓ output_to_value }} ) -> - {{ env, env_to_value, state | LowM.CallClosure closure args k ⇓ to_value | P_state }} + {{ stack | LowM.CallClosure closure args k ⇓ output_to_value }} + (* Might be useful to avoid having rewritings that block the evaluation. *) | Rewrite (e e' : M) : e = e' -> - {{ env, env_to_value, state | e' ⇓ to_value | P_state }} -> - {{ env, env_to_value, state | e ⇓ to_value | P_state }} - - where "{{ env , env_to_value , state | e ⇓ to_value | P_state }}" := - (t env env_to_value state to_value P_state e). - - Definition pure {A : Set} (e : M) (to_value : A -> Value.t + Exception.t) : Set := - forall - (State Address : Set) `(State.Trait State Address) - (Env : Set) (env : Env) (env_to_value : Env -> Value.t) - (state : State), - {{ env, env_to_value, state | - e ⇓ to_value - | fun state' => state' = state }}. + {{ stack | e' ⇓ output_to_value }} -> + {{ stack | e ⇓ output_to_value }} + + where "{{ stack | e ⇓ output_to_value }}" := + (t stack output_to_value e). + + Notation "{{ '_' | e ⇓ output_to_value }}" := + (forall (stack : Stack.t), + {{ stack | e ⇓ output_to_value }} + ). End Run. Import Run. -Fixpoint evaluate `{State.Trait} {Env A : Set} - {env : Env} {env_to_value : Env -> Value.t} {state : State} - {e : M} {to_value : A -> Value.t + Exception.t} - {P_state : State -> Prop} - (run : {{ env, env_to_value, state | e ⇓ to_value | P_state }}) : - A * { state : State | P_state state }. +Fixpoint evaluate {Output : Set} + {stack : Stack.t} {e : M} {output_to_value : Output -> Value.t + Exception.t} + (run : {{ stack | e ⇓ output_to_value }}) : + Output * { stack' : Stack.t @ IsWritePreserved.t stack stack' }. Proof. destruct run. { split. - { exact result. } - { eexists. + { exact output. } + { exists stack. + apply IsWritePreserved.reflexivity. + } + } + { destruct (evaluate _ _ _ _ run) as [output [stack'' H_stack'']]. + split. + { exact output. } + { exists stack''. + apply (IsWritePreserved.transitivity (stack2 := stack')); try assumption. match goal with - | H : P_state _ |- _ => exact H + | H : HasAllocWith.t _ _ _ _ _ |- _ => destruct H end. + { apply IsWritePreserved.reflexivity. } + { apply IsWritePreserved.reflexivity. + + } } - } - { eapply evaluate. exact run. } { eapply evaluate. @@ -290,10 +441,10 @@ Proof. { eapply evaluate. exact run. } - { destruct (evaluate _ _ _ _ _ _ _ _ _ _ _ run) as [value_inter [state_inter H_state_inter]]. + { destruct (evaluate _ _ _ _ _ _ _ _ _ run) as [value_inter [stack_inter H_state_inter]]. eapply evaluate. match goal with - | H : forall _ _ _, _ |- _ => apply (H value_inter) + | H : forall _ _ _, _ |- _ => apply (H value_inter stack_inter) end. exact H_state_inter. } @@ -330,19 +481,17 @@ Module SubPointer. {runner : SubPointer.Runner.t A Sub_A} (H_runner : Runner.Valid.t runner) (mutable : Pointer.Mutable.t (A := A) Value.t φ) - `{State.Trait} {Env : Set} (env : Env) (env_to_value : Env -> Value.t) (state : State) + `{State.Trait} (env : Value.t) (stack : State) (to_value : Result -> Value.t + Exception.t) (P_state : State -> Prop) (k : Value.t -> M) (index : Pointer.Index.t) (H_index : index = runner.(SubPointer.Runner.index)) : - {{ env, env_to_value, state | + {{ stack | k (Value.Pointer (Pointer.Mutable (SubPointer.get_sub mutable runner))) ⇓ - to_value - | P_state }} -> - {{ env, env_to_value, state | + to_value }} -> + {{ stack | LowM.CallPrimitive (Primitive.GetSubPointer mutable index) k ⇓ - to_value - | P_state }}. + to_value }}. Proof. (* We are careful in this proof not to do `rewrite` on the expressions to avoid blocking the [evaluate] function. *) @@ -351,7 +500,7 @@ Module SubPointer. rewrite H_index; reflexivity. } apply (Run.CallPrimitiveGetSubPointer - _ _ _ _ _ _ + _ _ _ _ _ runner.(SubPointer.Runner.index) runner.(SubPointer.Runner.projection) runner.(SubPointer.Runner.injection) @@ -361,35 +510,28 @@ Module SubPointer. Defined. End SubPointer. -(** Simplify the usual case of read of immediate value. *) -Lemma read_of_immediate (v : Value.t) : - M.read (Value.Pointer (Pointer.Immediate v)) = - M.pure v. -Proof. - reflexivity. -Qed. - Ltac run_symbolic_state_read := - match goal with - | |- Run.t _ _ _ _ _ (LowM.CallPrimitive (Primitive.StateRead ( - Pointer.Mutable.Make ?address _ _ _ _ - )) _) => - let H := fresh "H" in - epose proof (H := Run.CallPrimitiveStateRead _ _ _ _ _ address); - eapply H; [reflexivity | reflexivity |]; - clear H - end. + eapply Run.CallPrimitiveStateRead; [ + match goal with + | |- context [Pointer.Mutable.Make ?address] => + let H := fresh "H" in + epose proof (H := IsRead.Mutable _ address); + eapply H; reflexivity; + clear H + | _ => apply IsRead.Immediate + end + |]. Ltac run_symbolic_state_write := match goal with - | |- Run.t ?env ?env_to_value ?state ?to_value ?P_state + | |- Run.t ?env ?stack ?to_value ?P_state (LowM.CallPrimitive (Primitive.StateWrite ( Pointer.Mutable.Make ?address ?path ?big_to_value ?projection ?injection ) ?value') ?k) => let H := fresh "H" in epose proof (H := Run.CallPrimitiveStateWrite - env env_to_value state to_value P_state address path big_to_value projection injection _ + env stack to_value P_state address path big_to_value projection injection _ value' _ _ _ k ); apply H; try reflexivity; @@ -398,7 +540,7 @@ Ltac run_symbolic_state_write := Ltac run_symbolic_one_step := match goal with - | |- Run.t _ _ _ _ _ _ => + | |- Run.t _ _ _ _ _ => (* We do not use [Run.CallClosure] and let the user use existing lemma for this kind of case. *) (eapply Run.Pure; trivial) || @@ -413,3 +555,25 @@ Ltac run_symbolic := cbn || run_symbolic_one_step ). + +Module StatelessFunction. + (** We describe a stateless function as its implementation together the ability to get a run in a + stateless environment. *) + Record t {Args Output : Set} + {args_to_value : Args -> list Value.t} {output_to_value : Output -> Value.t} : + Set := { + f : list Value.t -> M; + run (args : Args) : + {{ _, _ | + f (args_to_value args) ⇓ + fun v => inl (output_to_value v) + | _ }} + }. + Arguments t {_ _}. + + Global Instance IsToValue {Args Output : Set} + (args_to_value : Args -> list Value.t) (output_to_value : Output -> Value.t) : + ToValue (t args_to_value output_to_value) := { + φ v := Value.Closure (existS (_, _) v.(f)); + }. +End StatelessFunction. diff --git a/CoqOfRust/revm/function_stack.v b/CoqOfRust/revm/function_stack.v index 2a28522fc..ab6c7a137 100644 --- a/CoqOfRust/revm/function_stack.v +++ b/CoqOfRust/revm/function_stack.v @@ -255,7 +255,7 @@ Module function_stack. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "usize", [], "hash", [ __H ] |), @@ -490,7 +490,7 @@ Module function_stack. let program_counter := M.alloc (| program_counter |) in let new_idx := M.alloc (| new_idx |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -525,7 +525,7 @@ Module function_stack. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -634,7 +634,7 @@ Module function_stack. ltac:(M.monadic (let frame := M.copy (| γ |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -674,7 +674,7 @@ Module function_stack. (let self := M.alloc (| self |) in let idx := M.alloc (| idx |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/revm/gas.v b/CoqOfRust/revm/gas.v index ab66a7ebc..1f5437d3c 100644 --- a/CoqOfRust/revm/gas.v +++ b/CoqOfRust/revm/gas.v @@ -307,7 +307,7 @@ Module gas. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), @@ -321,7 +321,7 @@ Module gas. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), @@ -485,23 +485,22 @@ Module gas. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.U64, - M.read (| + BinOp.Wrap.sub + Integer.U64 + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "revm_interpreter::gas::Gas", "limit" |) - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "revm_interpreter::gas::Gas", "remaining" |) - |) - |))) + |)))) | _, _ => M.impossible end. @@ -560,7 +559,7 @@ Module gas. (let self := M.alloc (| self |) in let returned := M.alloc (| returned |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -569,7 +568,7 @@ Module gas. |) in M.write (| β, - BinOp.Panic.add (| Integer.U64, M.read (| β |), M.read (| returned |) |) + BinOp.Wrap.add Integer.U64 (M.read (| β |)) (M.read (| returned |)) |) in M.alloc (| Value.Tuple [] |) |))) @@ -589,7 +588,7 @@ Module gas. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -617,17 +616,14 @@ Module gas. (let self := M.alloc (| self |) in let refund := M.alloc (| refund |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_struct_record_field (| M.read (| self |), "revm_interpreter::gas::Gas", "refunded" |) in - M.write (| - β, - BinOp.Panic.add (| Integer.I64, M.read (| β |), M.read (| refund |) |) - |) in + M.write (| β, BinOp.Wrap.add Integer.I64 (M.read (| β |)) (M.read (| refund |)) |) in M.alloc (| Value.Tuple [] |) |))) | _, _ => M.impossible @@ -649,7 +645,7 @@ Module gas. (let self := M.alloc (| self |) in let is_london := M.alloc (| is_london |) in M.read (| - let max_refund_quotient := + let~ max_refund_quotient := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -664,7 +660,7 @@ Module gas. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -684,18 +680,17 @@ Module gas. |), [ M.read (| self |) ] |)); - BinOp.Panic.div (| - Integer.U64, - M.call_closure (| + BinOp.Wrap.div + Integer.U64 + (M.call_closure (| M.get_associated_function (| Ty.path "revm_interpreter::gas::Gas", "spent", [] |), [ M.read (| self |) ] - |), - M.read (| max_refund_quotient |) - |) + |)) + (M.read (| max_refund_quotient |)) ] |)) |) in @@ -719,7 +714,7 @@ Module gas. (let self := M.alloc (| self |) in let refund := M.alloc (| refund |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -775,8 +770,8 @@ Module gas. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let remaining := M.copy (| γ0_0 |) in let overflow := M.copy (| γ0_1 |) in - let success := M.alloc (| UnOp.Pure.not (M.read (| overflow |)) |) in - let _ := + let~ success := M.alloc (| UnOp.Pure.not (M.read (| overflow |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -788,7 +783,7 @@ Module gas. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/revm/gas/calc.v b/CoqOfRust/revm/gas/calc.v index eb07bb803..dd5754e7c 100644 --- a/CoqOfRust/revm/gas/calc.v +++ b/CoqOfRust/revm/gas/calc.v @@ -85,7 +85,7 @@ Module gas. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let sstore_clears_schedule := + let~ sstore_clears_schedule := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -116,27 +116,25 @@ Module gas. |) in M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.sub (| - Integer.U64, - M.read (| + (BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.sub + Integer.U64 + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::SSTORE_RESET" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::COLD_SLOAD_COST" |) - |) - |), - M.read (| + |))) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::ACCESS_LIST_STORAGE_KEY" |) - |) - |)) + |))) |))); fun γ => ltac:(M.monadic @@ -210,8 +208,8 @@ Module gas. sstore_clears_schedule)); fun γ => ltac:(M.monadic - (let refund := M.alloc (| Value.Integer 0 |) in - let _ := + (let~ refund := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -264,15 +262,14 @@ Module gas. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := refund in M.write (| β, - BinOp.Panic.sub (| - Integer.I64, - M.read (| β |), - M.read (| sstore_clears_schedule |) - |) + BinOp.Wrap.sub + Integer.I64 + (M.read (| β |)) + (M.read (| sstore_clears_schedule |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -306,17 +303,16 @@ Module gas. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := refund in M.write (| β, - BinOp.Panic.add (| - Integer.I64, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.I64 + (M.read (| β |)) + (M.read (| sstore_clears_schedule - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -329,7 +325,7 @@ Module gas. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -386,19 +382,18 @@ Module gas. M.alloc (| Value.Tuple [ - BinOp.Panic.sub (| - Integer.U64, - M.read (| + BinOp.Wrap.sub + Integer.U64 + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::SSTORE_RESET" |) - |), - M.read (| + |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::COLD_SLOAD_COST" |) - |) - |); + |)); M.read (| M.get_constant (| "revm_interpreter::gas::constants::WARM_STORAGE_READ_COST" @@ -468,44 +463,40 @@ Module gas. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := refund in M.write (| β, - BinOp.Panic.add (| - Integer.I64, - M.read (| β |), - M.rust_cast - (BinOp.Panic.sub (| - Integer.U64, - M.read (| + BinOp.Wrap.add + Integer.I64 + (M.read (| β |)) + (M.rust_cast + (BinOp.Wrap.sub + Integer.U64 + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::SSTORE_SET" |) - |), - M.read (| gas_sload |) - |)) - |) + |)) + (M.read (| gas_sload |)))) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := refund in M.write (| β, - BinOp.Panic.add (| - Integer.I64, - M.read (| β |), - M.rust_cast - (BinOp.Panic.sub (| - Integer.U64, - M.read (| + BinOp.Wrap.add + Integer.I64 + (M.read (| β |)) + (M.rust_cast + (BinOp.Wrap.sub + Integer.U64 + (M.read (| gas_sstore_reset - |), - M.read (| gas_sload |) - |)) - |) + |)) + (M.read (| gas_sload |)))) |) in M.alloc (| Value.Tuple [] |))) ] @@ -568,6 +559,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_sstore_refund : + M.IsFunction "revm_interpreter::gas::calc::sstore_refund" sstore_refund. + (* pub const fn create2_cost(len: u64) -> Option { CREATE.checked_add(tri!(cost_per_word(len, KECCAK256WORD))) @@ -610,7 +604,8 @@ Module gas. v)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -626,6 +621,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_create2_cost : + M.IsFunction "revm_interpreter::gas::calc::create2_cost" create2_cost. + (* const fn log2floor(value: U256) -> u64 { let mut l: u64 = 256; @@ -657,12 +655,12 @@ Module gas. M.catch_return (| ltac:(M.monadic (M.read (| - let l := M.alloc (| Value.Integer 256 |) in - let i := M.alloc (| Value.Integer 3 |) in - let _ := + let~ l := M.alloc (| Value.Integer 256 |) in + let~ i := M.alloc (| Value.Integer 3 |) in + let~ _ := M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -692,27 +690,23 @@ Module gas. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := l in M.write (| β, - BinOp.Panic.sub (| - Integer.U64, - M.read (| β |), - Value.Integer 64 - |) + BinOp.Wrap.sub Integer.U64 (M.read (| β |)) (Value.Integer 64) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := l in M.write (| β, - BinOp.Panic.sub (| - Integer.U64, - M.read (| β |), - M.rust_cast + BinOp.Wrap.sub + Integer.U64 + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "u64", @@ -734,8 +728,7 @@ Module gas. |) |) ] - |)) - |) + |))) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -763,11 +756,10 @@ Module gas. M.never_to_any (| M.read (| M.return_ (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| l |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| l |)) + (Value.Integer 1) |) |) |) @@ -776,7 +768,7 @@ Module gas. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -796,11 +788,11 @@ Module gas. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.sub (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) |) in @@ -810,6 +802,8 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_log2floor : M.IsFunction "revm_interpreter::gas::calc::log2floor" log2floor. + (* pub fn exp_cost(spec_id: SpecId, power: U256) -> Option { if power == U256::ZERO { @@ -869,7 +863,7 @@ Module gas. |))); fun γ => ltac:(M.monadic - (let gas_byte := + (let~ gas_byte := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -915,7 +909,7 @@ Module gas. ] |) |) in - let gas := + let~ gas := M.copy (| M.match_operator (| M.alloc (| @@ -980,21 +974,19 @@ Module gas. [ Ty.path "u64" ] |), [ - BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.div (| - Integer.U64, - M.call_closure (| + BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.div + Integer.U64 + (M.call_closure (| M.get_function (| "revm_interpreter::gas::calc::log2floor", [] |), [ M.read (| power |) ] - |), - Value.Integer 8 - |), - Value.Integer 1 - |) + |)) + (Value.Integer 8)) + (Value.Integer 1) ] |) ] @@ -1137,6 +1129,8 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_exp_cost : M.IsFunction "revm_interpreter::gas::calc::exp_cost" exp_cost. + (* pub const fn verylowcopy_cost(len: u64) -> Option { VERYLOW.checked_add(tri!(cost_per_word(len, COPY))) @@ -1179,7 +1173,8 @@ Module gas. v)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -1195,6 +1190,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_verylowcopy_cost : + M.IsFunction "revm_interpreter::gas::calc::verylowcopy_cost" verylowcopy_cost. + (* pub const fn extcodecopy_cost(spec_id: SpecId, len: u64, is_cold: bool) -> Option { let base_gas = if spec_id.is_enabled_in(SpecId::BERLIN) { @@ -1217,7 +1215,7 @@ Module gas. M.catch_return (| ltac:(M.monadic (M.read (| - let base_gas := + let~ base_gas := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -1319,7 +1317,8 @@ Module gas. v)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1339,6 +1338,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_extcodecopy_cost : + M.IsFunction "revm_interpreter::gas::calc::extcodecopy_cost" extcodecopy_cost. + (* pub const fn log_cost(n: u8, len: u64) -> Option { tri!(LOG.checked_add(tri!(LOGDATA.checked_mul(len)))).checked_add(LOGTOPIC * n as u64) @@ -1396,7 +1398,9 @@ Module gas. v)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| @@ -1424,7 +1428,8 @@ Module gas. v)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -1434,17 +1439,18 @@ Module gas. ] |) |); - BinOp.Panic.mul (| - Integer.U64, - M.read (| M.get_constant (| "revm_interpreter::gas::constants::LOGTOPIC" |) |), - M.rust_cast (M.read (| n |)) - |) + BinOp.Wrap.mul + Integer.U64 + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::LOGTOPIC" |) |)) + (M.rust_cast (M.read (| n |))) ] |))) |))) | _, _ => M.impossible end. + Axiom Function_log_cost : M.IsFunction "revm_interpreter::gas::calc::log_cost" log_cost. + (* pub const fn keccak256_cost(len: u64) -> Option { KECCAK256.checked_add(tri!(cost_per_word(len, KECCAK256WORD))) @@ -1487,7 +1493,8 @@ Module gas. v)); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.return_ (| Value.StructTuple "core::option::Option::None" [] |) @@ -1503,6 +1510,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_keccak256_cost : + M.IsFunction "revm_interpreter::gas::calc::keccak256_cost" keccak256_cost. + (* pub const fn cost_per_word(len: u64, multiple: u64) -> Option { multiple.checked_mul(num_words(len)) @@ -1527,6 +1537,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_cost_per_word : + M.IsFunction "revm_interpreter::gas::calc::cost_per_word" cost_per_word. + (* pub const fn initcode_cost(len: u64) -> u64 { let Some(cost) = cost_per_word(len, INITCODE_WORD_COST) else { @@ -1570,6 +1583,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_initcode_cost : + M.IsFunction "revm_interpreter::gas::calc::initcode_cost" initcode_cost. + (* pub const fn sload_cost(spec_id: SpecId, is_cold: bool) -> u64 { if spec_id.is_enabled_in(SpecId::BERLIN) { @@ -1705,6 +1721,8 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_sload_cost : M.IsFunction "revm_interpreter::gas::calc::sload_cost" sload_cost. + (* pub fn sstore_cost( spec_id: SpecId, @@ -1753,7 +1771,7 @@ Module gas. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1822,7 +1840,7 @@ Module gas. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let gas_cost := + let~ gas_cost := M.alloc (| M.call_closure (| M.get_function (| @@ -1832,7 +1850,7 @@ Module gas. [ M.read (| original |); M.read (| current |); M.read (| new |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1844,19 +1862,18 @@ Module gas. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := gas_cost in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::COLD_SLOAD_COST" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -1935,6 +1952,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_sstore_cost : + M.IsFunction "revm_interpreter::gas::calc::sstore_cost" sstore_cost. + (* fn istanbul_sstore_cost( original: U256, @@ -2064,6 +2084,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_istanbul_sstore_cost : + M.IsFunction "revm_interpreter::gas::calc::istanbul_sstore_cost" istanbul_sstore_cost. + (* fn frontier_sstore_cost(current: U256, new: U256) -> u64 { if current == U256::ZERO && new != U256::ZERO { @@ -2123,6 +2146,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_frontier_sstore_cost : + M.IsFunction "revm_interpreter::gas::calc::frontier_sstore_cost" frontier_sstore_cost. + (* pub const fn selfdestruct_cost(spec_id: SpecId, res: SelfDestructResult) -> u64 { // EIP-161: State trie clearing (invariant-preserving alternative) @@ -2161,7 +2187,7 @@ Module gas. (let spec_id := M.alloc (| spec_id |) in let res := M.alloc (| res |) in M.read (| - let should_charge_topup := + let~ should_charge_topup := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2222,7 +2248,7 @@ Module gas. ] |) |) in - let selfdestruct_gas_topup := + let~ selfdestruct_gas_topup := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2256,7 +2282,7 @@ Module gas. ] |) |) in - let selfdestruct_gas := + let~ selfdestruct_gas := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2287,15 +2313,14 @@ Module gas. ] |) |) in - let gas := + let~ gas := M.alloc (| - BinOp.Panic.add (| - Integer.U64, - M.read (| selfdestruct_gas |), - M.read (| selfdestruct_gas_topup |) - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| selfdestruct_gas |)) + (M.read (| selfdestruct_gas_topup |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2332,15 +2357,14 @@ Module gas. let β := gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::COLD_ACCOUNT_ACCESS_COST" |) - |) - |) + |)) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] @@ -2350,6 +2374,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_selfdestruct_cost : + M.IsFunction "revm_interpreter::gas::calc::selfdestruct_cost" selfdestruct_cost. + (* pub const fn call_cost( spec_id: SpecId, @@ -2397,7 +2424,7 @@ Module gas. let is_cold := M.alloc (| is_cold |) in let new_account_accounting := M.alloc (| new_account_accounting |) in M.read (| - let gas := + let~ gas := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2465,7 +2492,7 @@ Module gas. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2473,23 +2500,22 @@ Module gas. ltac:(M.monadic (let γ := M.use transfers_value in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::CALLVALUE" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2535,19 +2561,18 @@ Module gas. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::NEWACCOUNT" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) @@ -2555,19 +2580,18 @@ Module gas. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := let β := gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::NEWACCOUNT" |) - |) - |) + |)) |) in M.alloc (| Value.Tuple [] |))) ] @@ -2580,6 +2604,8 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_call_cost : M.IsFunction "revm_interpreter::gas::calc::call_cost" call_cost. + (* pub const fn warm_cold_cost(is_cold: bool) -> u64 { if is_cold { @@ -2616,6 +2642,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_warm_cold_cost : + M.IsFunction "revm_interpreter::gas::calc::warm_cold_cost" warm_cold_cost. + (* pub const fn memory_gas_for_len(len: usize) -> u64 { memory_gas(crate::interpreter::num_words(len as u64)) @@ -2638,6 +2667,9 @@ Module gas. | _, _ => M.impossible end. + Axiom Function_memory_gas_for_len : + M.IsFunction "revm_interpreter::gas::calc::memory_gas_for_len" memory_gas_for_len. + (* pub const fn memory_gas(num_words: u64) -> u64 { MEMORY @@ -2660,19 +2692,20 @@ Module gas. M.read (| num_words |) ] |); - BinOp.Panic.div (| - Integer.U64, - M.call_closure (| + BinOp.Wrap.div + Integer.U64 + (M.call_closure (| M.get_associated_function (| Ty.path "u64", "saturating_mul", [] |), [ M.read (| num_words |); M.read (| num_words |) ] - |), - Value.Integer 512 - |) + |)) + (Value.Integer 512) ] |))) | _, _ => M.impossible end. + Axiom Function_memory_gas : M.IsFunction "revm_interpreter::gas::calc::memory_gas" memory_gas. + (* pub fn validate_initial_tx_gas( spec_id: SpecId, @@ -2742,8 +2775,8 @@ Module gas. let access_list := M.alloc (| access_list |) in let initcodes := M.alloc (| initcodes |) in M.read (| - let initial_gas := M.alloc (| Value.Integer 0 |) in - let zero_data_len := + let~ initial_gas := M.alloc (| Value.Integer 0 |) in + let~ zero_data_len := M.alloc (| M.rust_cast (M.call_closure (| @@ -2817,11 +2850,11 @@ Module gas. ] |)) |) in - let non_zero_data_len := + let~ non_zero_data_len := M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.rust_cast + BinOp.Wrap.sub + Integer.U64 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -2829,11 +2862,10 @@ Module gas. [] |), [ M.read (| input |) ] - |)), - M.read (| zero_data_len |) - |) + |))) + (M.read (| zero_data_len |)) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2857,7 +2889,7 @@ Module gas. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2876,7 +2908,9 @@ Module gas. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2888,7 +2922,7 @@ Module gas. 0 |) in let initcode := M.copy (| γ0_0 |) in - let zeros := + let~ zeros := M.alloc (| M.rust_cast (M.call_closure (| @@ -3002,26 +3036,25 @@ Module gas. ] |)) |) in - let _ := + let~ _ := let β := zero_data_len in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| zeros |) - |) + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| zeros |)) |) in - let _ := + let~ _ := let β := non_zero_data_len in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Panic.sub (| - Integer.U64, - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.sub + Integer.U64 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "bytes::bytes::Bytes", @@ -3040,10 +3073,8 @@ Module gas. [ M.read (| initcode |) ] |) ] - |)), - M.read (| zeros |) - |) - |) + |))) + (M.read (| zeros |))) |) in M.alloc (| Value.Tuple [] |))) ] @@ -3052,33 +3083,31 @@ Module gas. |))) ] |)) in - let _ := + let~ _ := let β := initial_gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Panic.mul (| - Integer.U64, - M.read (| zero_data_len |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.mul + Integer.U64 + (M.read (| zero_data_len |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::TRANSACTION_ZERO_DATA" |) - |) - |) - |) + |))) |) in - let _ := + let~ _ := let β := initial_gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Panic.mul (| - Integer.U64, - M.read (| non_zero_data_len |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.mul + Integer.U64 + (M.read (| non_zero_data_len |)) + (M.read (| M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3110,11 +3139,9 @@ Module gas. fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 68 |))) ] |) - |) - |) - |) + |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3138,7 +3165,7 @@ Module gas. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let accessed_slots := + let~ accessed_slots := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3225,10 +3252,10 @@ Module gas. let γ1_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let slots := M.alloc (| γ1_1 |) in - BinOp.Panic.add (| - Integer.U64, - M.read (| slot_count |), - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (M.read (| slot_count |)) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply @@ -3241,8 +3268,7 @@ Module gas. [] |), [ M.read (| slots |) ] - |)) - |))) + |))))) ] |))) ] @@ -3252,16 +3278,16 @@ Module gas. ] |) |) in - let _ := + let~ _ := let β := initial_gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Panic.mul (| - Integer.U64, - M.rust_cast + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.mul + Integer.U64 + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.apply @@ -3282,45 +3308,41 @@ Module gas. [] |), [ M.read (| access_list |) ] - |)), - M.read (| + |))) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::ACCESS_LIST_ADDRESS" |) - |) - |) - |) + |))) |) in - let _ := + let~ _ := let β := initial_gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - BinOp.Panic.mul (| - Integer.U64, - M.read (| accessed_slots |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.mul + Integer.U64 + (M.read (| accessed_slots |)) + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::ACCESS_LIST_STORAGE_KEY" |) - |) - |) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := initial_gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.read (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.read (| M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3363,10 +3385,9 @@ Module gas. fun γ => ltac:(M.monadic (M.alloc (| Value.Integer 21000 |))) ] |) - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3396,10 +3417,10 @@ Module gas. let β := initial_gas in M.write (| β, - BinOp.Panic.add (| - Integer.U64, - M.read (| β |), - M.call_closure (| + BinOp.Wrap.add + Integer.U64 + (M.read (| β |)) + (M.call_closure (| M.get_function (| "revm_interpreter::gas::calc::initcode_cost", [] |), [ M.rust_cast @@ -3412,8 +3433,7 @@ Module gas. [ M.read (| input |) ] |)) ] - |) - |) + |)) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] @@ -3422,5 +3442,8 @@ Module gas. |))) | _, _ => M.impossible end. + + Axiom Function_validate_initial_tx_gas : + M.IsFunction "revm_interpreter::gas::calc::validate_initial_tx_gas" validate_initial_tx_gas. End calc. End gas. diff --git a/CoqOfRust/revm/gas/constants.v b/CoqOfRust/revm/gas/constants.v index 26aefb476..899bffec3 100644 --- a/CoqOfRust/revm/gas/constants.v +++ b/CoqOfRust/revm/gas/constants.v @@ -104,11 +104,12 @@ Module gas. M.run ltac:(M.monadic (M.alloc (| - BinOp.Panic.sub (| - Integer.U64, - M.read (| M.get_constant (| "revm_interpreter::gas::constants::SSTORE_RESET" |) |), - M.read (| M.get_constant (| "revm_interpreter::gas::constants::COLD_SLOAD_COST" |) |) - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| M.get_constant (| "revm_interpreter::gas::constants::SSTORE_RESET" |) |)) + (M.read (| + M.get_constant (| "revm_interpreter::gas::constants::COLD_SLOAD_COST" |) + |)) |))). Definition value_INITCODE_WORD_COST : Value.t := diff --git a/CoqOfRust/revm/host.v b/CoqOfRust/revm/host.v index 6da1870e1..c0beb386a 100644 --- a/CoqOfRust/revm/host.v +++ b/CoqOfRust/revm/host.v @@ -949,7 +949,7 @@ Module host. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), @@ -963,7 +963,7 @@ Module host. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), @@ -977,7 +977,7 @@ Module host. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), diff --git a/CoqOfRust/revm/host/dummy.v b/CoqOfRust/revm/host/dummy.v index 169cae59b..1e4a8e6bc 100644 --- a/CoqOfRust/revm/host/dummy.v +++ b/CoqOfRust/revm/host/dummy.v @@ -574,7 +574,7 @@ Module host. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -597,7 +597,7 @@ Module host. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -870,7 +870,7 @@ Module host. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -984,7 +984,7 @@ Module host. 0 |) in let entry := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1103,7 +1103,7 @@ Module host. let index := M.alloc (| index |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| diff --git a/CoqOfRust/revm/instruction_result.v b/CoqOfRust/revm/instruction_result.v index faad7e0ea..64a878647 100644 --- a/CoqOfRust/revm/instruction_result.v +++ b/CoqOfRust/revm/instruction_result.v @@ -235,138 +235,308 @@ Module instruction_result. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Continue" + |) in M.alloc (| M.read (| Value.String "Continue" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Stop" + |) in M.alloc (| M.read (| Value.String "Stop" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Return" + |) in M.alloc (| M.read (| Value.String "Return" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" + |) in M.alloc (| M.read (| Value.String "SelfDestruct" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContract" + |) in M.alloc (| M.read (| Value.String "ReturnContract" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Revert" + |) in M.alloc (| M.read (| Value.String "Revert" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" + |) in M.alloc (| M.read (| Value.String "CallTooDeep" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" + |) in M.alloc (| M.read (| Value.String "OutOfFunds" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + |) in M.alloc (| M.read (| Value.String "CallOrCreate" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + |) in M.alloc (| M.read (| Value.String "OutOfGas" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + |) in M.alloc (| M.read (| Value.String "MemoryOOG" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::MemoryLimitOOG" + |) in M.alloc (| M.read (| Value.String "MemoryLimitOOG" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::PrecompileOOG" + |) in M.alloc (| M.read (| Value.String "PrecompileOOG" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + |) in M.alloc (| M.read (| Value.String "InvalidOperandOOG" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OpcodeNotFound" + |) in M.alloc (| M.read (| Value.String "OpcodeNotFound" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallNotAllowedInsideStatic" + |) in M.alloc (| M.read (| Value.String "CallNotAllowedInsideStatic" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + |) in M.alloc (| M.read (| Value.String "StateChangeDuringStaticCall" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidFEOpcode" + |) in M.alloc (| M.read (| Value.String "InvalidFEOpcode" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidJump" + |) in M.alloc (| M.read (| Value.String "InvalidJump" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + |) in M.alloc (| M.read (| Value.String "NotActivated" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + |) in M.alloc (| M.read (| Value.String "StackUnderflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StackOverflow" + |) in M.alloc (| M.read (| Value.String "StackOverflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfOffset" + |) in M.alloc (| M.read (| Value.String "OutOfOffset" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateCollision" + |) in M.alloc (| M.read (| Value.String "CreateCollision" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OverflowPayment" + |) in M.alloc (| M.read (| Value.String "OverflowPayment" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::PrecompileError" + |) in M.alloc (| M.read (| Value.String "PrecompileError" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::NonceOverflow" + |) in M.alloc (| M.read (| Value.String "NonceOverflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateContractSizeLimit" + |) in M.alloc (| M.read (| Value.String "CreateContractSizeLimit" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateContractStartingWithEF" + |) in M.alloc (| M.read (| Value.String "CreateContractStartingWithEF" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateInitCodeSizeLimit" + |) in M.alloc (| M.read (| Value.String "CreateInitCodeSizeLimit" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + |) in M.alloc (| M.read (| Value.String "FatalExternalError" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContractInNotInitEOF" + |) in M.alloc (| M.read (| Value.String "ReturnContractInNotInitEOF" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + |) in M.alloc (| M.read (| Value.String "EOFOpcodeDisabledInLegacy" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::EOFFunctionStackOverflow" + |) in M.alloc (| M.read (| Value.String "EOFFunctionStackOverflow" |) |))) ] |) @@ -428,7 +598,7 @@ Module instruction_result. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -438,7 +608,7 @@ Module instruction_result. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -505,7 +675,7 @@ Module instruction_result. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -556,21 +726,30 @@ Module instruction_result. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "revm_primitives::result::SuccessReason::Return" |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::Return" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "revm_primitives::result::SuccessReason::Stop" |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::Stop" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::SuccessReason::SelfDestruct" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" [] @@ -648,35 +827,60 @@ Module instruction_result. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::OutOfGasError::Basic" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::OutOfGas" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::OutOfGasError::InvalidOperand" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::OutOfGasError::Memory" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::OutOfGasError::MemoryLimit" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::MemoryLimitOOG" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::OutOfGasError::Precompile" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::PrecompileOOG" [] @@ -685,126 +889,216 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::OpcodeNotFound" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::OpcodeNotFound" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::InvalidFEOpcode" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::InvalidFEOpcode" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::InvalidJump" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::InvalidJump" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::NotActivated" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::NotActivated" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::StackOverflow" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::StackOverflow" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::StackUnderflow" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::OutOfOffset" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::OutOfOffset" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::CreateCollision" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::CreateCollision" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::PrecompileError" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::PrecompileError" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::NonceOverflow" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::NonceOverflow" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::CreateContractSizeLimit" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::CreateContractSizeLimit" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::CreateContractStartingWithEF" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::CreateContractStartingWithEF" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::CreateInitCodeSizeLimit" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::CreateInitCodeSizeLimit" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::OverflowPayment" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::OverflowPayment" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::StateChangeDuringStaticCall" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::CallNotAllowedInsideStatic" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::CallNotAllowedInsideStatic" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::OutOfFunds" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_primitives::result::HaltReason::CallTooDeep" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" [] @@ -845,11 +1139,46 @@ Module instruction_result. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Continue" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Stop" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Return" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContract" + |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -887,9 +1216,30 @@ Module instruction_result. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Revert" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" + |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -927,31 +1277,206 @@ Module instruction_result. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::MemoryLimitOOG" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::PrecompileOOG" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OpcodeNotFound" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallNotAllowedInsideStatic" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidFEOpcode" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidJump" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StackOverflow" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfOffset" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateCollision" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OverflowPayment" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::PrecompileError" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::NonceOverflow" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateContractSizeLimit" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateContractStartingWithEF" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateInitCodeSizeLimit" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContractInNotInitEOF" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::EOFFunctionStackOverflow" + |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -1052,6 +1577,11 @@ Module instruction_result. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Revert" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1089,6 +1619,11 @@ Module instruction_result. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::FatalExternalError" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1102,6 +1637,11 @@ Module instruction_result. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::InternalContinue" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1115,6 +1655,11 @@ Module instruction_result. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::InternalCallOrCreate" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1205,7 +1750,7 @@ Module instruction_result. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1215,7 +1760,7 @@ Module instruction_result. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1371,7 +1916,7 @@ Module instruction_result. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1381,7 +1926,7 @@ Module instruction_result. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "isize", [], "hash", [ __H ] |), @@ -1538,7 +2083,14 @@ Module instruction_result. M.match_operator (| self, [ - fun γ => ltac:(M.monadic (M.alloc (| Value.Bool true |))); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::SuccessOrHalt::Revert" + |) in + M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] |) @@ -1691,28 +2243,48 @@ Module instruction_result. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Continue" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::InternalContinue" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Stop" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Success" [ Value.StructTuple "revm_primitives::result::SuccessReason::Stop" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Return" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Success" [ Value.StructTuple "revm_primitives::result::SuccessReason::Return" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Success" [ @@ -1723,35 +2295,60 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Revert" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Revert" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallOrCreate" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::InternalCallOrCreate" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::CallTooDeep" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::OutOfFunds" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfGas" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1762,7 +2359,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::MemoryLimitOOG" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1777,7 +2379,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::MemoryOOG" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1789,7 +2396,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::PrecompileOOG" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1804,7 +2416,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidOperandOOG" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1822,8 +2439,22 @@ Module instruction_result. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OpcodeNotFound" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContractInNotInitEOF" + |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -1844,7 +2475,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallNotAllowedInsideStatic" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1855,7 +2491,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StateChangeDuringStaticCall" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1866,7 +2507,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidFEOpcode" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1877,21 +2523,36 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::InvalidJump" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::InvalidJump" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::NotActivated" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::NotActivated" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StackUnderflow" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::StackUnderflow" [] @@ -1899,7 +2560,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::StackOverflow" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::StackOverflow" [] @@ -1907,14 +2573,24 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfOffset" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::OutOfOffset" [] ] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateCollision" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1925,7 +2601,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OverflowPayment" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1936,7 +2617,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::PrecompileError" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1947,7 +2633,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::NonceOverflow" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::NonceOverflow" [] @@ -1958,8 +2649,22 @@ Module instruction_result. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateContractSizeLimit" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateContractStartingWithEF" + |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -1980,7 +2685,12 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CreateInitCodeSizeLimit" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ @@ -1991,14 +2701,24 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::FatalExternalError" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::EOFOpcodeDisabledInLegacy" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::Halt" [ Value.StructTuple "revm_primitives::result::HaltReason::OpcodeNotFound" [] @@ -2006,14 +2726,24 @@ Module instruction_result. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::EOFFunctionStackOverflow" + |) in + M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::SuccessOrHalt::FatalExternalError" [] |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContract" + |) in + M.alloc (| M.never_to_any (| M.call_closure (| M.get_function (| "core::panicking::panic_fmt", [] |), diff --git a/CoqOfRust/revm/instructions/arithmetic.v b/CoqOfRust/revm/instructions/arithmetic.v index a99830f5c..b9dc6d0cc 100644 --- a/CoqOfRust/revm/instructions/arithmetic.v +++ b/CoqOfRust/revm/instructions/arithmetic.v @@ -19,7 +19,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -54,7 +54,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -72,7 +72,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -103,7 +103,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -145,7 +145,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -165,6 +165,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_add : M.IsFunction "revm_interpreter::instructions::arithmetic::add" add. + (* pub fn mul(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::LOW); @@ -181,7 +183,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -214,7 +216,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -232,7 +234,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -263,7 +265,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -305,7 +307,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -325,6 +327,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_mul : M.IsFunction "revm_interpreter::instructions::arithmetic::mul" mul. + (* pub fn sub(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -341,7 +345,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -376,7 +380,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -394,7 +398,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -425,7 +429,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -467,7 +471,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -487,6 +491,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_sub : M.IsFunction "revm_interpreter::instructions::arithmetic::sub" sub. + (* pub fn div(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::LOW); @@ -505,7 +511,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -538,7 +544,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -556,7 +562,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -587,7 +593,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -653,7 +659,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -676,6 +682,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_div : M.IsFunction "revm_interpreter::instructions::arithmetic::div" div. + (* pub fn sdiv(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::LOW); @@ -692,7 +700,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -725,7 +733,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -743,7 +751,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -774,7 +782,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -816,7 +824,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -835,6 +843,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_sdiv : M.IsFunction "revm_interpreter::instructions::arithmetic::sdiv" sdiv. + (* pub fn rem(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::LOW); @@ -853,7 +863,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -886,7 +896,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -904,7 +914,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -935,7 +945,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1001,7 +1011,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -1024,6 +1034,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_rem : M.IsFunction "revm_interpreter::instructions::arithmetic::rem" rem. + (* pub fn smod(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::LOW); @@ -1040,7 +1052,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1073,7 +1085,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1091,7 +1103,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1122,7 +1134,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1181,6 +1193,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_smod : M.IsFunction "revm_interpreter::instructions::arithmetic::smod" smod. + (* pub fn addmod(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::MID); @@ -1197,7 +1211,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1230,7 +1244,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1248,7 +1262,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1279,7 +1293,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1337,6 +1351,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_addmod : + M.IsFunction "revm_interpreter::instructions::arithmetic::addmod" addmod. + (* pub fn mulmod(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::MID); @@ -1353,7 +1370,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1386,7 +1403,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1404,7 +1421,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1435,7 +1452,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1493,6 +1510,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_mulmod : + M.IsFunction "revm_interpreter::instructions::arithmetic::mulmod" mulmod. + (* pub fn exp(interpreter: &mut Interpreter, _host: &mut H) { pop_top!(interpreter, op1, op2); @@ -1509,7 +1529,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1540,7 +1560,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1582,7 +1602,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1640,7 +1660,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1660,10 +1680,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1680,7 +1702,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -1696,6 +1718,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_exp : M.IsFunction "revm_interpreter::instructions::arithmetic::exp" exp. + (* pub fn signextend(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::LOW); @@ -1719,7 +1743,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1752,7 +1776,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1770,7 +1794,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1801,7 +1825,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1879,7 +1903,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let ext := + let~ ext := M.copy (| M.SubPointer.get_array_field (| M.call_closure (| @@ -1893,20 +1917,18 @@ Module instructions. M.alloc (| Value.Integer 0 |) |) |) in - let bit_index := + let~ bit_index := M.alloc (| M.rust_cast - (BinOp.Panic.add (| - Integer.U64, - BinOp.Panic.mul (| - Integer.U64, - Value.Integer 8, - M.read (| ext |) - |), - Value.Integer 7 - |)) + (BinOp.Wrap.add + Integer.U64 + (BinOp.Wrap.mul + Integer.U64 + (Value.Integer 8) + (M.read (| ext |))) + (Value.Integer 7)) |) in - let bit := + let~ bit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1917,7 +1939,7 @@ Module instructions. [ M.read (| x |); M.read (| bit_index |) ] |) |) in - let mask := + let~ mask := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1959,7 +1981,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| x |), M.read (| @@ -2026,5 +2048,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_signextend : + M.IsFunction "revm_interpreter::instructions::arithmetic::signextend" signextend. End arithmetic. End instructions. diff --git a/CoqOfRust/revm/instructions/bitwise.v b/CoqOfRust/revm/instructions/bitwise.v index 8256790be..0bfd755f0 100644 --- a/CoqOfRust/revm/instructions/bitwise.v +++ b/CoqOfRust/revm/instructions/bitwise.v @@ -19,7 +19,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -54,7 +54,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -72,7 +72,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -103,7 +103,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -145,7 +145,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -176,6 +176,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_lt : M.IsFunction "revm_interpreter::instructions::bitwise::lt" lt. + (* pub fn gt(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -192,7 +194,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -227,7 +229,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -245,7 +247,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -276,7 +278,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -318,7 +320,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -349,6 +351,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_gt : M.IsFunction "revm_interpreter::instructions::bitwise::gt" gt. + (* pub fn slt(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -365,7 +369,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -400,7 +404,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -418,7 +422,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -449,7 +453,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -491,7 +495,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -533,6 +537,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_slt : M.IsFunction "revm_interpreter::instructions::bitwise::slt" slt. + (* pub fn sgt(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -549,7 +555,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -584,7 +590,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -602,7 +608,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -633,7 +639,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -675,7 +681,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -719,6 +725,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_sgt : M.IsFunction "revm_interpreter::instructions::bitwise::sgt" sgt. + (* pub fn eq(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -735,7 +743,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -770,7 +778,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -788,7 +796,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -819,7 +827,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -861,7 +869,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -892,6 +900,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_eq : M.IsFunction "revm_interpreter::instructions::bitwise::eq" eq. + (* pub fn iszero(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -908,7 +918,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -943,7 +953,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -961,7 +971,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -992,7 +1002,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1010,7 +1020,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op1 := + let~ op1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1027,7 +1037,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| op1 |), M.call_closure (| @@ -1056,6 +1066,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_iszero : M.IsFunction "revm_interpreter::instructions::bitwise::iszero" iszero. + (* pub fn bitand(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -1072,7 +1084,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1107,7 +1119,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1125,7 +1137,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1156,7 +1168,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1198,7 +1210,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -1220,6 +1232,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_bitand : M.IsFunction "revm_interpreter::instructions::bitwise::bitand" bitand. + (* pub fn bitor(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -1236,7 +1250,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1271,7 +1285,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1289,7 +1303,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1320,7 +1334,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1362,7 +1376,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -1384,6 +1398,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_bitor : M.IsFunction "revm_interpreter::instructions::bitwise::bitor" bitor. + (* pub fn bitxor(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -1400,7 +1416,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1435,7 +1451,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1453,7 +1469,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1484,7 +1500,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1526,7 +1542,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.call_closure (| @@ -1548,6 +1564,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_bitxor : M.IsFunction "revm_interpreter::instructions::bitwise::bitxor" bitxor. + (* pub fn not(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -1564,7 +1582,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1599,7 +1617,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1617,7 +1635,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1648,7 +1666,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1666,7 +1684,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let op1 := + let~ op1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1683,7 +1701,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| op1 |), M.call_closure (| @@ -1703,6 +1721,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_not : M.IsFunction "revm_interpreter::instructions::bitwise::not" not. + (* pub fn byte(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -1726,7 +1746,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1761,7 +1781,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1779,7 +1799,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1810,7 +1830,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1852,7 +1872,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let o1 := + let~ o1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1873,7 +1893,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1943,7 +1963,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.read (| @@ -1978,11 +1998,10 @@ Module instructions. |), [ M.read (| op2 |); - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 31, - M.read (| o1 |) - |) + BinOp.Wrap.sub + Integer.Usize + (Value.Integer 31) + (M.read (| o1 |)) ] |) ] @@ -2001,6 +2020,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_byte : M.IsFunction "revm_interpreter::instructions::bitwise::byte" byte. + (* pub fn shl(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, CONSTANTINOPLE); @@ -2018,7 +2039,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2048,7 +2069,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2066,7 +2087,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2101,7 +2122,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2119,7 +2140,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2150,7 +2171,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2192,7 +2213,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2224,7 +2245,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2305,6 +2326,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_shl : M.IsFunction "revm_interpreter::instructions::bitwise::shl" shl. + (* pub fn shr(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, CONSTANTINOPLE); @@ -2322,7 +2345,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2352,7 +2375,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2370,7 +2393,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2405,7 +2428,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2423,7 +2446,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2454,7 +2477,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2496,7 +2519,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2528,7 +2551,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2609,6 +2632,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_shr : M.IsFunction "revm_interpreter::instructions::bitwise::shr" shr. + (* pub fn sar(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, CONSTANTINOPLE); @@ -2648,7 +2673,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2678,7 +2703,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2696,7 +2721,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2731,7 +2756,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2749,7 +2774,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2780,7 +2805,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2822,7 +2847,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let op1 := M.copy (| γ0_0 |) in let op2 := M.copy (| γ0_1 |) in - let value_sign := + let~ value_sign := M.alloc (| M.call_closure (| M.get_function (| @@ -2832,7 +2857,7 @@ Module instructions. [ M.read (| op2 |) ] |) |) in - let _ := + let~ _ := M.write (| M.read (| op2 |), M.read (| @@ -2904,8 +2929,22 @@ Module instructions. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Plus" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Zero" + |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -2916,12 +2955,18 @@ Module instructions. end)) |))); fun γ => - ltac:(M.monadic (M.get_constant (| "ruint::MAX" |))) + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Minus" + |) in + M.get_constant (| "ruint::MAX" |))) ] |))); fun γ => ltac:(M.monadic - (let shift := + (let~ shift := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2958,8 +3003,22 @@ Module instructions. (M.find_or_pattern (| γ, [ - fun γ => ltac:(M.monadic (Value.Tuple [])); - fun γ => ltac:(M.monadic (Value.Tuple [])) + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Plus" + |) in + Value.Tuple [])); + fun γ => + ltac:(M.monadic + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Zero" + |) in + Value.Tuple [])) ], M.closure (fun γ => @@ -2984,7 +3043,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Minus" + |) in + M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::instructions::i256::two_compl", @@ -3047,6 +3111,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_sar : M.IsFunction "revm_interpreter::instructions::bitwise::sar" sar. + Module sar. Definition value_ONE : Value.t := M.run diff --git a/CoqOfRust/revm/instructions/contract.v b/CoqOfRust/revm/instructions/contract.v index afecbf9c1..795545c3a 100644 --- a/CoqOfRust/revm/instructions/contract.v +++ b/CoqOfRust/revm/instructions/contract.v @@ -31,16 +31,16 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -88,7 +88,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -152,9 +152,9 @@ Module instructions. (M.alloc (| BinOp.Pure.ne (M.read (| len |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let offset := + let~ offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -165,7 +165,7 @@ Module instructions. [ offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -213,7 +213,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -267,14 +267,14 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -343,7 +343,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -375,11 +375,10 @@ Module instructions. [ ("start", M.read (| offset |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - M.read (| len |) - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (M.read (| len |))) ] ] |))); @@ -404,6 +403,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_resize_memory : + M.IsFunction "revm_interpreter::instructions::contract::resize_memory" resize_memory. + (* pub fn eofcreate(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -467,7 +469,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -490,7 +492,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -508,7 +510,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -543,7 +545,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -561,7 +563,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let initcontainer_index := + let~ initcontainer_index := M.copy (| M.read (| M.SubPointer.get_struct_record_field (| @@ -571,7 +573,7 @@ Module instructions. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -602,7 +604,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -648,7 +650,7 @@ Module instructions. let salt := M.copy (| γ0_1 |) in let data_offset := M.copy (| γ0_2 |) in let data_size := M.copy (| γ0_3 |) in - let sub_container := + let~ sub_container := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -766,7 +768,7 @@ Module instructions. 0 |) in let return_range := M.copy (| γ0_0 |) in - let eof := + let~ eof := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -803,7 +805,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -865,7 +867,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -945,7 +947,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -966,10 +968,15 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -986,7 +993,7 @@ Module instructions. |))) ] |) in - let created_address := + let~ created_address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1025,7 +1032,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1096,7 +1103,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1131,6 +1138,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_eofcreate : + M.IsFunction "revm_interpreter::instructions::contract::eofcreate" eofcreate. + (* pub fn txcreate(interpreter: &mut Interpreter, host: &mut H) { require_eof!(interpreter); @@ -1220,7 +1230,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1243,7 +1253,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1261,7 +1271,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1296,7 +1306,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1314,7 +1324,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1345,7 +1355,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1393,7 +1403,7 @@ Module instructions. let salt := M.copy (| γ0_2 |) in let data_offset := M.copy (| γ0_3 |) in let data_size := M.copy (| γ0_4 |) in - let tx_initcode_hash := + let~ tx_initcode_hash := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1492,7 +1502,7 @@ Module instructions. 0 |) in let initcode := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1574,7 +1584,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1596,10 +1606,15 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1616,7 +1631,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1698,7 +1713,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1720,10 +1735,15 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1772,7 +1792,7 @@ Module instructions. 0 |) in let eof := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1802,7 +1822,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1853,7 +1873,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -1881,7 +1901,7 @@ Module instructions. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1924,7 +1944,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1975,7 +1995,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -2003,7 +2023,7 @@ Module instructions. (M.alloc (| Value.Tuple [] |))) ] |) in - let created_address := + let~ created_address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2040,7 +2060,7 @@ Module instructions. ] |) |) in - let gas_limit := + let~ gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2061,7 +2081,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2096,7 +2116,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2116,7 +2136,7 @@ Module instructions. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2170,7 +2190,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2195,6 +2215,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_txcreate : + M.IsFunction "revm_interpreter::instructions::contract::txcreate" txcreate. + (* pub fn return_contract(interpreter: &mut Interpreter, _host: &mut H) { require_init_eof!(interpreter); @@ -2259,7 +2282,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2282,7 +2305,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2300,7 +2323,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let deploy_container_index := + let~ deploy_container_index := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::instructions::utility::read_u16", [] |), @@ -2315,7 +2338,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2346,7 +2369,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2388,9 +2411,9 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let aux_data_offset := M.copy (| γ0_0 |) in let aux_data_size := M.copy (| γ0_1 |) in - let aux_data_size := + let~ aux_data_size := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2401,7 +2424,7 @@ Module instructions. [ aux_data_size ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2449,7 +2472,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2501,7 +2524,7 @@ Module instructions. ] |) |) in - let container := + let~ container := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2584,7 +2607,7 @@ Module instructions. ] |) |) in - let new_eof := + let~ new_eof := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2621,7 +2644,7 @@ Module instructions. ] |) |) in - let aux_slice := + let~ aux_slice := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -2640,9 +2663,9 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let aux_data_offset := + let~ aux_data_offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2653,7 +2676,7 @@ Module instructions. [ aux_data_offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2701,7 +2724,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2754,7 +2777,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2766,7 +2789,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2835,7 +2858,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2884,11 +2907,11 @@ Module instructions. ] |) |) in - let new_data_size := + let~ new_data_size := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "bytes::bytes::Bytes", "len", @@ -2916,18 +2939,17 @@ Module instructions. ] |) ] - |), - M.call_closure (| + |)) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| aux_slice |) ] - |) - |) + |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2948,7 +2970,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2966,7 +2988,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2998,7 +3020,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3016,7 +3038,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let output := + let~ output := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3086,13 +3108,13 @@ Module instructions. ] |) |) in - let result := + let~ result := M.alloc (| Value.StructTuple "revm_interpreter::instruction_result::InstructionResult::ReturnContract" [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3101,7 +3123,7 @@ Module instructions. |), M.read (| result |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3136,6 +3158,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_return_contract : + M.IsFunction "revm_interpreter::instructions::contract::return_contract" return_contract. + (* pub fn extcall_input(interpreter: &mut Interpreter) -> Option { pop_ret!(interpreter, input_offset, input_size, None); @@ -3158,7 +3183,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3189,7 +3214,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3231,7 +3256,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let input_offset := M.copy (| γ0_0 |) in let input_size := M.copy (| γ0_1 |) in - let return_memory_offset := + let~ return_memory_offset := M.copy (| M.match_operator (| M.alloc (| @@ -3360,6 +3385,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extcall_input : + M.IsFunction "revm_interpreter::instructions::contract::extcall_input" extcall_input. + (* pub fn extcall_gas_calc( interpreter: &mut Interpreter, @@ -3437,7 +3465,7 @@ Module instructions. 0 |) in let load_result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3455,7 +3483,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3493,7 +3521,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3519,7 +3547,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let call_cost := + let~ call_cost := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::gas::calc::call_cost", [] |), @@ -3547,7 +3575,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3581,7 +3609,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3601,14 +3629,14 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let gas_reduce := + let~ gas_reduce := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::max", [ Ty.path "u64" ] |), [ - BinOp.Panic.div (| - Integer.U64, - M.call_closure (| + BinOp.Wrap.div + Integer.U64 + (M.call_closure (| M.get_associated_function (| Ty.path "revm_interpreter::gas::Gas", "remaining", @@ -3621,14 +3649,13 @@ Module instructions. "gas" |) ] - |), - Value.Integer 64 - |); + |)) + (Value.Integer 64); Value.Integer 5000 ] |) |) in - let gas_limit := + let~ gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "u64", "saturating_sub", [] |), @@ -3654,7 +3681,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3673,7 +3700,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3693,7 +3720,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3727,7 +3754,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3757,6 +3784,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extcall_gas_calc : + M.IsFunction "revm_interpreter::instructions::contract::extcall_gas_calc" extcall_gas_calc. + (* pub fn extcall(interpreter: &mut Interpreter, host: &mut H) { require_eof!(interpreter); @@ -3802,7 +3832,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3825,7 +3855,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3843,7 +3873,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3874,7 +3904,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3892,7 +3922,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let target_address := + let~ target_address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3949,7 +3979,7 @@ Module instructions. 0 |) in let input := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3983,7 +4013,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4001,7 +4031,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4018,7 +4048,7 @@ Module instructions. ] |) |) in - let has_transfer := + let~ has_transfer := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4056,7 +4086,7 @@ Module instructions. 0 |) in let gas_limit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4128,7 +4158,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4149,6 +4179,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extcall : + M.IsFunction "revm_interpreter::instructions::contract::extcall" extcall. + (* pub fn extdcall(interpreter: &mut Interpreter, host: &mut H) { require_eof!(interpreter); @@ -4192,7 +4225,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4215,7 +4248,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4233,7 +4266,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4264,7 +4297,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4282,7 +4315,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let target_address := + let~ target_address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4364,7 +4397,7 @@ Module instructions. 0 |) in let gas_limit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4448,7 +4481,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4469,6 +4502,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extdcall : + M.IsFunction "revm_interpreter::instructions::contract::extdcall" extdcall. + (* pub fn extscall(interpreter: &mut Interpreter, host: &mut H) { require_eof!(interpreter); @@ -4510,7 +4546,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4533,7 +4569,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4551,7 +4587,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4582,7 +4618,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4600,7 +4636,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let target_address := + let~ target_address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4682,7 +4718,7 @@ Module instructions. 0 |) in let gas_limit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4758,7 +4794,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4779,6 +4815,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extscall : + M.IsFunction "revm_interpreter::instructions::contract::extscall" extscall. + (* pub fn create( interpreter: &mut Interpreter, @@ -4859,7 +4898,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4877,7 +4916,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4895,7 +4934,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4908,7 +4947,7 @@ Module instructions. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4941,7 +4980,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4963,7 +5002,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4994,7 +5033,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5038,9 +5077,9 @@ Module instructions. let value := M.copy (| γ0_0 |) in let code_offset := M.copy (| γ0_1 |) in let len := M.copy (| γ0_2 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5051,7 +5090,7 @@ Module instructions. [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5099,7 +5138,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5151,7 +5190,7 @@ Module instructions. ] |) |) in - let code := + let~ code := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5162,7 +5201,7 @@ Module instructions. [] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5178,7 +5217,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5207,7 +5246,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let max_initcode_size := + let~ max_initcode_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5289,7 +5328,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5310,7 +5349,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5329,7 +5368,7 @@ Module instructions. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5371,7 +5410,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5394,9 +5433,9 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let code_offset := + let~ code_offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5407,7 +5446,7 @@ Module instructions. [ code_offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5455,7 +5494,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5507,7 +5546,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5518,7 +5557,7 @@ Module instructions. [ M.read (| code_offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5587,7 +5626,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5609,7 +5648,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| code, M.call_closure (| @@ -5643,7 +5682,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let scheme := + let~ scheme := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -5660,7 +5699,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5695,7 +5734,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5713,7 +5752,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let salt := + let~ salt := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5730,7 +5769,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5810,7 +5849,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5831,10 +5870,15 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5858,7 +5902,7 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5896,7 +5940,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5922,7 +5966,7 @@ Module instructions. ] |) |) in - let gas_limit := + let~ gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5942,7 +5986,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5974,20 +6018,18 @@ Module instructions. let β := gas_limit in M.write (| β, - BinOp.Panic.sub (| - Integer.U64, - M.read (| β |), - BinOp.Panic.div (| - Integer.U64, - M.read (| gas_limit |), - Value.Integer 64 - |) - |) + BinOp.Wrap.sub + Integer.U64 + (M.read (| β |)) + (BinOp.Wrap.div + Integer.U64 + (M.read (| gas_limit |)) + (Value.Integer 64)) |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6021,7 +6063,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6039,7 +6081,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6087,7 +6129,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6106,6 +6148,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_create : M.IsFunction "revm_interpreter::instructions::contract::create" create. + (* pub fn call(interpreter: &mut Interpreter, host: &mut H) { pop!(interpreter, local_gas_limit); @@ -6172,7 +6216,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6203,7 +6247,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6221,7 +6265,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6238,7 +6282,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6269,7 +6313,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6287,7 +6331,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let to := + let~ to := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6324,7 +6368,7 @@ Module instructions. ] |) |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6352,7 +6396,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6383,7 +6427,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6401,7 +6445,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6418,7 +6462,7 @@ Module instructions. ] |) |) in - let has_transfer := + let~ has_transfer := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6431,7 +6475,7 @@ Module instructions. [ value; M.get_constant (| "ruint::ZERO" |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6456,7 +6500,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6559,7 +6603,7 @@ Module instructions. 0 |) in let gas_limit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6593,7 +6637,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6612,7 +6656,7 @@ Module instructions. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6624,7 +6668,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| gas_limit, M.call_closure (| @@ -6648,7 +6692,7 @@ Module instructions. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6715,7 +6759,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6738,6 +6782,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_call : M.IsFunction "revm_interpreter::instructions::contract::call" call. + (* pub fn call_code(interpreter: &mut Interpreter, host: &mut H) { pop!(interpreter, local_gas_limit); @@ -6799,7 +6845,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6830,7 +6876,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6848,7 +6894,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6865,7 +6911,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6896,7 +6942,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -6914,7 +6960,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let to := + let~ to := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6951,7 +6997,7 @@ Module instructions. ] |) |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6979,7 +7025,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7010,7 +7056,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7028,7 +7074,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let value := + let~ value := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7132,7 +7178,7 @@ Module instructions. 0 |) in let gas_limit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7166,7 +7212,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7185,7 +7231,7 @@ Module instructions. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7213,7 +7259,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| gas_limit, M.call_closure (| @@ -7237,7 +7283,7 @@ Module instructions. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7315,7 +7361,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7338,6 +7384,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_call_code : + M.IsFunction "revm_interpreter::instructions::contract::call_code" call_code. + (* pub fn delegate_call(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, HOMESTEAD); @@ -7389,7 +7438,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7419,7 +7468,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7437,7 +7486,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7468,7 +7517,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7486,7 +7535,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7503,7 +7552,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7534,7 +7583,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7552,7 +7601,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let to := + let~ to := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7589,7 +7638,7 @@ Module instructions. ] |) |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7695,7 +7744,7 @@ Module instructions. 0 |) in let gas_limit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7729,7 +7778,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7748,7 +7797,7 @@ Module instructions. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7838,7 +7887,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7861,6 +7910,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_delegate_call : + M.IsFunction "revm_interpreter::instructions::contract::delegate_call" delegate_call. + (* pub fn static_call(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, BYZANTIUM); @@ -7912,7 +7964,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7942,7 +7994,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -7960,7 +8012,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7991,7 +8043,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -8009,7 +8061,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8026,7 +8078,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8057,7 +8109,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -8075,7 +8127,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let to := + let~ to := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8112,7 +8164,7 @@ Module instructions. ] |) |) in - let local_gas_limit := + let~ local_gas_limit := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8218,7 +8270,7 @@ Module instructions. 0 |) in let gas_limit := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8252,7 +8304,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -8271,7 +8323,7 @@ Module instructions. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -8335,7 +8387,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -8357,5 +8409,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_static_call : + M.IsFunction "revm_interpreter::instructions::contract::static_call" static_call. End contract. End instructions. diff --git a/CoqOfRust/revm/instructions/contract/call_helpers.v b/CoqOfRust/revm/instructions/contract/call_helpers.v index ca441fa4b..a9dac0ae1 100644 --- a/CoqOfRust/revm/instructions/contract/call_helpers.v +++ b/CoqOfRust/revm/instructions/contract/call_helpers.v @@ -29,7 +29,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -60,7 +60,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -106,7 +106,7 @@ Module instructions. let in_len := M.copy (| γ0_1 |) in let out_offset := M.copy (| γ0_2 |) in let out_len := M.copy (| γ0_3 |) in - let in_range := + let~ in_range := M.copy (| M.match_operator (| M.alloc (| @@ -194,7 +194,7 @@ Module instructions. ] |) |) in - let input := + let~ input := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -205,7 +205,7 @@ Module instructions. [] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -231,7 +231,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| input, M.call_closure (| @@ -264,7 +264,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ret_range := + let~ ret_range := M.copy (| M.match_operator (| M.alloc (| @@ -364,6 +364,11 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_get_memory_input_and_out_ranges : + M.IsFunction + "revm_interpreter::instructions::contract::call_helpers::get_memory_input_and_out_ranges" + get_memory_input_and_out_ranges. + (* pub fn resize_memory_and_return_range( interpreter: &mut Interpreter, @@ -391,16 +396,16 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -448,7 +453,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -502,7 +507,7 @@ Module instructions. ] |) |) in - let offset := + let~ offset := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -519,9 +524,9 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let offset := + let~ offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -532,7 +537,7 @@ Module instructions. [ offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -580,7 +585,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -636,7 +641,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -647,7 +652,7 @@ Module instructions. [ M.read (| offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -716,7 +721,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -755,11 +760,7 @@ Module instructions. [ ("start", M.read (| offset |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - M.read (| len |) - |)) + BinOp.Wrap.add Integer.Usize (M.read (| offset |)) (M.read (| len |))) ] ] |) @@ -768,6 +769,11 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_resize_memory_and_return_range : + M.IsFunction + "revm_interpreter::instructions::contract::call_helpers::resize_memory_and_return_range" + resize_memory_and_return_range. + (* pub fn calc_call_gas( interpreter: &mut Interpreter, @@ -805,7 +811,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let call_cost := + let~ call_cost := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::gas::calc::call_cost", [] |), @@ -819,7 +825,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -850,7 +856,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -868,7 +874,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let gas_limit := + let~ gas_limit := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -898,7 +904,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let gas := + let~ gas := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -922,15 +928,13 @@ Module instructions. M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "u64" ] |), [ - BinOp.Panic.sub (| - Integer.U64, - M.read (| gas |), - BinOp.Panic.div (| - Integer.U64, - M.read (| gas |), - Value.Integer 64 - |) - |); + BinOp.Wrap.sub + Integer.U64 + (M.read (| gas |)) + (BinOp.Wrap.div + Integer.U64 + (M.read (| gas |)) + (Value.Integer 64)); M.read (| local_gas_limit |) ] |) @@ -946,6 +950,11 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_calc_call_gas : + M.IsFunction + "revm_interpreter::instructions::contract::call_helpers::calc_call_gas" + calc_call_gas. End call_helpers. End contract. End instructions. diff --git a/CoqOfRust/revm/instructions/control.v b/CoqOfRust/revm/instructions/control.v index f3176de28..f981f389c 100644 --- a/CoqOfRust/revm/instructions/control.v +++ b/CoqOfRust/revm/instructions/control.v @@ -22,7 +22,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -45,7 +45,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -63,7 +63,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -98,7 +98,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -116,7 +116,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset := + let~ offset := M.alloc (| M.rust_cast (M.call_closure (| @@ -135,7 +135,7 @@ Module instructions. ] |)) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -156,7 +156,7 @@ Module instructions. "instruction_pointer" |) |); - BinOp.Panic.add (| Integer.Isize, M.read (| offset |), Value.Integer 2 |) + BinOp.Wrap.add Integer.Isize (M.read (| offset |)) (Value.Integer 2) ] |) |) in @@ -166,6 +166,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_rjump : M.IsFunction "revm_interpreter::instructions::control::rjump" rjump. + (* pub fn rjumpi(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -190,7 +192,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -213,7 +215,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -231,7 +233,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -266,7 +268,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -284,7 +286,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -315,7 +317,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -333,7 +335,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let condition := + let~ condition := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -350,8 +352,8 @@ Module instructions. ] |) |) in - let offset := M.alloc (| Value.Integer 2 |) in - let _ := + let~ offset := M.alloc (| Value.Integer 2 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -372,14 +374,14 @@ Module instructions. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := offset in M.write (| β, - BinOp.Panic.add (| - Integer.Isize, - M.read (| β |), - M.rust_cast + BinOp.Wrap.add + Integer.Isize + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_function (| "revm_interpreter::instructions::utility::read_i16", @@ -394,14 +396,13 @@ Module instructions. |) |) ] - |)) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -432,6 +433,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_rjumpi : M.IsFunction "revm_interpreter::instructions::control::rjumpi" rjumpi. + (* pub fn rjumpv(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -467,7 +470,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -490,7 +493,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -508,7 +511,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -543,7 +546,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -561,7 +564,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -592,7 +595,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -610,7 +613,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let case := + let~ case := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -627,7 +630,7 @@ Module instructions. ] |) |) in - let case := + let~ case := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -648,7 +651,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -717,7 +720,7 @@ Module instructions. ] |) |) in - let max_index := + let~ max_index := M.alloc (| M.rust_cast (M.read (| @@ -730,23 +733,17 @@ Module instructions. |) |)) |) in - let offset := + let~ offset := M.alloc (| - BinOp.Panic.add (| - Integer.Isize, - BinOp.Panic.mul (| - Integer.Isize, - BinOp.Panic.add (| - Integer.Isize, - M.read (| max_index |), - Value.Integer 1 - |), - Value.Integer 2 - |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Isize + (BinOp.Wrap.mul + Integer.Isize + (BinOp.Wrap.add Integer.Isize (M.read (| max_index |)) (Value.Integer 1)) + (Value.Integer 2)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -759,14 +756,14 @@ Module instructions. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := let β := offset in M.write (| β, - BinOp.Panic.add (| - Integer.Isize, - M.read (| β |), - M.rust_cast + BinOp.Wrap.add + Integer.Isize + (M.read (| β |)) + (M.rust_cast (M.call_closure (| M.get_function (| "revm_interpreter::instructions::utility::read_i16", @@ -787,26 +784,23 @@ Module instructions. "instruction_pointer" |) |); - BinOp.Panic.add (| - Integer.Isize, - Value.Integer 1, - BinOp.Panic.mul (| - Integer.Isize, - M.read (| case |), - Value.Integer 2 - |) - |) + BinOp.Wrap.add + Integer.Isize + (Value.Integer 1) + (BinOp.Wrap.mul + Integer.Isize + (M.read (| case |)) + (Value.Integer 2)) ] |) ] - |)) - |) + |))) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -837,6 +831,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_rjumpv : M.IsFunction "revm_interpreter::instructions::control::rjumpv" rjumpv. + (* pub fn jump(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::MID); @@ -853,7 +849,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -886,7 +882,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -904,7 +900,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -935,7 +931,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -953,7 +949,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let target := + let~ target := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -970,7 +966,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -986,6 +982,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_jump : M.IsFunction "revm_interpreter::instructions::control::jump" jump. + (* pub fn jumpi(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::HIGH); @@ -1004,7 +1002,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1039,7 +1037,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1057,7 +1055,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1088,7 +1086,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1154,7 +1152,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1175,6 +1173,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_jumpi : M.IsFunction "revm_interpreter::instructions::control::jumpi" jumpi. + (* fn jump_inner(interpreter: &mut Interpreter, target: U256) { let target = as_usize_or_fail!(interpreter, target, InstructionResult::InvalidJump); @@ -1195,16 +1195,16 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let target := + let~ target := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), [ target ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1252,7 +1252,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1304,7 +1304,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1335,7 +1335,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1353,7 +1353,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1413,6 +1413,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_jump_inner : + M.IsFunction "revm_interpreter::instructions::control::jump_inner" jump_inner. + (* pub fn jumpdest_or_nop(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::JUMPDEST); @@ -1427,7 +1430,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1462,7 +1465,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1486,6 +1489,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_jumpdest_or_nop : + M.IsFunction "revm_interpreter::instructions::control::jumpdest_or_nop" jumpdest_or_nop. + (* pub fn callf(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -1517,7 +1523,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1540,7 +1546,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1558,7 +1564,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1591,7 +1597,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1609,7 +1615,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let idx := + let~ idx := M.alloc (| M.rust_cast (M.call_closure (| @@ -1628,7 +1634,7 @@ Module instructions. ] |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1659,7 +1665,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1677,7 +1683,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1691,18 +1697,17 @@ Module instructions. "revm_interpreter::interpreter::Interpreter", "function_stack" |); - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "revm_interpreter::interpreter::Interpreter", "program_counter", [] |), [ M.read (| interpreter |) ] - |), - Value.Integer 2 - |); + |)) + (Value.Integer 2); M.read (| idx |) ] |) @@ -1722,6 +1727,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_callf : M.IsFunction "revm_interpreter::instructions::control::callf" callf. + (* pub fn retf(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -1743,7 +1750,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1766,7 +1773,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1784,7 +1791,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1819,7 +1826,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1864,7 +1871,7 @@ Module instructions. 0 |) in let fframe := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1899,6 +1906,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_retf : M.IsFunction "revm_interpreter::instructions::control::retf" retf. + (* pub fn jumpf(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -1921,7 +1930,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1944,7 +1953,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1962,7 +1971,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1995,7 +2004,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2013,7 +2022,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let idx := + let~ idx := M.alloc (| M.rust_cast (M.call_closure (| @@ -2032,7 +2041,7 @@ Module instructions. ] |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2065,6 +2074,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_jumpf : M.IsFunction "revm_interpreter::instructions::control::jumpf" jumpf. + (* pub fn pc(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -2081,7 +2092,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2116,7 +2127,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2134,7 +2145,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2156,18 +2167,17 @@ Module instructions. [ Ty.path "usize" ] |), [ - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "revm_interpreter::interpreter::Interpreter", "program_counter", [] |), [ M.read (| interpreter |) ] - |), - Value.Integer 1 - |) + |)) + (Value.Integer 1) ] |) ] @@ -2195,7 +2205,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2216,6 +2226,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_pc : M.IsFunction "revm_interpreter::instructions::control::pc" pc. + (* fn return_inner(interpreter: &mut Interpreter, instruction_result: InstructionResult) { // zero gas cost @@ -2249,7 +2261,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2280,7 +2292,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2322,9 +2334,9 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let offset := M.copy (| γ0_0 |) in let len := M.copy (| γ0_1 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2335,7 +2347,7 @@ Module instructions. [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2383,7 +2395,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2435,7 +2447,7 @@ Module instructions. ] |) |) in - let output := + let~ output := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2448,7 +2460,7 @@ Module instructions. [] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2464,9 +2476,9 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let offset := + let~ offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2477,7 +2489,7 @@ Module instructions. [ offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2525,7 +2537,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2577,7 +2589,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2588,7 +2600,7 @@ Module instructions. [ M.read (| offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2657,7 +2669,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2724,7 +2736,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2733,7 +2745,7 @@ Module instructions. |), M.read (| instruction_result |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2768,6 +2780,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_return_inner : + M.IsFunction "revm_interpreter::instructions::control::return_inner" return_inner. + (* pub fn ret(interpreter: &mut Interpreter, _host: &mut H) { return_inner(interpreter, InstructionResult::Return); @@ -2780,7 +2795,7 @@ Module instructions. (let interpreter := M.alloc (| interpreter |) in let _host := M.alloc (| _host |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::instructions::control::return_inner", [] |), @@ -2797,6 +2812,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_ret : M.IsFunction "revm_interpreter::instructions::control::ret" ret. + (* pub fn revert(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, BYZANTIUM); @@ -2812,7 +2829,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2842,7 +2859,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2860,7 +2877,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2881,6 +2898,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_revert : M.IsFunction "revm_interpreter::instructions::control::revert" revert. + (* pub fn stop(interpreter: &mut Interpreter, _host: &mut H) { interpreter.instruction_result = InstructionResult::Stop; @@ -2893,7 +2912,7 @@ Module instructions. (let interpreter := M.alloc (| interpreter |) in let _host := M.alloc (| _host |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2907,6 +2926,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_stop : M.IsFunction "revm_interpreter::instructions::control::stop" stop. + (* pub fn invalid(interpreter: &mut Interpreter, _host: &mut H) { interpreter.instruction_result = InstructionResult::InvalidFEOpcode; @@ -2919,7 +2940,7 @@ Module instructions. (let interpreter := M.alloc (| interpreter |) in let _host := M.alloc (| _host |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2935,6 +2956,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_invalid : + M.IsFunction "revm_interpreter::instructions::control::invalid" invalid. + (* pub fn unknown(interpreter: &mut Interpreter, _host: &mut H) { interpreter.instruction_result = InstructionResult::OpcodeNotFound; @@ -2947,7 +2971,7 @@ Module instructions. (let interpreter := M.alloc (| interpreter |) in let _host := M.alloc (| _host |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2962,5 +2986,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_unknown : + M.IsFunction "revm_interpreter::instructions::control::unknown" unknown. End control. End instructions. diff --git a/CoqOfRust/revm/instructions/data.v b/CoqOfRust/revm/instructions/data.v index 191d88091..b11a458d6 100644 --- a/CoqOfRust/revm/instructions/data.v +++ b/CoqOfRust/revm/instructions/data.v @@ -33,7 +33,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -56,7 +56,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -74,7 +74,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -109,7 +109,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -127,7 +127,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -158,7 +158,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -176,7 +176,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -193,7 +193,7 @@ Module instructions. ] |) |) in - let offset_usize := + let~ offset_usize := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -214,7 +214,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -283,7 +283,7 @@ Module instructions. ] |) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -331,8 +331,8 @@ Module instructions. ] |) |) in - let word := M.alloc (| repeat (Value.Integer 0) 32 |) in - let _ := + let~ word := M.alloc (| repeat (Value.Integer 0) 32 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -370,7 +370,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| offset |), M.call_closure (| @@ -384,6 +384,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_data_load : + M.IsFunction "revm_interpreter::instructions::data::data_load" data_load. + (* pub fn data_loadn(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -415,7 +418,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -438,7 +441,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -456,7 +459,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -491,7 +494,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -509,7 +512,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset := + let~ offset := M.alloc (| M.rust_cast (M.call_closure (| @@ -528,7 +531,7 @@ Module instructions. ] |)) |) in - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -576,8 +579,8 @@ Module instructions. ] |) |) in - let word := M.alloc (| repeat (Value.Integer 0) 32 |) in - let _ := + let~ word := M.alloc (| repeat (Value.Integer 0) 32 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -615,7 +618,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -665,7 +668,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -680,7 +683,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -711,6 +714,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_data_loadn : + M.IsFunction "revm_interpreter::instructions::data::data_loadn" data_loadn. + (* pub fn data_size(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -729,7 +735,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -752,7 +758,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -770,7 +776,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -805,7 +811,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -823,7 +829,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let data_size := + let~ data_size := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -858,7 +864,7 @@ Module instructions. "data_size" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -906,7 +912,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -927,6 +933,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_data_size : + M.IsFunction "revm_interpreter::instructions::data::data_size" data_size. + (* pub fn data_copy(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -961,7 +970,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -984,7 +993,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1002,7 +1011,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1037,7 +1046,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1055,7 +1064,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1086,7 +1095,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1130,9 +1139,9 @@ Module instructions. let mem_offset := M.copy (| γ0_0 |) in let offset := M.copy (| γ0_1 |) in let size := M.copy (| γ0_2 |) in - let size := + let~ size := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1143,7 +1152,7 @@ Module instructions. [ size ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1191,7 +1200,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1243,7 +1252,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1265,9 +1274,9 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let mem_offset := + let~ mem_offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1278,7 +1287,7 @@ Module instructions. [ mem_offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1326,7 +1335,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1378,14 +1387,14 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| mem_offset |); M.read (| size |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1454,7 +1463,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1475,7 +1484,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1496,7 +1505,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1566,7 +1575,7 @@ Module instructions. ] |) |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1612,7 +1621,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1641,5 +1650,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_data_copy : + M.IsFunction "revm_interpreter::instructions::data::data_copy" data_copy. End data. End instructions. diff --git a/CoqOfRust/revm/instructions/host.v b/CoqOfRust/revm/instructions/host.v index af1eb16cf..2d3d706ec 100644 --- a/CoqOfRust/revm/instructions/host.v +++ b/CoqOfRust/revm/instructions/host.v @@ -35,7 +35,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -66,7 +66,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -84,7 +84,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let address := + let~ address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -141,7 +141,7 @@ Module instructions. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let balance := M.copy (| γ1_0 |) in let is_cold := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -288,7 +288,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -306,7 +306,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -347,7 +347,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -370,6 +370,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_balance : M.IsFunction "revm_interpreter::instructions::host::balance" balance. + (* pub fn selfbalance(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, ISTANBUL); @@ -390,7 +392,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -420,7 +422,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -438,7 +440,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -471,7 +473,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -521,7 +523,7 @@ Module instructions. let γ1_0 := M.SubPointer.get_tuple_field (| γ0_0, 0 |) in let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let balance := M.copy (| γ1_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -562,7 +564,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -585,6 +587,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_selfbalance : + M.IsFunction "revm_interpreter::instructions::host::selfbalance" selfbalance. + (* pub fn extcodesize(interpreter: &mut Interpreter, host: &mut H) { pop_address!(interpreter, address); @@ -612,7 +617,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -643,7 +648,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -661,7 +666,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let address := + let~ address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -718,7 +723,7 @@ Module instructions. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let code := M.copy (| γ1_0 |) in let is_cold := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -747,7 +752,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -787,7 +792,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -836,7 +841,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -871,7 +876,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -893,7 +898,7 @@ Module instructions. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -928,7 +933,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -952,7 +957,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1009,7 +1014,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1032,6 +1037,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extcodesize : + M.IsFunction "revm_interpreter::instructions::host::extcodesize" extcodesize. + (* pub fn extcodehash(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, CONSTANTINOPLE); @@ -1059,7 +1067,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1089,7 +1097,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1107,7 +1115,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1138,7 +1146,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1156,7 +1164,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let address := + let~ address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1219,7 +1227,7 @@ Module instructions. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let code_hash := M.copy (| γ1_0 |) in let is_cold := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1248,7 +1256,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1288,7 +1296,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1337,7 +1345,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1372,7 +1380,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1394,7 +1402,7 @@ Module instructions. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1429,7 +1437,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1453,7 +1461,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1494,7 +1502,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1517,6 +1525,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extcodehash : + M.IsFunction "revm_interpreter::instructions::host::extcodehash" extcodehash. + (* pub fn extcodecopy(interpreter: &mut Interpreter, host: &mut H) { pop_address!(interpreter, address); @@ -1554,7 +1565,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1585,7 +1596,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1603,7 +1614,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let address := + let~ address := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1640,7 +1651,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1671,7 +1682,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1741,9 +1752,9 @@ Module instructions. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let code := M.copy (| γ1_0 |) in let is_cold := M.copy (| γ1_1 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1754,7 +1765,7 @@ Module instructions. [ len_u256 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1802,7 +1813,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1854,7 +1865,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1916,7 +1927,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1937,10 +1948,15 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1957,7 +1973,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1981,9 +1997,9 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let memory_offset := + let~ memory_offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1994,7 +2010,7 @@ Module instructions. [ memory_offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2042,7 +2058,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2094,7 +2110,7 @@ Module instructions. ] |) |) in - let code_offset := + let~ code_offset := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -2121,7 +2137,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2208,7 +2224,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2219,7 +2235,7 @@ Module instructions. [ M.read (| memory_offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2288,7 +2304,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2310,7 +2326,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2373,6 +2389,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_extcodecopy : + M.IsFunction "revm_interpreter::instructions::host::extcodecopy" extcodecopy. + (* pub fn blockhash(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BLOCKHASH); @@ -2421,7 +2440,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2456,7 +2475,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2474,7 +2493,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2505,7 +2524,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2523,7 +2542,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let number := + let~ number := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2540,7 +2559,7 @@ Module instructions. ] |) |) in - let block_number := + let~ block_number := M.copy (| M.SubPointer.get_struct_record_field (| M.SubPointer.get_struct_record_field (| @@ -2555,7 +2574,7 @@ Module instructions. "number" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2587,7 +2606,7 @@ Module instructions. |) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let diff := + let~ diff := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2609,7 +2628,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2721,7 +2740,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let value := + let~ value := M.copy (| M.match_operator (| M.alloc (| @@ -2782,7 +2801,7 @@ Module instructions. M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let value := M.copy (| γ1_0 |) in let is_cold := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2832,7 +2851,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2856,7 +2875,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| number |), M.read (| value |) |) in M.return_ (| Value.Tuple [] |) |) @@ -2914,7 +2933,7 @@ Module instructions. 0 |) in let hash := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.read (| number |), M.call_closure (| @@ -2948,7 +2967,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.read (| number |), M.read (| M.get_constant (| "ruint::ZERO" |) |) @@ -2959,6 +2978,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_blockhash : + M.IsFunction "revm_interpreter::instructions::host::blockhash" blockhash. + (* pub fn sload(interpreter: &mut Interpreter, host: &mut H) { pop_top!(interpreter, index); @@ -2980,7 +3002,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3011,7 +3033,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3029,7 +3051,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let index := + let~ index := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3046,7 +3068,7 @@ Module instructions. ] |) |) in - let value := + let~ value := M.copy (| M.match_operator (| M.alloc (| @@ -3088,7 +3110,7 @@ Module instructions. let γ1_1 := M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let value := M.copy (| γ1_0 |) in let is_cold := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3135,7 +3157,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3157,13 +3179,15 @@ Module instructions. ] |) |) in - let _ := M.write (| M.read (| index |), M.read (| value |) |) in + let~ _ := M.write (| M.read (| index |), M.read (| value |) |) in M.alloc (| Value.Tuple [] |) |))) |))) | _, _ => M.impossible end. + Axiom Function_sload : M.IsFunction "revm_interpreter::instructions::host::sload" sload. + (* pub fn sstore(interpreter: &mut Interpreter, host: &mut H) { require_non_staticcall!(interpreter); @@ -3198,7 +3222,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3216,7 +3240,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3234,7 +3258,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3265,7 +3289,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3372,9 +3396,9 @@ Module instructions. let old := M.copy (| γ1_1 |) in let new := M.copy (| γ1_2 |) in let is_cold := M.copy (| γ1_3 |) in - let _ := + let~ _ := M.match_operator (| - let remaining_gas := + let~ remaining_gas := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3454,7 +3478,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3475,10 +3499,15 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3495,7 +3524,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3538,6 +3567,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_sstore : M.IsFunction "revm_interpreter::instructions::host::sstore" sstore. + (* pub fn tstore(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, CANCUN); @@ -3558,7 +3589,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3588,7 +3619,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3606,7 +3637,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3624,7 +3655,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3642,7 +3673,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3677,7 +3708,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3695,7 +3726,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3726,7 +3757,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3768,7 +3799,7 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let index := M.copy (| γ0_0 |) in let value := M.copy (| γ0_1 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3804,6 +3835,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_tstore : M.IsFunction "revm_interpreter::instructions::host::tstore" tstore. + (* pub fn tload(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, CANCUN); @@ -3823,7 +3856,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3853,7 +3886,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3871,7 +3904,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3906,7 +3939,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3924,7 +3957,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3955,7 +3988,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3973,7 +4006,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let index := + let~ index := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3990,7 +4023,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| index |), M.call_closure (| @@ -4018,6 +4051,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_tload : M.IsFunction "revm_interpreter::instructions::host::tload" tload. + (* pub fn log(interpreter: &mut Interpreter, host: &mut H) { require_non_staticcall!(interpreter); @@ -4061,7 +4096,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4079,7 +4114,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4097,7 +4132,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4128,7 +4163,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4170,9 +4205,9 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let offset := M.copy (| γ0_0 |) in let len := M.copy (| γ0_1 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4183,7 +4218,7 @@ Module instructions. [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4231,7 +4266,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4283,7 +4318,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4342,7 +4377,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4362,10 +4397,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4382,7 +4419,7 @@ Module instructions. |))) ] |) in - let data := + let~ data := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -4411,9 +4448,9 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (let offset := + (let~ offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4424,7 +4461,7 @@ Module instructions. [ offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4472,7 +4509,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4525,7 +4562,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4536,7 +4573,7 @@ Module instructions. [ M.read (| offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4605,7 +4642,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4658,7 +4695,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4696,7 +4733,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4714,7 +4751,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let topics := + let~ topics := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4736,7 +4773,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4771,7 +4808,7 @@ Module instructions. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4790,7 +4827,12 @@ Module instructions. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -4801,7 +4843,7 @@ Module instructions. "core::option::Option::Some", 0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4854,7 +4896,7 @@ Module instructions. |))) ] |)) in - let log := + let~ log := M.alloc (| Value.StructRecord "alloy_primitives::log::Log" @@ -4894,7 +4936,7 @@ Module instructions. |)) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4915,6 +4957,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_log : M.IsFunction "revm_interpreter::instructions::host::log" log. + (* pub fn selfdestruct(interpreter: &mut Interpreter, host: &mut H) { require_non_staticcall!(interpreter); @@ -4943,7 +4987,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4961,7 +5005,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4979,7 +5023,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5010,7 +5054,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5028,7 +5072,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let target := + let~ target := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5102,7 +5146,7 @@ Module instructions. 0 |) in let res := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5167,7 +5211,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5214,7 +5258,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5232,7 +5276,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5250,5 +5294,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_selfdestruct : + M.IsFunction "revm_interpreter::instructions::host::selfdestruct" selfdestruct. End host. End instructions. diff --git a/CoqOfRust/revm/instructions/host_env.v b/CoqOfRust/revm/instructions/host_env.v index 359dd5e79..4a6dd0d0f 100644 --- a/CoqOfRust/revm/instructions/host_env.v +++ b/CoqOfRust/revm/instructions/host_env.v @@ -19,7 +19,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -49,7 +49,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -67,7 +67,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -102,7 +102,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -120,7 +120,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -189,7 +189,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -210,6 +210,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_chainid : + M.IsFunction "revm_interpreter::instructions::host_env::chainid" chainid. + (* pub fn coinbase(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); @@ -225,7 +228,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -260,7 +263,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -278,7 +281,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -345,7 +348,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -366,6 +369,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_coinbase : + M.IsFunction "revm_interpreter::instructions::host_env::coinbase" coinbase. + (* pub fn timestamp(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); @@ -381,7 +387,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -416,7 +422,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -434,7 +440,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -494,7 +500,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -515,6 +521,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_timestamp : + M.IsFunction "revm_interpreter::instructions::host_env::timestamp" timestamp. + (* pub fn block_number(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); @@ -530,7 +539,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -565,7 +574,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -583,7 +592,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -643,7 +652,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -664,6 +673,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_block_number : + M.IsFunction "revm_interpreter::instructions::host_env::block_number" block_number. + (* pub fn difficulty(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); @@ -683,7 +695,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -718,7 +730,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -761,7 +773,7 @@ Module instructions. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -832,7 +844,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -850,7 +862,7 @@ Module instructions. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -910,7 +922,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -933,6 +945,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_difficulty : + M.IsFunction "revm_interpreter::instructions::host_env::difficulty" difficulty. + (* pub fn gaslimit(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); @@ -948,7 +963,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -983,7 +998,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1001,7 +1016,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1061,7 +1076,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1082,6 +1097,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_gaslimit : + M.IsFunction "revm_interpreter::instructions::host_env::gaslimit" gaslimit. + (* pub fn gasprice(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); @@ -1097,7 +1115,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1132,7 +1150,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1150,7 +1168,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1209,7 +1227,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1230,6 +1248,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_gasprice : + M.IsFunction "revm_interpreter::instructions::host_env::gasprice" gasprice. + (* pub fn basefee(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, LONDON); @@ -1246,7 +1267,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1276,7 +1297,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1294,7 +1315,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1329,7 +1350,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1347,7 +1368,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1407,7 +1428,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1428,6 +1449,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_basefee : + M.IsFunction "revm_interpreter::instructions::host_env::basefee" basefee. + (* pub fn origin(interpreter: &mut Interpreter, host: &mut H) { gas!(interpreter, gas::BASE); @@ -1443,7 +1467,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1478,7 +1502,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1496,7 +1520,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1563,7 +1587,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1584,6 +1608,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_origin : M.IsFunction "revm_interpreter::instructions::host_env::origin" origin. + (* pub fn blob_hash(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, CANCUN); @@ -1605,7 +1631,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1635,7 +1661,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1653,7 +1679,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1688,7 +1714,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1706,7 +1732,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1737,7 +1763,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1755,7 +1781,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let index := + let~ index := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1772,7 +1798,7 @@ Module instructions. ] |) |) in - let i := + let~ i := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1793,7 +1819,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1862,7 +1888,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| index |), M.read (| @@ -1943,7 +1969,10 @@ Module instructions. ] |) |))); - fun γ => ltac:(M.monadic (M.get_constant (| "ruint::ZERO" |))) + fun γ => + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.get_constant (| "ruint::ZERO" |))) ] |) |) @@ -1954,6 +1983,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_blob_hash : + M.IsFunction "revm_interpreter::instructions::host_env::blob_hash" blob_hash. + (* pub fn blob_basefee(interpreter: &mut Interpreter, host: &mut H) { check!(interpreter, CANCUN); @@ -1973,7 +2005,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2003,7 +2035,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2021,7 +2053,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2056,7 +2088,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2074,7 +2106,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2155,7 +2187,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2175,5 +2207,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_blob_basefee : + M.IsFunction "revm_interpreter::instructions::host_env::blob_basefee" blob_basefee. End host_env. End instructions. diff --git a/CoqOfRust/revm/instructions/i256.v b/CoqOfRust/revm/instructions/i256.v index acfdce494..2576e970c 100644 --- a/CoqOfRust/revm/instructions/i256.v +++ b/CoqOfRust/revm/instructions/i256.v @@ -81,14 +81,29 @@ Module instructions. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Minus" + |) in M.alloc (| M.read (| Value.String "Minus" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Zero" + |) in M.alloc (| M.read (| Value.String "Zero" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instructions::i256::Sign::Plus" + |) in M.alloc (| M.read (| Value.String "Plus" |) |))) ] |) @@ -128,7 +143,7 @@ Module instructions. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -138,7 +153,7 @@ Module instructions. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -205,7 +220,7 @@ Module instructions. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -215,7 +230,7 @@ Module instructions. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -260,7 +275,7 @@ Module instructions. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -270,7 +285,7 @@ Module instructions. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -309,7 +324,7 @@ Module instructions. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -404,11 +419,10 @@ Module instructions. M.get_associated_function (| Ty.path "ruint::Uint", "bit", [] |), [ M.read (| val |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| M.get_constant (| "ruint::BITS'1" |) |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| M.get_constant (| "ruint::BITS'1" |) |)) + (Value.Integer 1) ] |) |)) in @@ -444,6 +458,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_i256_sign : + M.IsFunction "revm_interpreter::instructions::i256::i256_sign" i256_sign. + (* pub fn i256_sign_compl(val: &mut U256) -> Sign { let sign = i256_sign(val); @@ -459,14 +476,14 @@ Module instructions. ltac:(M.monadic (let val := M.alloc (| val |) in M.read (| - let sign := + let~ sign := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::instructions::i256::i256_sign", [] |), [ M.read (| val |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -494,7 +511,7 @@ Module instructions. |) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -513,6 +530,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_i256_sign_compl : + M.IsFunction "revm_interpreter::instructions::i256::i256_sign_compl" i256_sign_compl. + (* fn u256_remove_sign(val: &mut U256) { // SAFETY: U256 does not have any padding bytes @@ -527,7 +547,7 @@ Module instructions. ltac:(M.monadic (let val := M.alloc (| val |) in M.read (| - let _ := + let~ _ := let β := M.SubPointer.get_array_field (| M.call_closure (| @@ -549,6 +569,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_u256_remove_sign : + M.IsFunction "revm_interpreter::instructions::i256::u256_remove_sign" u256_remove_sign. + (* pub fn two_compl_mut(op: &mut U256) { *op = two_compl( *op); @@ -560,7 +583,7 @@ Module instructions. ltac:(M.monadic (let op := M.alloc (| op |) in M.read (| - let _ := + let~ _ := M.write (| M.read (| op |), M.call_closure (| @@ -573,6 +596,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_two_compl_mut : + M.IsFunction "revm_interpreter::instructions::i256::two_compl_mut" two_compl_mut. + (* pub fn two_compl(op: U256) -> U256 { op.wrapping_neg() @@ -590,6 +616,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_two_compl : + M.IsFunction "revm_interpreter::instructions::i256::two_compl" two_compl. + (* pub fn i256_cmp(first: &U256, second: &U256) -> Ordering { let first_sign = i256_sign(first); @@ -609,14 +638,14 @@ Module instructions. (let first := M.alloc (| first |) in let second := M.alloc (| second |) in M.read (| - let first_sign := + let~ first_sign := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::instructions::i256::i256_sign", [] |), [ M.read (| first |) ] |) |) in - let second_sign := + let~ second_sign := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::instructions::i256::i256_sign", [] |), @@ -639,7 +668,8 @@ Module instructions. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -661,6 +691,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_i256_cmp : + M.IsFunction "revm_interpreter::instructions::i256::i256_cmp" i256_cmp. + (* pub fn i256_div(mut first: U256, mut second: U256) -> U256 { let second_sign = i256_sign_compl(&mut second); @@ -699,7 +732,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let second_sign := + let~ second_sign := M.alloc (| M.call_closure (| M.get_function (| @@ -709,7 +742,7 @@ Module instructions. [ second ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -748,7 +781,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let first_sign := + let~ first_sign := M.alloc (| M.call_closure (| M.get_function (| @@ -758,7 +791,7 @@ Module instructions. [ first ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -834,7 +867,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let d := + let~ d := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -847,7 +880,7 @@ Module instructions. [ M.read (| first |); M.read (| second |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -962,6 +995,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_i256_div : + M.IsFunction "revm_interpreter::instructions::i256::i256_div" i256_div. + (* pub fn i256_mod(mut first: U256, mut second: U256) -> U256 { let first_sign = i256_sign_compl(&mut first); @@ -995,7 +1031,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let first_sign := + let~ first_sign := M.alloc (| M.call_closure (| M.get_function (| @@ -1005,7 +1041,7 @@ Module instructions. [ first ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1044,7 +1080,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let second_sign := + let~ second_sign := M.alloc (| M.call_closure (| M.get_function (| @@ -1054,7 +1090,7 @@ Module instructions. [ second ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1093,7 +1129,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let r := + let~ r := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1106,7 +1142,7 @@ Module instructions. [ M.read (| first |); M.read (| second |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1160,5 +1196,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_i256_mod : + M.IsFunction "revm_interpreter::instructions::i256::i256_mod" i256_mod. End i256. End instructions. diff --git a/CoqOfRust/revm/instructions/memory.v b/CoqOfRust/revm/instructions/memory.v index 8450c09d1..e0dfb8a5f 100644 --- a/CoqOfRust/revm/instructions/memory.v +++ b/CoqOfRust/revm/instructions/memory.v @@ -21,7 +21,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -56,7 +56,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -74,7 +74,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -105,7 +105,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -123,7 +123,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let top := + let~ top := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -140,16 +140,16 @@ Module instructions. ] |) |) in - let offset := + let~ offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), [ M.read (| top |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -197,7 +197,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -249,14 +249,14 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| offset |); Value.Integer 32 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -322,7 +322,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -343,7 +343,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.read (| top |), M.call_closure (| @@ -368,6 +368,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_mload : M.IsFunction "revm_interpreter::instructions::memory::mload" mload. + (* pub fn mstore(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -386,7 +388,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -421,7 +423,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -439,7 +441,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -470,7 +472,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -512,9 +514,9 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let offset := M.copy (| γ0_0 |) in let value := M.copy (| γ0_1 |) in - let offset := + let~ offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -525,7 +527,7 @@ Module instructions. [ offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -573,7 +575,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -625,14 +627,14 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| offset |); Value.Integer 32 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -701,7 +703,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -722,7 +724,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -750,6 +752,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_mstore : M.IsFunction "revm_interpreter::instructions::memory::mstore" mstore. + (* pub fn mstore8(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -768,7 +772,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -803,7 +807,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -821,7 +825,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -852,7 +856,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -894,9 +898,9 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let offset := M.copy (| γ0_0 |) in let value := M.copy (| γ0_1 |) in - let offset := + let~ offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -907,7 +911,7 @@ Module instructions. [ offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -955,7 +959,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1007,14 +1011,14 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| offset |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1083,7 +1087,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1132,6 +1136,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_mstore8 : M.IsFunction "revm_interpreter::instructions::memory::mstore8" mstore8. + (* pub fn msize(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -1147,7 +1153,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1182,7 +1188,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1200,7 +1206,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1264,7 +1270,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1285,6 +1291,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_msize : M.IsFunction "revm_interpreter::instructions::memory::msize" msize. + (* pub fn mcopy(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, CANCUN); @@ -1315,7 +1323,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1345,7 +1353,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1363,7 +1371,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1394,7 +1402,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1438,9 +1446,9 @@ Module instructions. let dst := M.copy (| γ0_0 |) in let src := M.copy (| γ0_1 |) in let len := M.copy (| γ0_2 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1451,7 +1459,7 @@ Module instructions. [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1499,7 +1507,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1551,7 +1559,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1605,7 +1613,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1625,10 +1633,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1645,7 +1655,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1667,9 +1677,9 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let dst := + let~ dst := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1680,7 +1690,7 @@ Module instructions. [ dst ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1728,7 +1738,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1780,9 +1790,9 @@ Module instructions. ] |) |) in - let src := + let~ src := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1793,7 +1803,7 @@ Module instructions. [ src ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1841,7 +1851,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1893,7 +1903,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), @@ -1906,7 +1916,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1975,7 +1985,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1996,7 +2006,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2024,5 +2034,7 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_mcopy : M.IsFunction "revm_interpreter::instructions::memory::mcopy" mcopy. End memory. End instructions. diff --git a/CoqOfRust/revm/instructions/stack.v b/CoqOfRust/revm/instructions/stack.v index f2961ed7a..0a2f3c48f 100644 --- a/CoqOfRust/revm/instructions/stack.v +++ b/CoqOfRust/revm/instructions/stack.v @@ -20,7 +20,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -55,7 +55,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -102,7 +102,7 @@ Module instructions. 0 |) in let result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -120,6 +120,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_pop : M.IsFunction "revm_interpreter::instructions::stack::pop" pop. + (* pub fn push0(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, SHANGHAI); @@ -138,7 +140,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -168,7 +170,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -186,7 +188,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -221,7 +223,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -269,7 +271,7 @@ Module instructions. 0 |) in let result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -287,6 +289,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_push0 : M.IsFunction "revm_interpreter::instructions::stack::push0" push0. + (* pub fn push(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -312,7 +316,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -347,7 +351,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -365,7 +369,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let ip := + let~ ip := M.copy (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -373,7 +377,7 @@ Module instructions. "instruction_pointer" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -420,7 +424,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -436,7 +440,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -463,6 +467,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_push : M.IsFunction "revm_interpreter::instructions::stack::push" push. + (* pub fn dup(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -480,7 +486,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -515,7 +521,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -567,7 +573,7 @@ Module instructions. 0 |) in let result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -585,6 +591,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_dup : M.IsFunction "revm_interpreter::instructions::stack::dup" dup. + (* pub fn swap(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -602,7 +610,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -637,7 +645,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -689,7 +697,7 @@ Module instructions. 0 |) in let result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -707,6 +715,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_swap : M.IsFunction "revm_interpreter::instructions::stack::swap" swap. + (* pub fn dupn(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -727,7 +737,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -750,7 +760,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -768,7 +778,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -803,7 +813,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -821,7 +831,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let imm := + let~ imm := M.copy (| M.read (| M.SubPointer.get_struct_record_field (| @@ -831,7 +841,7 @@ Module instructions. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -851,11 +861,10 @@ Module instructions. "revm_interpreter::interpreter::Interpreter", "stack" |); - BinOp.Panic.add (| - Integer.Usize, - M.rust_cast (M.read (| imm |)), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.rust_cast (M.read (| imm |))) + (Value.Integer 1) ] |) |) in @@ -866,7 +875,7 @@ Module instructions. 0 |) in let result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -879,7 +888,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -910,6 +919,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_dupn : M.IsFunction "revm_interpreter::instructions::stack::dupn" dupn. + (* pub fn swapn(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -930,7 +941,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -953,7 +964,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -971,7 +982,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1006,7 +1017,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1024,7 +1035,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let imm := + let~ imm := M.copy (| M.read (| M.SubPointer.get_struct_record_field (| @@ -1034,7 +1045,7 @@ Module instructions. |) |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1054,11 +1065,10 @@ Module instructions. "revm_interpreter::interpreter::Interpreter", "stack" |); - BinOp.Panic.add (| - Integer.Usize, - M.rust_cast (M.read (| imm |)), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.rust_cast (M.read (| imm |))) + (Value.Integer 1) ] |) |) in @@ -1069,7 +1079,7 @@ Module instructions. 0 |) in let result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1082,7 +1092,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1113,6 +1123,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_swapn : M.IsFunction "revm_interpreter::instructions::stack::swapn" swapn. + (* pub fn exchange(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -1136,7 +1148,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1159,7 +1171,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1177,7 +1189,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1212,7 +1224,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1230,7 +1242,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let imm := + let~ imm := M.copy (| M.read (| M.SubPointer.get_struct_record_field (| @@ -1240,23 +1252,21 @@ Module instructions. |) |) |) in - let n := + let~ n := M.alloc (| - BinOp.Panic.add (| - Integer.U8, - BinOp.Panic.shr (| M.read (| imm |), Value.Integer 4 |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U8 + (BinOp.Wrap.shr (M.read (| imm |)) (Value.Integer 4)) + (Value.Integer 1) |) in - let m := + let~ m := M.alloc (| - BinOp.Panic.add (| - Integer.U8, - BinOp.Pure.bit_and (M.read (| imm |)) (Value.Integer 15), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U8 + (BinOp.Pure.bit_and (M.read (| imm |)) (Value.Integer 15)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1288,7 +1298,7 @@ Module instructions. 0 |) in let result := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1301,7 +1311,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1331,5 +1341,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_exchange : + M.IsFunction "revm_interpreter::instructions::stack::exchange" exchange. End stack. End instructions. diff --git a/CoqOfRust/revm/instructions/system.v b/CoqOfRust/revm/instructions/system.v index 7c8628d15..80296ad2e 100644 --- a/CoqOfRust/revm/instructions/system.v +++ b/CoqOfRust/revm/instructions/system.v @@ -27,7 +27,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -58,7 +58,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -100,9 +100,9 @@ Module instructions. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let offset := M.copy (| γ0_0 |) in let len_ptr := M.copy (| γ0_1 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -113,7 +113,7 @@ Module instructions. [ M.read (| len_ptr |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -161,7 +161,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -213,7 +213,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -267,7 +267,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -287,10 +287,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -307,7 +309,7 @@ Module instructions. |))) ] |) in - let hash := + let~ hash := M.copy (| M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -329,9 +331,9 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (let from := + (let~ from := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -342,7 +344,7 @@ Module instructions. [ offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -390,7 +392,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -443,7 +445,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -454,7 +456,7 @@ Module instructions. [ M.read (| from |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -523,7 +525,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -579,7 +581,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.write (| M.read (| len_ptr |), M.call_closure (| @@ -601,6 +603,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_keccak256 : + M.IsFunction "revm_interpreter::instructions::system::keccak256" keccak256. + (* pub fn address(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -616,7 +621,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -651,7 +656,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -669,7 +674,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -727,7 +732,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -748,6 +753,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_address : M.IsFunction "revm_interpreter::instructions::system::address" address. + (* pub fn caller(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -763,7 +770,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -798,7 +805,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -816,7 +823,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -874,7 +881,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -895,6 +902,8 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_caller : M.IsFunction "revm_interpreter::instructions::system::caller" caller. + (* pub fn codesize(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -912,7 +921,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -947,7 +956,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -965,7 +974,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1000,7 +1009,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1061,7 +1070,7 @@ Module instructions. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -1086,7 +1095,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1153,7 +1162,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1174,6 +1183,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_codesize : + M.IsFunction "revm_interpreter::instructions::system::codesize" codesize. + (* pub fn codecopy(interpreter: &mut Interpreter, _host: &mut H) { pop!(interpreter, memory_offset, code_offset, len); @@ -1206,7 +1218,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1237,7 +1249,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1281,9 +1293,9 @@ Module instructions. let memory_offset := M.copy (| γ0_0 |) in let code_offset := M.copy (| γ0_1 |) in let len := M.copy (| γ0_2 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1294,7 +1306,7 @@ Module instructions. [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1342,7 +1354,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1394,7 +1406,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1448,7 +1460,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1468,10 +1480,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1488,7 +1502,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1510,9 +1524,9 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let memory_offset := + let~ memory_offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1523,7 +1537,7 @@ Module instructions. [ memory_offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1571,7 +1585,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1623,7 +1637,7 @@ Module instructions. ] |) |) in - let code_offset := + let~ code_offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1644,7 +1658,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1714,14 +1728,14 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| memory_offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1790,7 +1804,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -1811,7 +1825,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1849,7 +1863,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1911,7 +1925,7 @@ Module instructions. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -1936,7 +1950,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2007,6 +2021,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_codecopy : + M.IsFunction "revm_interpreter::instructions::system::codecopy" codecopy. + (* pub fn calldataload(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::VERYLOW); @@ -2040,7 +2057,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2075,7 +2092,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2093,7 +2110,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2124,7 +2141,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2142,7 +2159,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset_ptr := + let~ offset_ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2159,9 +2176,9 @@ Module instructions. ] |) |) in - let word := + let~ word := M.copy (| M.get_constant (| "alloy_primitives::bits::fixed::ZERO" |) |) in - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2182,7 +2199,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2251,7 +2268,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2294,7 +2311,7 @@ Module instructions. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let count := + let~ count := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2306,9 +2323,9 @@ Module instructions. |), [ Value.Integer 32; - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.path "bytes::bytes::Bytes", "len", @@ -2336,13 +2353,12 @@ Module instructions. ] |) ] - |), - M.read (| offset |) - |) + |)) + (M.read (| offset |)) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2354,7 +2370,7 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2370,11 +2386,10 @@ Module instructions. (Value.Integer 32), ltac:(M.monadic (BinOp.Pure.le - (BinOp.Panic.add (| - Integer.Usize, - M.read (| offset |), - M.read (| count |) - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| offset |)) + (M.read (| count |))) (M.call_closure (| M.get_associated_function (| Ty.path "bytes::bytes::Bytes", @@ -2435,7 +2450,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2522,7 +2537,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.read (| offset_ptr |), M.call_closure (| @@ -2542,6 +2557,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_calldataload : + M.IsFunction "revm_interpreter::instructions::system::calldataload" calldataload. + (* pub fn calldatasize(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -2557,7 +2575,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2592,7 +2610,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2610,7 +2628,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2688,7 +2706,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2709,6 +2727,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_calldatasize : + M.IsFunction "revm_interpreter::instructions::system::calldatasize" calldatasize. + (* pub fn callvalue(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -2724,7 +2745,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2759,7 +2780,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2777,7 +2798,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2828,7 +2849,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2849,6 +2870,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_callvalue : + M.IsFunction "revm_interpreter::instructions::system::callvalue" callvalue. + (* pub fn calldatacopy(interpreter: &mut Interpreter, _host: &mut H) { pop!(interpreter, memory_offset, data_offset, len); @@ -2879,7 +2903,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2910,7 +2934,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -2954,9 +2978,9 @@ Module instructions. let memory_offset := M.copy (| γ0_0 |) in let data_offset := M.copy (| γ0_1 |) in let len := M.copy (| γ0_2 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2967,7 +2991,7 @@ Module instructions. [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3015,7 +3039,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3067,7 +3091,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3121,7 +3145,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3141,10 +3165,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3161,7 +3187,7 @@ Module instructions. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3183,9 +3209,9 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let memory_offset := + let~ memory_offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3196,7 +3222,7 @@ Module instructions. [ memory_offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3244,7 +3270,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3296,7 +3322,7 @@ Module instructions. ] |) |) in - let data_offset := + let~ data_offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3317,7 +3343,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3387,14 +3413,14 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| memory_offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3463,7 +3489,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3484,7 +3510,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3544,6 +3570,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_calldatacopy : + M.IsFunction "revm_interpreter::instructions::system::calldatacopy" calldatacopy. + (* pub fn returndatasize(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, BYZANTIUM); @@ -3563,7 +3592,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3593,7 +3622,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3611,7 +3640,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3646,7 +3675,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3664,7 +3693,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -3738,7 +3767,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3759,6 +3788,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_returndatasize : + M.IsFunction "revm_interpreter::instructions::system::returndatasize" returndatasize. + (* pub fn returndatacopy(interpreter: &mut Interpreter, _host: &mut H) { check!(interpreter, BYZANTIUM); @@ -3790,7 +3822,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3820,7 +3852,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3838,7 +3870,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3869,7 +3901,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -3913,9 +3945,9 @@ Module instructions. let memory_offset := M.copy (| γ0_0 |) in let offset := M.copy (| γ0_1 |) in let len := M.copy (| γ0_2 |) in - let len := + let~ len := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3926,7 +3958,7 @@ Module instructions. [ len ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3974,7 +4006,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4026,7 +4058,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4080,7 +4112,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4100,10 +4132,12 @@ Module instructions. |))); fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4120,7 +4154,7 @@ Module instructions. |))) ] |) in - let data_offset := + let~ data_offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4141,7 +4175,7 @@ Module instructions. |), [ M.read (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4211,14 +4245,14 @@ Module instructions. ] |) |) in - let data_end := + let~ data_end := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "usize", "saturating_add", [] |), [ M.read (| data_offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4263,7 +4297,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4296,9 +4330,9 @@ Module instructions. M.read (| γ |), Value.Bool true |) in - let memory_offset := + let~ memory_offset := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4309,7 +4343,7 @@ Module instructions. [ memory_offset ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4357,7 +4391,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4409,7 +4443,7 @@ Module instructions. ] |) |) in - let new_size := + let~ new_size := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4420,7 +4454,7 @@ Module instructions. [ M.read (| memory_offset |); M.read (| len |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4489,7 +4523,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4511,7 +4545,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4589,6 +4623,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_returndatacopy : + M.IsFunction "revm_interpreter::instructions::system::returndatacopy" returndatacopy. + (* pub fn returndataload(interpreter: &mut Interpreter, _host: &mut H) { require_eof!(interpreter); @@ -4613,7 +4650,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4636,7 +4673,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4654,7 +4691,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4689,7 +4726,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4707,7 +4744,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4738,7 +4775,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4756,7 +4793,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let offset := + let~ offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4773,16 +4810,16 @@ Module instructions. ] |) |) in - let offset_usize := + let~ offset_usize := M.copy (| - let x := + let~ x := M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "ruint::Uint", "as_limbs", [] |), [ M.read (| offset |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4830,7 +4867,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4882,7 +4919,7 @@ Module instructions. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4931,7 +4968,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -4949,7 +4986,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.read (| offset |), M.call_closure (| @@ -5010,11 +5047,10 @@ Module instructions. [ ("start", M.read (| offset_usize |)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.read (| offset_usize |), - Value.Integer 32 - |)) + BinOp.Wrap.add + Integer.Usize + (M.read (| offset_usize |)) + (Value.Integer 32)) ] ] |) @@ -5029,6 +5065,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_returndataload : + M.IsFunction "revm_interpreter::instructions::system::returndataload" returndataload. + (* pub fn gas(interpreter: &mut Interpreter, _host: &mut H) { gas!(interpreter, gas::BASE); @@ -5044,7 +5083,7 @@ Module instructions. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5079,7 +5118,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5097,7 +5136,7 @@ Module instructions. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5160,7 +5199,7 @@ Module instructions. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| interpreter |), @@ -5180,5 +5219,7 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_gas : M.IsFunction "revm_interpreter::instructions::system::gas" gas. End system. End instructions. diff --git a/CoqOfRust/revm/instructions/utility.v b/CoqOfRust/revm/instructions/utility.v index 367d39f68..f07feff49 100644 --- a/CoqOfRust/revm/instructions/utility.v +++ b/CoqOfRust/revm/instructions/utility.v @@ -50,6 +50,9 @@ Module instructions. | _, _ => M.impossible end. + Axiom Function_read_i16 : + M.IsFunction "revm_interpreter::instructions::utility::read_i16" read_i16. + (* pub(crate) unsafe fn read_u16(ptr: *const u8) -> u16 { u16::from_be_bytes(core::slice::from_raw_parts(ptr, 2).try_into().unwrap()) @@ -96,5 +99,8 @@ Module instructions. |))) | _, _ => M.impossible end. + + Axiom Function_read_u16 : + M.IsFunction "revm_interpreter::instructions::utility::read_u16" read_u16. End utility. End instructions. diff --git a/CoqOfRust/revm/interpreter.v b/CoqOfRust/revm/interpreter.v index 0abc8d20e..7edfcccb7 100644 --- a/CoqOfRust/revm/interpreter.v +++ b/CoqOfRust/revm/interpreter.v @@ -35,7 +35,7 @@ Module interpreter. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let names := + let~ names := M.alloc (| M.alloc (| Value.Array @@ -56,7 +56,7 @@ Module interpreter. ] |) |) in - let values := + let~ values := M.alloc (| (* Unsize *) M.pointer_coercion @@ -563,7 +563,7 @@ Module interpreter. let gas_limit := M.alloc (| gas_limit |) in let is_static := M.alloc (| is_static |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -641,7 +641,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let is_eof := + let~ is_eof := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -658,7 +658,7 @@ Module interpreter. ] |) |) in - let bytecode := + let~ bytecode := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -797,7 +797,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -919,7 +919,7 @@ Module interpreter. 0 |) in let code := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -937,7 +937,7 @@ Module interpreter. [ M.read (| code |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1045,7 +1045,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1056,7 +1056,7 @@ Module interpreter. "revm_interpreter::instruction_result::InstructionResult::Continue" [] |) in - let instruction_result := + let~ instruction_result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1068,7 +1068,7 @@ Module interpreter. [ create_outcome ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1148,22 +1148,47 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Continue" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Stop" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Return" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContract" + |) in Value.Tuple [])) ], M.closure @@ -1171,7 +1196,7 @@ Module interpreter. ltac:(M.monadic match γ with | [] => - let address := + let~ address := M.copy (| M.SubPointer.get_struct_record_field (| create_outcome, @@ -1179,7 +1204,7 @@ Module interpreter. "address" |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1243,7 +1268,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1258,7 +1283,7 @@ Module interpreter. |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1293,7 +1318,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1340,14 +1365,29 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Revert" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" + |) in Value.Tuple [])) ], M.closure @@ -1355,7 +1395,7 @@ Module interpreter. ltac:(M.monadic match γ with | [] => - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1396,7 +1436,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1411,7 +1451,7 @@ Module interpreter. |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1453,6 +1493,11 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -1484,7 +1529,7 @@ Module interpreter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1525,7 +1570,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1591,7 +1636,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let instruction_result := + let~ instruction_result := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1603,7 +1648,7 @@ Module interpreter. [ create_outcome ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1691,6 +1736,11 @@ Module interpreter. ltac:(M.monadic (let γ := M.read (| γ |) in let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContract" + |) in + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1744,7 +1794,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1759,7 +1809,7 @@ Module interpreter. |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1794,7 +1844,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1838,14 +1888,29 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Revert" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" + |) in Value.Tuple [])) ], M.closure @@ -1853,7 +1918,7 @@ Module interpreter. ltac:(M.monadic match γ with | [] => - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -1894,7 +1959,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -1909,7 +1974,7 @@ Module interpreter. |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1951,6 +2016,11 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -1982,7 +2052,7 @@ Module interpreter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2023,7 +2093,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2096,7 +2166,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2107,7 +2177,7 @@ Module interpreter. "revm_interpreter::instruction_result::InstructionResult::Continue" [] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2135,7 +2205,7 @@ Module interpreter. ] |) |) in - let out_offset := + let~ out_offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2146,7 +2216,7 @@ Module interpreter. [ call_outcome ] |) |) in - let out_len := + let~ out_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2157,7 +2227,7 @@ Module interpreter. [ call_outcome ] |) |) in - let target_len := + let~ target_len := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), @@ -2207,22 +2277,47 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Continue" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Stop" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Return" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::SelfDestruct" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::ReturnContract" + |) in Value.Tuple [])) ], M.closure @@ -2230,7 +2325,7 @@ Module interpreter. ltac:(M.monadic match γ with | [] => - let remaining := + let~ remaining := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2253,7 +2348,7 @@ Module interpreter. ] |) |) in - let refunded := + let~ refunded := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2276,7 +2371,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2294,7 +2389,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2312,7 +2407,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2372,7 +2467,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2420,7 +2515,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2447,14 +2542,29 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::Revert" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::CallTooDeep" + |) in Value.Tuple [])); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::OutOfFunds" + |) in Value.Tuple [])) ], M.closure @@ -2462,7 +2572,7 @@ Module interpreter. ltac:(M.monadic match γ with | [] => - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2499,7 +2609,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2559,7 +2669,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2600,7 +2710,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2622,6 +2732,11 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::instruction_result::InstructionResult::FatalExternalError" + |) in M.alloc (| M.never_to_any (| M.call_closure (| @@ -2653,7 +2768,7 @@ Module interpreter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2694,7 +2809,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -2901,7 +3016,7 @@ Module interpreter. let instruction_table := M.alloc (| instruction_table |) in let host := M.alloc (| host |) in M.read (| - let opcode := + let~ opcode := M.copy (| M.read (| M.SubPointer.get_struct_record_field (| @@ -2911,7 +3026,7 @@ Module interpreter. |) |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3044,7 +3159,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3055,7 +3170,7 @@ Module interpreter. "revm_interpreter::interpreter_action::InterpreterAction::None" [] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -3064,7 +3179,7 @@ Module interpreter. |), M.read (| shared_memory |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3106,7 +3221,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3127,7 +3242,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -3138,7 +3253,7 @@ Module interpreter. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3387,21 +3502,21 @@ Module interpreter. let gas := M.alloc (| gas |) in let new_size := M.alloc (| new_size |) in M.read (| - let new_words := + let~ new_words := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::interpreter::shared_memory::num_words", [] |), [ M.rust_cast (M.read (| new_size |)) ] |) |) in - let new_cost := + let~ new_cost := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::gas::calc::memory_gas", [] |), [ M.read (| new_words |) ] |) |) in - let current_cost := + let~ current_cost := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3412,11 +3527,11 @@ Module interpreter. [ M.read (| memory |) ] |) |) in - let cost := + let~ cost := M.alloc (| - BinOp.Panic.sub (| Integer.U64, M.read (| new_cost |), M.read (| current_cost |) |) + BinOp.Wrap.sub Integer.U64 (M.read (| new_cost |)) (M.read (| current_cost |)) |) in - let success := + let~ success := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3427,7 +3542,7 @@ Module interpreter. [ M.read (| gas |); M.read (| cost |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3435,7 +3550,7 @@ Module interpreter. ltac:(M.monadic (let γ := M.use success in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3445,11 +3560,10 @@ Module interpreter. |), [ M.read (| memory |); - BinOp.Panic.mul (| - Integer.Usize, - M.rust_cast (M.read (| new_words |)), - Value.Integer 32 - |) + BinOp.Wrap.mul + Integer.Usize + (M.rust_cast (M.read (| new_words |))) + (Value.Integer 32) ] |) |) in @@ -3461,4 +3575,7 @@ Module interpreter. |))) | _, _ => M.impossible end. + + Axiom Function_resize_memory : + M.IsFunction "revm_interpreter::interpreter::resize_memory" resize_memory. End interpreter. diff --git a/CoqOfRust/revm/interpreter/analysis.v b/CoqOfRust/revm/interpreter/analysis.v index e4d68ff41..2f5750e40 100644 --- a/CoqOfRust/revm/interpreter/analysis.v +++ b/CoqOfRust/revm/interpreter/analysis.v @@ -44,7 +44,7 @@ Module interpreter. 0 |) in let bytecode := M.copy (| γ0_0 |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -66,7 +66,7 @@ Module interpreter. ] |) |) in - let padded_bytecode := + let~ padded_bytecode := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -76,16 +76,11 @@ Module interpreter. "with_capacity", [] |), - [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 33 - |) + [ BinOp.Wrap.add Integer.Usize (M.read (| len |)) (Value.Integer 33) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -121,7 +116,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -133,11 +128,10 @@ Module interpreter. |), [ padded_bytecode; - BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 33 - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| len |)) + (Value.Integer 33); Value.Integer 0 ] |) @@ -177,7 +171,7 @@ Module interpreter. let γ0_1 := M.SubPointer.get_tuple_field (| γ, 1 |) in let bytes := M.copy (| γ0_0 |) in let len := M.copy (| γ0_1 |) in - let jump_table := + let~ jump_table := M.alloc (| M.call_closure (| M.get_function (| @@ -220,6 +214,9 @@ Module interpreter. | _, _ => M.impossible end. + Axiom Function_to_analysed : + M.IsFunction "revm_interpreter::interpreter::analysis::to_analysed" to_analysed. + (* fn analyze(code: &[u8]) -> JumpTable { let mut jumps: BitVec = bitvec![u8, Lsb0; 0; code.len()]; @@ -255,7 +252,7 @@ Module interpreter. ltac:(M.monadic (let code := M.alloc (| code |) in M.read (| - let jumps := + let~ jumps := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -278,7 +275,7 @@ Module interpreter. ] |) |) in - let range := + let~ range := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -289,16 +286,16 @@ Module interpreter. [ M.read (| code |) ] |) |) in - let start := + let~ start := M.copy (| M.SubPointer.get_struct_record_field (| range, "core::ops::range::Range", "start" |) |) in - let iterator := M.copy (| start |) in - let end_ := + let~ iterator := M.copy (| start |) in + let~ end_ := M.copy (| M.SubPointer.get_struct_record_field (| range, "core::ops::range::Range", "end" |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -313,7 +310,7 @@ Module interpreter. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let opcode := M.copy (| M.read (| iterator |) |) in + let~ opcode := M.copy (| M.read (| iterator |) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -335,7 +332,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -371,7 +368,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.write (| iterator, M.call_closure (| @@ -386,7 +383,7 @@ Module interpreter. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let push_offset := + (let~ push_offset := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -419,7 +416,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| iterator, M.call_closure (| @@ -431,18 +428,17 @@ Module interpreter. [ M.read (| iterator |); M.rust_cast - (BinOp.Panic.add (| - Integer.U8, - M.read (| push_offset |), - Value.Integer 2 - |)) + (BinOp.Wrap.add + Integer.U8 + (M.read (| push_offset |)) + (Value.Integer 2)) ] |) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| iterator, M.call_closure (| @@ -464,7 +460,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -498,6 +494,9 @@ Module interpreter. | _, _ => M.impossible end. + Axiom Function_analyze : + M.IsFunction "revm_interpreter::interpreter::analysis::analyze" analyze. + (* pub fn validate_raw_eof(bytecode: Bytes) -> Result { let eof = Eof::decode(bytecode)?; @@ -513,7 +512,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let eof := + let~ eof := M.copy (| M.match_operator (| M.alloc (| @@ -597,7 +596,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -684,6 +683,9 @@ Module interpreter. | _, _ => M.impossible end. + Axiom Function_validate_raw_eof : + M.IsFunction "revm_interpreter::interpreter::analysis::validate_raw_eof" validate_raw_eof. + (* pub fn validate_eof(eof: &Eof) -> Result<(), EofError> { // clone is cheap as it is Bytes and a header. @@ -710,7 +712,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let queue := + let~ queue := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -759,7 +761,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -790,7 +792,7 @@ Module interpreter. 0 |) in let eof := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -909,7 +911,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -931,7 +933,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -945,7 +952,7 @@ Module interpreter. 0 |) in let container := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1072,7 +1079,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1089,6 +1096,9 @@ Module interpreter. | _, _ => M.impossible end. + Axiom Function_validate_eof : + M.IsFunction "revm_interpreter::interpreter::analysis::validate_eof" validate_eof. + (* pub fn validate_eof_codes(eof: &Eof) -> Result<(), EofValidationError> { let mut queued_codes = vec![false; eof.body.code_section.len()]; @@ -1146,7 +1156,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let queued_codes := + let~ queued_codes := M.alloc (| M.call_closure (| M.get_function (| "alloc::vec::from_elem", [ Ty.path "bool" ] |), @@ -1178,7 +1188,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1256,7 +1266,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1309,7 +1319,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_trait_method (| @@ -1325,7 +1335,7 @@ Module interpreter. |), Value.Bool true |) in - let first_types := + let~ first_types := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1354,7 +1364,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1409,7 +1419,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let queue := + let~ queue := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1438,7 +1448,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -1466,7 +1476,7 @@ Module interpreter. 0 |) in let index := M.copy (| γ0_0 |) in - let code := + let~ code := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1495,7 +1505,7 @@ Module interpreter. ] |) |) in - let accessed_codes := + let~ accessed_codes := M.copy (| M.match_operator (| M.alloc (| @@ -1668,7 +1678,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1745,7 +1755,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_trait_method (| @@ -1767,7 +1777,7 @@ Module interpreter. |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1805,7 +1815,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -1816,7 +1826,7 @@ Module interpreter. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1895,6 +1905,9 @@ Module interpreter. | _, _ => M.impossible end. + Axiom Function_validate_eof_codes : + M.IsFunction "revm_interpreter::interpreter::analysis::validate_eof_codes" validate_eof_codes. + (* Enum EofError { @@ -2003,7 +2016,7 @@ Module interpreter. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -2013,7 +2026,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -2109,7 +2122,7 @@ Module interpreter. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -2119,7 +2132,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -2288,7 +2301,7 @@ Module interpreter. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -2298,7 +2311,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -2415,7 +2428,7 @@ Module interpreter. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -2425,7 +2438,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -2445,7 +2458,8 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| Value.Tuple [ M.read (| self |); M.read (| other |) ] |), [ fun γ => @@ -2825,128 +2839,278 @@ Module interpreter. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::FalsePossitive" + |) in M.alloc (| M.read (| Value.String "FalsePossitive" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::UnknownOpcode" + |) in M.alloc (| M.read (| Value.String "UnknownOpcode" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::OpcodeDisabled" + |) in M.alloc (| M.read (| Value.String "OpcodeDisabled" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::InstructionNotForwardAccessed" + |) in M.alloc (| M.read (| Value.String "InstructionNotForwardAccessed" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::MissingImmediateBytes" + |) in M.alloc (| M.read (| Value.String "MissingImmediateBytes" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::MissingRJUMPVImmediateBytes" + |) in M.alloc (| M.read (| Value.String "MissingRJUMPVImmediateBytes" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::JumpToImmediateBytes" + |) in M.alloc (| M.read (| Value.String "JumpToImmediateBytes" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::BackwardJumpToImmediateBytes" + |) in M.alloc (| M.read (| Value.String "BackwardJumpToImmediateBytes" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::RJUMPVZeroMaxIndex" + |) in M.alloc (| M.read (| Value.String "RJUMPVZeroMaxIndex" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::JumpZeroOffset" + |) in M.alloc (| M.read (| Value.String "JumpZeroOffset" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::EOFCREATEInvalidIndex" + |) in M.alloc (| M.read (| Value.String "EOFCREATEInvalidIndex" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::CodeSectionOutOfBounds" + |) in M.alloc (| M.read (| Value.String "CodeSectionOutOfBounds" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::CALLFNonReturningFunction" + |) in M.alloc (| M.read (| Value.String "CALLFNonReturningFunction" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::StackOverflow" + |) in M.alloc (| M.read (| Value.String "StackOverflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::JUMPFEnoughOutputs" + |) in M.alloc (| M.read (| Value.String "JUMPFEnoughOutputs" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::JUMPFStackHigherThanOutputs" + |) in M.alloc (| M.read (| Value.String "JUMPFStackHigherThanOutputs" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::DataLoadOutOfBounds" + |) in M.alloc (| M.read (| Value.String "DataLoadOutOfBounds" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::RETFBiggestStackNumMoreThenOutputs" + |) in M.alloc (| M.read (| Value.String "RETFBiggestStackNumMoreThenOutputs" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::StackUnderflow" + |) in M.alloc (| M.read (| Value.String "StackUnderflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::TypesStackUnderflow" + |) in M.alloc (| M.read (| Value.String "TypesStackUnderflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::JumpUnderflow" + |) in M.alloc (| M.read (| Value.String "JumpUnderflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::JumpOverflow" + |) in M.alloc (| M.read (| Value.String "JumpOverflow" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::BackwardJumpBiggestNumMismatch" + |) in M.alloc (| M.read (| Value.String "BackwardJumpBiggestNumMismatch" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::BackwardJumpSmallestNumMismatch" + |) in M.alloc (| M.read (| Value.String "BackwardJumpSmallestNumMismatch" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::LastInstructionNotTerminating" + |) in M.alloc (| M.read (| Value.String "LastInstructionNotTerminating" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::CodeSectionNotAccessed" + |) in M.alloc (| M.read (| Value.String "CodeSectionNotAccessed" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::InvalidTypesSection" + |) in M.alloc (| M.read (| Value.String "InvalidTypesSection" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::InvalidFirstTypesSection" + |) in M.alloc (| M.read (| Value.String "InvalidFirstTypesSection" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::MaxStackMismatch" + |) in M.alloc (| M.read (| Value.String "MaxStackMismatch" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter::analysis::EofValidationError::NoCodeSections" + |) in M.alloc (| M.read (| Value.String "NoCodeSections" |) |))) ] |) @@ -2976,7 +3140,7 @@ Module interpreter. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3028,7 +3192,7 @@ Module interpreter. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3038,7 +3202,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3108,7 +3272,7 @@ Module interpreter. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3118,7 +3282,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3164,7 +3328,7 @@ Module interpreter. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3174,7 +3338,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -3565,7 +3729,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let accessed_codes := + let~ accessed_codes := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3578,11 +3742,11 @@ Module interpreter. [] |) |) in - let this_types := + let~ this_types := M.alloc (| M.SubPointer.get_array_field (| M.read (| types |), this_types_index |) |) in - let jumps := + let~ jumps := M.alloc (| M.call_closure (| M.get_function (| @@ -3615,8 +3779,8 @@ Module interpreter. ] |) |) in - let is_after_termination := M.alloc (| Value.Bool false |) in - let next_smallest := + let~ is_after_termination := M.alloc (| Value.Bool false |) in + let~ next_smallest := M.alloc (| M.rust_cast (M.read (| @@ -3627,7 +3791,7 @@ Module interpreter. |) |)) |) in - let next_biggest := + let~ next_biggest := M.alloc (| M.rust_cast (M.read (| @@ -3638,8 +3802,8 @@ Module interpreter. |) |)) |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -3666,11 +3830,11 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let op := + let~ op := M.copy (| M.SubPointer.get_array_field (| M.read (| code |), i |) |) in - let opcode := + let~ opcode := M.alloc (| M.SubPointer.get_array_field (| M.get_constant (| @@ -3692,7 +3856,7 @@ Module interpreter. 0 |) in let opcode := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3734,7 +3898,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let this_instruction := + let~ this_instruction := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -3753,7 +3917,7 @@ Module interpreter. [ jumps; M.read (| i |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3770,7 +3934,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| this_instruction |), @@ -3794,7 +3958,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| this_instruction |), @@ -3822,9 +3986,9 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let this_instruction := + let~ this_instruction := M.copy (| M.read (| this_instruction |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3869,7 +4033,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| is_after_termination, M.call_closure (| @@ -3881,7 +4045,7 @@ Module interpreter. [ M.read (| opcode |) ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3907,7 +4071,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3917,10 +4081,10 @@ Module interpreter. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.rust_cast + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path @@ -3929,8 +4093,7 @@ Module interpreter. [] |), [ M.read (| opcode |) ] - |)) - |)) + |)))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -3986,9 +4149,9 @@ Module interpreter. [ ("start", Value.Integer 1); ("end_", - BinOp.Panic.add (| - Integer.Usize, - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path @@ -3997,9 +4160,8 @@ Module interpreter. [] |), [ M.read (| opcode |) ] - |)), - Value.Integer 1 - |)) + |))) + (Value.Integer 1)) ] ] |) @@ -4010,7 +4172,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4030,7 +4192,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -4047,7 +4214,7 @@ Module interpreter. |) in let imm := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4095,15 +4262,14 @@ Module interpreter. |), [ jumps; - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i - |), - M.read (| + |)) + (M.read (| imm - |) - |) + |)) ] |) ] @@ -4198,7 +4364,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let stack_io_diff := + let~ stack_io_diff := M.alloc (| M.rust_cast (M.call_closure (| @@ -4210,7 +4376,7 @@ Module interpreter. [ M.read (| opcode |) ] |)) |) in - let stack_requirement := + let~ stack_requirement := M.alloc (| M.rust_cast (M.call_closure (| @@ -4222,9 +4388,9 @@ Module interpreter. [ M.read (| opcode |) ] |)) |) in - let rjumpv_additional_immediates := + let~ rjumpv_additional_immediates := M.alloc (| Value.Integer 0 |) in - let absolute_jumpdest := + let~ absolute_jumpdest := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4237,7 +4403,7 @@ Module interpreter. [] |) |) in - let _ := + let~ _ := M.match_operator (| op, [ @@ -4268,7 +4434,7 @@ Module interpreter. ltac:(M.monadic match γ with | [] => - let offset := + let~ offset := M.alloc (| M.rust_cast (M.call_closure (| @@ -4296,17 +4462,16 @@ Module interpreter. |), [ M.read (| code |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) ] |) ] |)) |) in - let _ := + let~ _ := M.write (| absolute_jumpdest, M.call_closure (| @@ -4340,18 +4505,19 @@ Module interpreter. M.alloc (| Value.Array [ - BinOp.Panic.add (| - Integer.Isize, - BinOp.Panic.add (| - Integer.Isize, - M.read (| + BinOp.Wrap.add + Integer.Isize + (BinOp.Wrap.add + Integer.Isize + (M.read (| offset - |), - Value.Integer 3 - |), - M.rust_cast - (M.read (| i |)) - |) + |)) + (Value.Integer + 3)) + (M.rust_cast + (M.read (| + i + |))) ] |) ] @@ -4371,40 +4537,37 @@ Module interpreter. M.read (| γ |), Value.Integer 226 |) in - let max_index := + let~ max_index := M.alloc (| M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.read (| code |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) |)) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| max_index |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| max_index |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| rjumpv_additional_immediates, - BinOp.Panic.mul (| - Integer.Usize, - M.read (| len |), - Value.Integer 2 - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| len |)) + (Value.Integer 2) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -4414,17 +4577,15 @@ Module interpreter. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |), - M.read (| + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1)) + (M.read (| rjumpv_additional_immediates - |) - |)) + |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -4461,7 +4622,7 @@ Module interpreter. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4494,7 +4655,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4514,7 +4675,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -4531,7 +4697,7 @@ Module interpreter. |) in let imm := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4579,20 +4745,18 @@ Module interpreter. |), [ jumps; - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i - |), - Value.Integer - 2 - |), - M.read (| + |)) + (Value.Integer + 2)) + (M.read (| imm - |) - |) + |)) ] |) ] @@ -4684,7 +4848,7 @@ Module interpreter. |))) ] |)) in - let jumps := + let~ jumps := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4700,7 +4864,7 @@ Module interpreter. [ M.read (| len |) ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -4730,7 +4894,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -4750,7 +4914,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) @@ -4767,7 +4936,7 @@ Module interpreter. |) in let vtablei := M.copy (| γ0_0 |) in - let offset := + let~ offset := M.alloc (| M.rust_cast (M.call_closure (| @@ -4807,31 +4976,28 @@ Module interpreter. |) ] |); - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i - |), - Value.Integer - 2 - |), - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer - 2, - M.read (| + |)) + (Value.Integer + 2)) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer + 2) + (M.read (| vtablei - |) - |) - |) + |))) ] |) ] |)) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4849,28 +5015,25 @@ Module interpreter. |), [ jumps; - BinOp.Panic.add (| - Integer.Isize, - BinOp.Panic.add (| - Integer.Isize, - BinOp.Panic.add (| - Integer.Isize, - M.read (| + BinOp.Wrap.add + Integer.Isize + (BinOp.Wrap.add + Integer.Isize + (BinOp.Wrap.add + Integer.Isize + (M.read (| offset - |), - M.rust_cast + |)) + (M.rust_cast (M.read (| i - |)) - |), - Value.Integer - 2 - |), - M.rust_cast + |)))) + (Value.Integer + 2)) + (M.rust_cast (M.read (| rjumpv_additional_immediates - |)) - |) + |))) ] |) |) in @@ -4894,7 +5057,7 @@ Module interpreter. M.read (| γ |), Value.Integer 227 |) in - let section_i := + let~ section_i := M.alloc (| M.rust_cast (M.call_closure (| @@ -4922,11 +5085,10 @@ Module interpreter. |), [ M.read (| code |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) ] |) ] @@ -4958,7 +5120,7 @@ Module interpreter. 0 |) in let target_types := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5008,7 +5170,7 @@ Module interpreter. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| stack_requirement, M.rust_cast @@ -5020,7 +5182,7 @@ Module interpreter. |) |)) |) in - let _ := + let~ _ := M.write (| stack_io_diff, M.call_closure (| @@ -5033,7 +5195,7 @@ Module interpreter. [ M.read (| target_types |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5063,22 +5225,21 @@ Module interpreter. M.use (M.alloc (| BinOp.Pure.gt - (BinOp.Panic.add (| - Integer.I32, - BinOp.Panic.sub (| - Integer.I32, - M.read (| + (BinOp.Wrap.add + Integer.I32 + (BinOp.Wrap.sub + Integer.I32 + (M.read (| M.SubPointer.get_struct_record_field (| this_instruction, "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", "biggest" |) - |), - M.read (| + |)) + (M.read (| stack_requirement - |) - |), - M.rust_cast + |))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -5087,8 +5248,7 @@ Module interpreter. "revm_primitives::bytecode::eof::types_section::TypesSection", "max_stack_size" |) - |)) - |)) + |)))) (M.rust_cast (M.read (| M.get_constant (| @@ -5130,7 +5290,7 @@ Module interpreter. M.read (| γ |), Value.Integer 229 |) in - let target_index := + let~ target_index := M.alloc (| M.rust_cast (M.call_closure (| @@ -5158,11 +5318,10 @@ Module interpreter. |), [ M.read (| code |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) ] |) ] @@ -5197,7 +5356,7 @@ Module interpreter. 0 |) in let target_types := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5207,18 +5366,18 @@ Module interpreter. M.use (M.alloc (| BinOp.Pure.gt - (BinOp.Panic.add (| - Integer.I32, - BinOp.Panic.sub (| - Integer.I32, - M.read (| + (BinOp.Wrap.add + Integer.I32 + (BinOp.Wrap.sub + Integer.I32 + (M.read (| M.SubPointer.get_struct_record_field (| this_instruction, "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", "biggest" |) - |), - M.rust_cast + |)) + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -5227,9 +5386,8 @@ Module interpreter. "revm_primitives::bytecode::eof::types_section::TypesSection", "inputs" |) - |)) - |), - M.rust_cast + |)))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -5238,8 +5396,7 @@ Module interpreter. "revm_primitives::bytecode::eof::types_section::TypesSection", "max_stack_size" |) - |)) - |)) + |)))) (M.rust_cast (M.read (| M.get_constant (| @@ -5272,7 +5429,7 @@ Module interpreter. (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -5322,7 +5479,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| stack_requirement, M.rust_cast @@ -5337,7 +5494,7 @@ Module interpreter. M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5393,14 +5550,14 @@ Module interpreter. |))) ] |) in - let _ := + let~ _ := M.write (| stack_requirement, - BinOp.Panic.sub (| - Integer.I32, - BinOp.Panic.add (| - Integer.I32, - M.rust_cast + BinOp.Wrap.sub + Integer.I32 + (BinOp.Wrap.add + Integer.I32 + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -5409,8 +5566,8 @@ Module interpreter. "revm_primitives::bytecode::eof::types_section::TypesSection", "outputs" |) - |)), - M.rust_cast + |))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -5419,9 +5576,8 @@ Module interpreter. "revm_primitives::bytecode::eof::types_section::TypesSection", "inputs" |) - |)) - |), - M.rust_cast + |)))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| @@ -5430,10 +5586,9 @@ Module interpreter. "revm_primitives::bytecode::eof::types_section::TypesSection", "outputs" |) - |)) - |) + |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5490,19 +5645,18 @@ Module interpreter. M.use (M.alloc (| BinOp.Pure.gt - (BinOp.Panic.add (| - Integer.I32, - M.read (| + (BinOp.Wrap.add + Integer.I32 + (M.read (| M.SubPointer.get_struct_record_field (| this_instruction, "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", "biggest" |) - |), - M.read (| + |)) + (M.read (| stack_requirement - |) - |)) + |))) (M.rust_cast (M.read (| M.get_constant (| @@ -5548,18 +5702,17 @@ Module interpreter. M.read (| γ |), Value.Integer 236 |) in - let index := + let~ index := M.alloc (| M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.read (| code |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) |)) @@ -5608,7 +5761,7 @@ Module interpreter. M.read (| γ |), Value.Integer 209 |) in - let index := + let~ index := M.alloc (| M.rust_cast (M.call_closure (| @@ -5636,11 +5789,10 @@ Module interpreter. |), [ M.read (| code |) ] |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) ] |) ] @@ -5661,12 +5813,11 @@ Module interpreter. ltac:(M.monadic (BinOp.Pure.gt (M.read (| index |)) - (BinOp.Panic.sub (| - Integer.Isize, - M.rust_cast - (M.read (| data_size |)), - Value.Integer 32 - |)))) + (BinOp.Wrap.sub + Integer.Isize + (M.rust_cast + (M.read (| data_size |))) + (Value.Integer 32)))) |) |)) in let _ := @@ -5701,7 +5852,7 @@ Module interpreter. M.read (| γ |), Value.Integer 228 |) in - let _ := + let~ _ := M.write (| stack_requirement, M.rust_cast @@ -5763,26 +5914,24 @@ Module interpreter. M.read (| γ |), Value.Integer 230 |) in - let _ := + let~ _ := M.write (| stack_requirement, - BinOp.Panic.add (| - Integer.I32, - M.rust_cast + BinOp.Wrap.add + Integer.I32 + (M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.read (| code |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) - |)), - Value.Integer 1 - |) + |))) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -5792,26 +5941,24 @@ Module interpreter. M.read (| γ |), Value.Integer 231 |) in - let _ := + let~ _ := M.write (| stack_requirement, - BinOp.Panic.add (| - Integer.I32, - M.rust_cast + BinOp.Wrap.add + Integer.I32 + (M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.read (| code |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) - |)), - Value.Integer 2 - |) + |))) + (Value.Integer 2) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -5821,58 +5968,52 @@ Module interpreter. M.read (| γ |), Value.Integer 232 |) in - let imm := + let~ imm := M.copy (| M.SubPointer.get_array_field (| M.read (| code |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) |) in - let n := + let~ n := M.alloc (| - BinOp.Panic.add (| - Integer.U8, - BinOp.Panic.shr (| - M.read (| imm |), - Value.Integer 4 - |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.U8 + (BinOp.Wrap.shr + (M.read (| imm |)) + (Value.Integer 4)) + (Value.Integer 1) |) in - let m := + let~ m := M.alloc (| - BinOp.Panic.add (| - Integer.U8, - BinOp.Pure.bit_and + BinOp.Wrap.add + Integer.U8 + (BinOp.Pure.bit_and (M.read (| imm |)) - (Value.Integer 15), - Value.Integer 1 - |) + (Value.Integer 15)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| stack_requirement, - BinOp.Panic.add (| - Integer.I32, - BinOp.Panic.add (| - Integer.I32, - M.rust_cast (M.read (| n |)), - M.rust_cast (M.read (| m |)) - |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.I32 + (BinOp.Wrap.add + Integer.I32 + (M.rust_cast (M.read (| n |))) + (M.rust_cast (M.read (| m |)))) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5914,37 +6055,35 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| next_smallest, - BinOp.Panic.add (| - Integer.I32, - M.read (| + BinOp.Wrap.add + Integer.I32 + (M.read (| M.SubPointer.get_struct_record_field (| this_instruction, "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", "smallest" |) - |), - M.read (| stack_io_diff |) - |) + |)) + (M.read (| stack_io_diff |)) |) in - let _ := + let~ _ := M.write (| next_biggest, - BinOp.Panic.add (| - Integer.I32, - M.read (| + BinOp.Wrap.add + Integer.I32 + (M.read (| M.SubPointer.get_struct_record_field (| this_instruction, "revm_interpreter::interpreter::analysis::validate_eof_code::InstructionInfo", "biggest" |) - |), - M.read (| stack_io_diff |) - |) + |)) + (M.read (| stack_io_diff |)) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -5970,7 +6109,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -5993,7 +6132,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -6008,7 +6152,7 @@ Module interpreter. |) in let absolute_jump := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6050,7 +6194,7 @@ Module interpreter. |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6110,12 +6254,12 @@ Module interpreter. |))) ] |) in - let absolute_jump := + let~ absolute_jump := M.alloc (| M.rust_cast (M.read (| absolute_jump |)) |) in - let target_jump := + let~ target_jump := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -6139,7 +6283,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6181,7 +6325,7 @@ Module interpreter. |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| target_jump |), @@ -6209,7 +6353,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] @@ -6317,7 +6461,7 @@ Module interpreter. |))); fun γ => ltac:(M.monadic - (let _ := + (let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -6347,7 +6491,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| @@ -6388,19 +6532,19 @@ Module interpreter. |))) ] |)) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path @@ -6409,11 +6553,8 @@ Module interpreter. [] |), [ M.read (| opcode |) ] - |)) - |), - M.read (| rjumpv_additional_immediates |) - |) - |) + |)))) + (M.read (| rjumpv_additional_immediates |))) |) in M.alloc (| Value.Tuple [] |))) ] @@ -6423,7 +6564,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in @@ -6434,7 +6575,7 @@ Module interpreter. ] |))) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6463,8 +6604,8 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let max_stack_requirement := M.alloc (| Value.Integer 0 |) in - let _ := + let~ max_stack_requirement := M.alloc (| Value.Integer 0 |) in + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -6491,7 +6632,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -6514,7 +6655,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -6526,7 +6672,7 @@ Module interpreter. 0 |) in let opcode := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| max_stack_requirement, M.call_closure (| @@ -6553,7 +6699,7 @@ Module interpreter. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6604,6 +6750,9 @@ Module interpreter. | _, _ => M.impossible end. + Axiom Function_validate_eof_code : + M.IsFunction "revm_interpreter::interpreter::analysis::validate_eof_code" validate_eof_code. + Module validate_eof_code. (* StructRecord { @@ -6753,7 +6902,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6789,7 +6938,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), diff --git a/CoqOfRust/revm/interpreter/contract.v b/CoqOfRust/revm/interpreter/contract.v index 3be37b392..e1a2cb3b7 100644 --- a/CoqOfRust/revm/interpreter/contract.v +++ b/CoqOfRust/revm/interpreter/contract.v @@ -160,7 +160,7 @@ Module interpreter. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let names := + let~ names := M.alloc (| M.alloc (| Value.Array @@ -174,7 +174,7 @@ Module interpreter. ] |) |) in - let values := + let~ values := M.alloc (| (* Unsize *) M.pointer_coercion @@ -381,7 +381,7 @@ Module interpreter. let caller := M.alloc (| caller |) in let call_value := M.alloc (| call_value |) in M.read (| - let bytecode := + let~ bytecode := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::interpreter::analysis::to_analysed", [] |), @@ -430,7 +430,7 @@ Module interpreter. let bytecode := M.alloc (| bytecode |) in let hash := M.alloc (| hash |) in M.read (| - let contract_address := + let~ contract_address := M.copy (| M.match_operator (| M.SubPointer.get_struct_record_field (| @@ -455,7 +455,9 @@ Module interpreter. caller)); fun γ => ltac:(M.monadic - (M.get_constant (| "alloy_primitives::bits::address::ZERO" |))) + (let _ := + M.is_struct_tuple (| γ, "revm_primitives::env::TransactTo::Create" |) in + M.get_constant (| "alloy_primitives::bits::address::ZERO" |))) ] |) |) in diff --git a/CoqOfRust/revm/interpreter/shared_memory.v b/CoqOfRust/revm/interpreter/shared_memory.v index db700e1dd..ff08f4411 100644 --- a/CoqOfRust/revm/interpreter/shared_memory.v +++ b/CoqOfRust/revm/interpreter/shared_memory.v @@ -270,7 +270,7 @@ Module interpreter. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -292,7 +292,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -529,7 +529,7 @@ Module interpreter. "with_capacity", [] |), - [ BinOp.Panic.mul (| Integer.Usize, Value.Integer 4, Value.Integer 1024 |) ] + [ BinOp.Wrap.mul Integer.Usize (Value.Integer 4) (Value.Integer 1024) ] |))) | _, _ => M.impossible end. @@ -598,7 +598,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let new_checkpoint := + let~ new_checkpoint := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -617,7 +617,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -637,7 +637,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -699,7 +699,7 @@ Module interpreter. 0 |) in let old_checkpoint := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| M.read (| self |), @@ -754,7 +754,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -795,9 +795,9 @@ Module interpreter. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -812,15 +812,14 @@ Module interpreter. "buffer" |) ] - |), - M.read (| + |)) + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "revm_interpreter::interpreter::shared_memory::SharedMemory", "last_checkpoint" |) - |) - |))) + |)))) | _, _ => M.impossible end. @@ -892,7 +891,7 @@ Module interpreter. (let self := M.alloc (| self |) in let new_size := M.alloc (| new_size |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -908,17 +907,16 @@ Module interpreter. "revm_interpreter::interpreter::shared_memory::SharedMemory", "buffer" |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "revm_interpreter::interpreter::shared_memory::SharedMemory", "last_checkpoint" |) - |), - M.read (| new_size |) - |); + |)) + (M.read (| new_size |)); Value.Integer 0 ] |) @@ -954,8 +952,7 @@ Module interpreter. "core::ops::range::Range" [ ("start", M.read (| offset |)); - ("end_", - BinOp.Panic.add (| Integer.Usize, M.read (| offset |), M.read (| size |) |)) + ("end_", BinOp.Wrap.add Integer.Usize (M.read (| offset |)) (M.read (| size |))) ] ] |))) @@ -1034,7 +1031,8 @@ Module interpreter. M.alloc (| M.read (| slice |) |))); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -1161,7 +1159,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -1206,9 +1204,9 @@ Module interpreter. let offset := M.alloc (| offset |) in let size := M.alloc (| size |) in M.read (| - let end_ := + let~ end_ := M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| offset |), M.read (| size |) |) + BinOp.Wrap.add Integer.Usize (M.read (| offset |)) (M.read (| size |)) |) in M.alloc (| M.read (| @@ -1248,7 +1246,8 @@ Module interpreter. M.alloc (| M.read (| slice |) |))); fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.match_operator (| M.alloc (| Value.Tuple [] |), [ fun γ => @@ -1317,7 +1316,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -1471,7 +1470,7 @@ Module interpreter. let offset := M.alloc (| offset |) in let byte := M.alloc (| byte |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1507,7 +1506,7 @@ Module interpreter. let offset := M.alloc (| offset |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1551,7 +1550,7 @@ Module interpreter. let offset := M.alloc (| offset |) in let value := M.alloc (| value |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1618,7 +1617,7 @@ Module interpreter. |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1693,7 +1692,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1718,7 +1717,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1751,16 +1750,15 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let data_end := + let~ data_end := M.alloc (| M.call_closure (| M.get_function (| "core::cmp::min", [ Ty.path "usize" ] |), [ - BinOp.Panic.add (| - Integer.Usize, - M.read (| data_offset |), - M.read (| len |) - |); + BinOp.Wrap.add + Integer.Usize + (M.read (| data_offset |)) + (M.read (| len |)); M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], @@ -1772,15 +1770,14 @@ Module interpreter. ] |) |) in - let data_len := + let~ data_len := M.alloc (| - BinOp.Panic.sub (| - Integer.Usize, - M.read (| data_end |), - M.read (| data_offset |) - |) + BinOp.Wrap.sub + Integer.Usize + (M.read (| data_end |)) + (M.read (| data_offset |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1789,7 +1786,7 @@ Module interpreter. (let γ := M.use (M.alloc (| Value.Bool true |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1848,7 +1845,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let data := + let~ data := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1864,7 +1861,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1885,7 +1882,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1902,16 +1899,14 @@ Module interpreter. |), [ M.read (| self |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| memory_offset |), - M.read (| data_len |) - |); - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| data_len |) - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| memory_offset |)) + (M.read (| data_len |)); + BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| data_len |)) ] |); Value.Integer 0 @@ -1940,7 +1935,7 @@ Module interpreter. let src := M.alloc (| src |) in let len := M.alloc (| len |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1962,7 +1957,7 @@ Module interpreter. [ ("start", M.read (| src |)); ("end_", - BinOp.Panic.add (| Integer.Usize, M.read (| src |), M.read (| len |) |)) + BinOp.Wrap.add Integer.Usize (M.read (| src |)) (M.read (| len |))) ]; M.read (| dst |) ] @@ -2064,7 +2059,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let buf_len := + let~ buf_len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2143,15 +2138,17 @@ Module interpreter. | [], [ len ] => ltac:(M.monadic (let len := M.alloc (| len |) in - BinOp.Panic.div (| - Integer.U64, - M.call_closure (| + BinOp.Wrap.div + Integer.U64 + (M.call_closure (| M.get_associated_function (| Ty.path "u64", "saturating_add", [] |), [ M.read (| len |); Value.Integer 31 ] - |), - Value.Integer 32 - |))) + |)) + (Value.Integer 32))) | _, _ => M.impossible end. + + Axiom Function_num_words : + M.IsFunction "revm_interpreter::interpreter::shared_memory::num_words" num_words. End shared_memory. End interpreter. diff --git a/CoqOfRust/revm/interpreter/stack.v b/CoqOfRust/revm/interpreter/stack.v index 7218e2eb4..e164e561c 100644 --- a/CoqOfRust/revm/interpreter/stack.v +++ b/CoqOfRust/revm/interpreter/stack.v @@ -222,7 +222,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -296,7 +296,7 @@ Module interpreter. val)) ] |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -365,7 +365,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -388,7 +388,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -405,7 +410,7 @@ Module interpreter. M.SubPointer.get_tuple_field (| γ0_0, 1 |) in let i := M.copy (| γ1_0 |) in let x := M.copy (| γ1_1 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -423,7 +428,7 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -516,7 +521,7 @@ Module interpreter. ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -954,7 +959,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -999,7 +1004,7 @@ Module interpreter. |) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) |) @@ -1022,7 +1027,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pop := + let~ pop := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1033,7 +1038,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let top := + let~ top := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1065,7 +1070,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pop1 := + let~ pop1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1076,7 +1081,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop2 := + let~ pop2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1109,7 +1114,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pop1 := + let~ pop1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1120,7 +1125,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop2 := + let~ pop2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1131,7 +1136,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let top := + let~ top := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1165,7 +1170,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pop1 := + let~ pop1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1176,7 +1181,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop2 := + let~ pop2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1187,7 +1192,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop3 := + let~ pop3 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1221,7 +1226,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pop1 := + let~ pop1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1232,7 +1237,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop2 := + let~ pop2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1243,7 +1248,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop3 := + let~ pop3 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1254,7 +1259,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop4 := + let~ pop4 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1292,7 +1297,7 @@ Module interpreter. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let pop1 := + let~ pop1 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1303,7 +1308,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop2 := + let~ pop2 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1314,7 +1319,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop3 := + let~ pop3 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1325,7 +1330,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop4 := + let~ pop4 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1336,7 +1341,7 @@ Module interpreter. [ M.read (| self |) ] |) |) in - let pop5 := + let~ pop5 := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1419,7 +1424,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1458,7 +1463,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1519,7 +1524,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -1544,7 +1549,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1596,7 +1601,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1689,11 +1694,11 @@ Module interpreter. "revm_interpreter::interpreter::stack::Stack", "data" |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -1709,11 +1714,9 @@ Module interpreter. "data" |) ] - |), - M.read (| no_from_top |) - |), - Value.Integer 1 - |) + |)) + (M.read (| no_from_top |))) + (Value.Integer 1) ] |) |) @@ -1764,7 +1767,7 @@ Module interpreter. (let self := M.alloc (| self |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1780,7 +1783,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -1838,7 +1841,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -1863,7 +1866,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1910,11 +1913,10 @@ Module interpreter. M.use (M.alloc (| BinOp.Pure.gt - (BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |)) + (BinOp.Wrap.add + Integer.Usize + (M.read (| len |)) + (Value.Integer 1)) (M.read (| M.get_constant (| "revm_interpreter::interpreter::stack::STACK_LIMIT" @@ -1937,8 +1939,8 @@ Module interpreter. |))); fun γ => ltac:(M.monadic - (let _ := - let ptr := + (let~ _ := + let~ ptr := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1970,7 +1972,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -1993,7 +1995,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2009,11 +2011,10 @@ Module interpreter. "revm_interpreter::interpreter::stack::Stack", "data" |); - BinOp.Panic.add (| - Integer.Usize, - M.read (| len |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| len |)) + (Value.Integer 1) ] |) |) in @@ -2085,7 +2086,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2101,7 +2102,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2162,7 +2163,7 @@ Module interpreter. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.call_closure (| @@ -2187,7 +2188,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2206,11 +2207,9 @@ Module interpreter. ] |) |) in - let n_m_index := - M.alloc (| - BinOp.Panic.add (| Integer.Usize, M.read (| n |), M.read (| m |) |) - |) in - let _ := + let~ n_m_index := + M.alloc (| BinOp.Wrap.add Integer.Usize (M.read (| n |)) (M.read (| m |)) |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2241,8 +2240,8 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let top := + let~ _ := + let~ top := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2267,11 +2266,11 @@ Module interpreter. |) ] |); - BinOp.Panic.sub (| Integer.Usize, M.read (| len |), Value.Integer 1 |) + BinOp.Wrap.sub Integer.Usize (M.read (| len |)) (Value.Integer 1) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -2380,7 +2379,7 @@ Module interpreter. M.catch_return (| ltac:(M.monadic (M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2412,30 +2411,28 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let n_words := + let~ n_words := M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| slice |) ] - |), - Value.Integer 31 - |), - Value.Integer 32 - |) + |)) + (Value.Integer 31)) + (Value.Integer 32) |) in - let new_len := + let~ new_len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.call_closure (| + BinOp.Wrap.add + Integer.Usize + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "alloc::vec::Vec") @@ -2450,11 +2447,10 @@ Module interpreter. "data" |) ] - |), - M.read (| n_words |) - |) + |)) + (M.read (| n_words |)) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2491,8 +2487,8 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let dst := + let~ _ := + let~ dst := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2545,7 +2541,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2565,8 +2561,8 @@ Module interpreter. ] |) |) in - let i := M.alloc (| Value.Integer 0 |) in - let words := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ words := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2577,7 +2573,7 @@ Module interpreter. [ M.read (| slice |); Value.Integer 32 ] |) |) in - let partial_last_word := + let~ partial_last_word := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2588,7 +2584,7 @@ Module interpreter. [ words ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2611,7 +2607,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2630,7 +2626,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2676,7 +2677,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2696,7 +2697,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -2710,7 +2716,7 @@ Module interpreter. 0 |) in let l := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2802,15 +2808,14 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -2825,7 +2830,7 @@ Module interpreter. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -2862,7 +2867,7 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let limbs := + let~ limbs := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2873,7 +2878,7 @@ Module interpreter. [ M.read (| partial_last_word |); Value.Integer 8 ] |) |) in - let partial_last_limb := + let~ partial_last_limb := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -2884,7 +2889,7 @@ Module interpreter. [ limbs ] |) |) in - let _ := + let~ _ := M.use (M.match_operator (| M.alloc (| @@ -2907,7 +2912,7 @@ Module interpreter. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -2926,7 +2931,12 @@ Module interpreter. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |))); fun γ => @@ -2938,7 +2948,7 @@ Module interpreter. 0 |) in let l := M.copy (| γ0_0 |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3006,15 +3016,14 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))) ] @@ -3023,7 +3032,7 @@ Module interpreter. |))) ] |)) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3047,8 +3056,8 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let tmp := M.alloc (| repeat (Value.Integer 0) 8 |) in - let _ := + let~ tmp := M.alloc (| repeat (Value.Integer 0) 8 |) in + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3075,18 +3084,17 @@ Module interpreter. "core::ops::range::RangeFrom" [ ("start", - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 8, - M.call_closure (| + BinOp.Wrap.sub + Integer.Usize + (Value.Integer 8) + (M.call_closure (| M.get_associated_function (| Ty.apply (Ty.path "slice") [ Ty.path "u8" ], "len", [] |), [ M.read (| partial_last_limb |) ] - |) - |)) + |))) ] ] |); @@ -3094,7 +3102,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3122,21 +3130,17 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - Value.Integer 1 - |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -3148,21 +3152,19 @@ Module interpreter. M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [ M.alloc (| - BinOp.Panic.div (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 3 - |), - Value.Integer 4 - |) + BinOp.Wrap.div + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 3)) + (Value.Integer 4) |); n_words ] @@ -3195,7 +3197,7 @@ Module interpreter. M.alloc (| M.never_to_any (| M.read (| - let kind := + let~ kind := M.alloc (| Value.StructTuple "core::panicking::AssertKind::Eq" @@ -3250,9 +3252,9 @@ Module interpreter. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let m := + let~ m := M.alloc (| - BinOp.Panic.rem (| Integer.Usize, M.read (| i |), Value.Integer 4 |) + BinOp.Wrap.rem Integer.Usize (M.read (| i |)) (Value.Integer 4) |) in M.match_operator (| M.alloc (| Value.Tuple [] |), @@ -3264,7 +3266,7 @@ Module interpreter. (M.alloc (| BinOp.Pure.ne (M.read (| m |)) (Value.Integer 0) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3282,11 +3284,7 @@ Module interpreter. [ M.read (| dst |); M.read (| i |) ] |); Value.Integer 0; - BinOp.Panic.sub (| - Integer.Usize, - Value.Integer 4, - M.read (| m |) - |) + BinOp.Wrap.sub Integer.Usize (Value.Integer 4) (M.read (| m |)) ] |) |) in @@ -3349,7 +3347,7 @@ Module interpreter. (M.read (| no_from_top |)) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let len := + let~ len := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -3368,7 +3366,7 @@ Module interpreter. ] |) |) in - let _ := + let~ _ := M.write (| M.call_closure (| M.get_trait_method (| @@ -3386,15 +3384,13 @@ Module interpreter. "revm_interpreter::interpreter::stack::Stack", "data" |); - BinOp.Panic.sub (| - Integer.Usize, - BinOp.Panic.sub (| - Integer.Usize, - M.read (| len |), - M.read (| no_from_top |) - |), - Value.Integer 1 - |) + BinOp.Wrap.sub + Integer.Usize + (BinOp.Wrap.sub + Integer.Usize + (M.read (| len |)) + (M.read (| no_from_top |))) + (Value.Integer 1) ] |), M.read (| val |) diff --git a/CoqOfRust/revm/interpreter_action.v b/CoqOfRust/revm/interpreter_action.v index 5d9854ccb..c87457328 100644 --- a/CoqOfRust/revm/interpreter_action.v +++ b/CoqOfRust/revm/interpreter_action.v @@ -211,6 +211,11 @@ Module interpreter_action. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::None" + |) in M.alloc (| Value.StructTuple "revm_interpreter::interpreter_action::InterpreterAction::None" @@ -347,6 +352,11 @@ Module interpreter_action. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::None" + |) in M.alloc (| M.call_closure (| M.get_associated_function (| @@ -413,7 +423,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -423,7 +433,7 @@ Module interpreter_action. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -708,6 +718,11 @@ Module interpreter_action. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Call" + |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -735,6 +750,11 @@ Module interpreter_action. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Create" + |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -762,6 +782,11 @@ Module interpreter_action. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::Return" + |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] @@ -789,6 +814,11 @@ Module interpreter_action. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::InterpreterAction::None" + |) in M.alloc (| Value.Bool true |))); fun γ => ltac:(M.monadic (M.alloc (| Value.Bool false |))) ] diff --git a/CoqOfRust/revm/interpreter_action/call_inputs.v b/CoqOfRust/revm/interpreter_action/call_inputs.v index e0db624ba..1ec0b5edb 100644 --- a/CoqOfRust/revm/interpreter_action/call_inputs.v +++ b/CoqOfRust/revm/interpreter_action/call_inputs.v @@ -212,7 +212,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let names := + let~ names := M.alloc (| M.alloc (| Value.Array @@ -230,7 +230,7 @@ Module interpreter_action. ] |) |) in - let values := + let~ values := M.alloc (| (* Unsize *) M.pointer_coercion @@ -699,7 +699,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -719,7 +719,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -739,7 +739,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u64", [], "hash", [ __H ] |), @@ -753,7 +753,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -773,7 +773,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -793,7 +793,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -813,7 +813,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -833,7 +833,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -853,7 +853,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -1357,18 +1357,38 @@ Module interpreter_action. fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallScheme::Call" + |) in M.alloc (| M.read (| Value.String "Call" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallScheme::CallCode" + |) in M.alloc (| M.read (| Value.String "CallCode" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallScheme::DelegateCall" + |) in M.alloc (| M.read (| Value.String "DelegateCall" |) |))); fun γ => ltac:(M.monadic (let γ := M.read (| γ |) in + let _ := + M.is_struct_tuple (| + γ, + "revm_interpreter::interpreter_action::call_inputs::CallScheme::StaticCall" + |) in M.alloc (| M.read (| Value.String "StaticCall" |) |))) ] |) @@ -1410,7 +1430,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1420,7 +1440,7 @@ Module interpreter_action. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1490,7 +1510,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1719,7 +1739,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let other := M.alloc (| other |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1729,7 +1749,7 @@ Module interpreter_action. [ M.read (| self |) ] |) |) in - let __arg1_tag := + let~ __arg1_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1890,7 +1910,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let __self_tag := + let~ __self_tag := M.alloc (| M.call_closure (| M.get_function (| @@ -1900,7 +1920,7 @@ Module interpreter_action. [ M.read (| self |) ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| diff --git a/CoqOfRust/revm/interpreter_action/create_inputs.v b/CoqOfRust/revm/interpreter_action/create_inputs.v index ecadd643d..06c2c1882 100644 --- a/CoqOfRust/revm/interpreter_action/create_inputs.v +++ b/CoqOfRust/revm/interpreter_action/create_inputs.v @@ -424,7 +424,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -444,7 +444,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -464,7 +464,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -484,7 +484,7 @@ Module interpreter_action. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -564,7 +564,9 @@ Module interpreter_action. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "revm_primitives::env::TransactTo::Create" |) in + M.alloc (| Value.StructTuple "core::option::Option::Some" [ @@ -706,7 +708,9 @@ Module interpreter_action. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| γ, "revm_primitives::env::CreateScheme::Create" |) in + M.alloc (| M.call_closure (| M.get_associated_function (| Ty.path "alloy_primitives::bits::address::Address", diff --git a/CoqOfRust/revm/interpreter_action/eof_create_inputs.v b/CoqOfRust/revm/interpreter_action/eof_create_inputs.v index fd3ef0aa2..691fc6f09 100644 --- a/CoqOfRust/revm/interpreter_action/eof_create_inputs.v +++ b/CoqOfRust/revm/interpreter_action/eof_create_inputs.v @@ -31,7 +31,7 @@ Module interpreter_action. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let names := + let~ names := M.alloc (| M.alloc (| Value.Array @@ -45,7 +45,7 @@ Module interpreter_action. ] |) |) in - let values := + let~ values := M.alloc (| (* Unsize *) M.pointer_coercion diff --git a/CoqOfRust/revm/opcode.v b/CoqOfRust/revm/opcode.v index ad1f225f3..7d5688433 100644 --- a/CoqOfRust/revm/opcode.v +++ b/CoqOfRust/revm/opcode.v @@ -166,7 +166,7 @@ Module opcode. let opcode := M.alloc (| opcode |) in let instruction := M.alloc (| instruction |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -240,7 +240,7 @@ Module opcode. 0 |) in let table := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| table |), @@ -316,7 +316,7 @@ Module opcode. 0 |) in let table := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| table |), @@ -335,7 +335,7 @@ Module opcode. 0 |) in let table := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| M.read (| table |), @@ -395,7 +395,7 @@ Module opcode. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let _ := + let~ _ := M.match_operator (| self, [ @@ -409,7 +409,7 @@ Module opcode. 0 |) in let table := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.write (| M.read (| self |), Value.StructTuple @@ -458,7 +458,7 @@ Module opcode. (* Unsize *) M.pointer_coercion (M.read (| - let instruction := + let~ instruction := M.alloc (| (* Unsize *) M.pointer_coercion @@ -559,6 +559,9 @@ Module opcode. | _, _ => M.impossible end. + Axiom Function_make_instruction_table : + M.IsFunction "revm_interpreter::opcode::make_instruction_table" make_instruction_table. + Module make_instruction_table. (* StructRecord { @@ -602,7 +605,7 @@ Module opcode. let Self : Ty.t := Self H SPEC in M.run ltac:(M.monadic - (let tables := + (let~ tables := M.alloc (| repeat (* ReifyFnPointer *) @@ -613,8 +616,8 @@ Module opcode. |))) 256 |) in - let i := M.alloc (| Value.Integer 0 |) in - let _ := + let~ i := M.alloc (| Value.Integer 0 |) in + let~ _ := M.loop (| ltac:(M.monadic (M.match_operator (| @@ -627,7 +630,7 @@ Module opcode. (M.alloc (| BinOp.Pure.lt (M.read (| i |)) (Value.Integer 256) |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| tables, i |), M.call_closure (| @@ -638,11 +641,11 @@ Module opcode. [ M.rust_cast (M.read (| i |)) ] |) |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| Integer.Usize, M.read (| β |), Value.Integer 1 |) + BinOp.Wrap.add Integer.Usize (M.read (| β |)) (Value.Integer 1) |) in M.alloc (| Value.Tuple [] |))); fun γ => @@ -650,7 +653,7 @@ Module opcode. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -762,6 +765,11 @@ Module opcode. | _, _ => M.impossible end. + Axiom Function_make_boxed_instruction_table : + M.IsFunction + "revm_interpreter::opcode::make_boxed_instruction_table" + make_boxed_instruction_table. + (* StructTuple { name := "OpCodeError"; @@ -1262,7 +1270,7 @@ Module opcode. (let self := M.alloc (| self |) in let f := M.alloc (| f |) in M.read (| - let n := + let~ n := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -1492,7 +1500,9 @@ Module opcode. ] |))); fun γ => - ltac:(M.monadic (M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) + ltac:(M.monadic + (let _ := M.is_struct_tuple (| γ, "core::option::Option::None" |) in + M.alloc (| Value.StructTuple "core::option::Option::None" [] |))) ] |) |))) @@ -2156,7 +2166,7 @@ Module opcode. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let info := + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -4419,6 +4429,7 @@ Module opcode. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -4452,6 +4463,7 @@ Module opcode. "core::option::Option::Some", 0 |) in + let _ := M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -4485,6 +4497,8 @@ Module opcode. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| γ0_0, "core::cmp::Ordering::Equal" |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -4518,6 +4532,11 @@ Module opcode. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -4551,6 +4570,11 @@ Module opcode. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.match_operator (| M.alloc (| M.call_closure (| @@ -4584,6 +4608,11 @@ Module opcode. "core::option::Option::Some", 0 |) in + let _ := + M.is_struct_tuple (| + γ0_0, + "core::cmp::Ordering::Equal" + |) in M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4693,7 +4722,8 @@ Module opcode. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", Ty.path "u8", [], "cmp", [] |), @@ -4714,7 +4744,8 @@ Module opcode. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4741,7 +4772,9 @@ Module opcode. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| γ, "core::cmp::Ordering::Equal" |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4768,7 +4801,12 @@ Module opcode. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4795,7 +4833,12 @@ Module opcode. [ fun γ => ltac:(M.monadic - (M.match_operator (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.match_operator (| M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4822,7 +4865,12 @@ Module opcode. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::cmp::Ordering::Equal" + |) in + M.alloc (| M.call_closure (| M.get_trait_method (| "core::cmp::Ord", @@ -4904,7 +4952,7 @@ Module opcode. (let self := M.alloc (| self |) in let state := M.alloc (| state |) in M.read (| - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| @@ -4924,7 +4972,7 @@ Module opcode. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), @@ -4938,7 +4986,7 @@ Module opcode. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), @@ -4952,7 +5000,7 @@ Module opcode. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), @@ -4966,7 +5014,7 @@ Module opcode. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "u8", [], "hash", [ __H ] |), @@ -4980,7 +5028,7 @@ Module opcode. ] |) |) in - let _ := + let~ _ := M.alloc (| M.call_closure (| M.get_trait_method (| "core::hash::Hash", Ty.path "bool", [], "hash", [ __H ] |), @@ -5225,7 +5273,7 @@ Module opcode. ltac:(M.monadic (let name := M.alloc (| name |) in M.read (| - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -5332,7 +5380,7 @@ Module opcode. ltac:(M.monadic (let self := M.alloc (| self |) in M.read (| - let slice := + let~ slice := M.alloc (| M.call_closure (| M.get_function (| "core::slice::raw::from_raw_parts", [ Ty.path "u8" ] |), @@ -5388,25 +5436,24 @@ Module opcode. | [], [ self ] => ltac:(M.monadic (let self := M.alloc (| self |) in - BinOp.Panic.sub (| - Integer.I16, - M.rust_cast + BinOp.Wrap.sub + Integer.I16 + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "revm_interpreter::opcode::OpCodeInfo", "outputs" |) - |)), - M.rust_cast + |))) + (M.rust_cast (M.read (| M.SubPointer.get_struct_record_field (| M.read (| self |), "revm_interpreter::opcode::OpCodeInfo", "inputs" |) - |)) - |))) + |))))) | _, _ => M.impossible end. @@ -5538,7 +5585,7 @@ Module opcode. ltac:(M.monadic (let op := M.alloc (| op |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| op, @@ -5552,6 +5599,8 @@ Module opcode. | _, _ => M.impossible end. + Axiom Function_not_eof : M.IsFunction "revm_interpreter::opcode::not_eof" not_eof. + (* pub const fn immediate_size(mut op: OpCodeInfo, n: u8) -> OpCodeInfo { op.immediate_size = n; @@ -5565,7 +5614,7 @@ Module opcode. (let op := M.alloc (| op |) in let n := M.alloc (| n |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| op, @@ -5579,6 +5628,9 @@ Module opcode. | _, _ => M.impossible end. + Axiom Function_immediate_size : + M.IsFunction "revm_interpreter::opcode::immediate_size" immediate_size. + (* pub const fn terminating(mut op: OpCodeInfo) -> OpCodeInfo { op.terminating = true; @@ -5591,7 +5643,7 @@ Module opcode. ltac:(M.monadic (let op := M.alloc (| op |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| op, @@ -5605,6 +5657,8 @@ Module opcode. | _, _ => M.impossible end. + Axiom Function_terminating : M.IsFunction "revm_interpreter::opcode::terminating" terminating. + (* pub const fn stack_io(mut op: OpCodeInfo, inputs: u8, outputs: u8) -> OpCodeInfo { op.inputs = inputs; @@ -5620,7 +5674,7 @@ Module opcode. let inputs := M.alloc (| inputs |) in let outputs := M.alloc (| outputs |) in M.read (| - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| op, @@ -5629,7 +5683,7 @@ Module opcode. |), M.read (| inputs |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_struct_record_field (| op, @@ -5643,6 +5697,8 @@ Module opcode. | _, _ => M.impossible end. + Axiom Function_stack_io : M.IsFunction "revm_interpreter::opcode::stack_io" stack_io. + Definition value_NOP : Value.t := M.run ltac:(M.monadic (M.get_constant (| "revm_interpreter::opcode::JUMPDEST" |))). @@ -5997,10 +6053,10 @@ Module opcode. Definition value_OPCODE_INFO_JUMPTABLE : Value.t := M.run ltac:(M.monadic - (let map := M.alloc (| repeat (Value.StructTuple "core::option::Option::None" []) 256 |) in - let prev := M.alloc (| Value.Integer 0 |) in - let val := M.alloc (| Value.Integer 0 |) in - let _ := + (let~ map := M.alloc (| repeat (Value.StructTuple "core::option::Option::None" []) 256 |) in + let~ prev := M.alloc (| Value.Integer 0 |) in + let~ val := M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6047,8 +6103,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6059,27 +6115,27 @@ Module opcode. [ M.read (| Value.String "STOP" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 0 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 1 |) in - let _ := + let~ val := M.alloc (| Value.Integer 1 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6126,8 +6182,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6138,20 +6194,20 @@ Module opcode. [ M.read (| Value.String "ADD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 1 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 2 |) in - let _ := + let~ val := M.alloc (| Value.Integer 2 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6198,8 +6254,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6210,20 +6266,20 @@ Module opcode. [ M.read (| Value.String "MUL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 2 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 3 |) in - let _ := + let~ val := M.alloc (| Value.Integer 3 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6270,8 +6326,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6282,20 +6338,20 @@ Module opcode. [ M.read (| Value.String "SUB" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 3 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 4 |) in - let _ := + let~ val := M.alloc (| Value.Integer 4 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6342,8 +6398,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6354,20 +6410,20 @@ Module opcode. [ M.read (| Value.String "DIV" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 4 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 5 |) in - let _ := + let~ val := M.alloc (| Value.Integer 5 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6414,8 +6470,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6426,20 +6482,20 @@ Module opcode. [ M.read (| Value.String "SDIV" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 5 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 6 |) in - let _ := + let~ val := M.alloc (| Value.Integer 6 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6486,8 +6542,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6498,20 +6554,20 @@ Module opcode. [ M.read (| Value.String "MOD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 6 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 7 |) in - let _ := + let~ val := M.alloc (| Value.Integer 7 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6558,8 +6614,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6570,20 +6626,20 @@ Module opcode. [ M.read (| Value.String "SMOD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 7 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 8 |) in - let _ := + let~ val := M.alloc (| Value.Integer 8 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6630,8 +6686,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6642,20 +6698,20 @@ Module opcode. [ M.read (| Value.String "ADDMOD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 8 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 9 |) in - let _ := + let~ val := M.alloc (| Value.Integer 9 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6702,8 +6758,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6714,20 +6770,20 @@ Module opcode. [ M.read (| Value.String "MULMOD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 9 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 10 |) in - let _ := + let~ val := M.alloc (| Value.Integer 10 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6774,8 +6830,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6786,20 +6842,20 @@ Module opcode. [ M.read (| Value.String "EXP" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 10 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 11 |) in - let _ := + let~ val := M.alloc (| Value.Integer 11 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6846,8 +6902,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6858,20 +6914,20 @@ Module opcode. [ M.read (| Value.String "SIGNEXTEND" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 11 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 16 |) in - let _ := + let~ val := M.alloc (| Value.Integer 16 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6918,8 +6974,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -6930,20 +6986,20 @@ Module opcode. [ M.read (| Value.String "LT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 16 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 17 |) in - let _ := + let~ val := M.alloc (| Value.Integer 17 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -6990,8 +7046,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7002,20 +7058,20 @@ Module opcode. [ M.read (| Value.String "GT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 17 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 18 |) in - let _ := + let~ val := M.alloc (| Value.Integer 18 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7062,8 +7118,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7074,20 +7130,20 @@ Module opcode. [ M.read (| Value.String "SLT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 18 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 19 |) in - let _ := + let~ val := M.alloc (| Value.Integer 19 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7134,8 +7190,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7146,20 +7202,20 @@ Module opcode. [ M.read (| Value.String "SGT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 19 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 20 |) in - let _ := + let~ val := M.alloc (| Value.Integer 20 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7206,8 +7262,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7218,20 +7274,20 @@ Module opcode. [ M.read (| Value.String "EQ" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 20 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 21 |) in - let _ := + let~ val := M.alloc (| Value.Integer 21 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7278,8 +7334,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7290,20 +7346,20 @@ Module opcode. [ M.read (| Value.String "ISZERO" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 21 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 22 |) in - let _ := + let~ val := M.alloc (| Value.Integer 22 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7350,8 +7406,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7362,20 +7418,20 @@ Module opcode. [ M.read (| Value.String "AND" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 22 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 23 |) in - let _ := + let~ val := M.alloc (| Value.Integer 23 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7422,8 +7478,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7434,20 +7490,20 @@ Module opcode. [ M.read (| Value.String "OR" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 23 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 24 |) in - let _ := + let~ val := M.alloc (| Value.Integer 24 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7494,8 +7550,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7506,20 +7562,20 @@ Module opcode. [ M.read (| Value.String "XOR" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 24 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 25 |) in - let _ := + let~ val := M.alloc (| Value.Integer 25 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7566,8 +7622,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7578,20 +7634,20 @@ Module opcode. [ M.read (| Value.String "NOT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 25 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 26 |) in - let _ := + let~ val := M.alloc (| Value.Integer 26 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7638,8 +7694,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7650,20 +7706,20 @@ Module opcode. [ M.read (| Value.String "BYTE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 26 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 27 |) in - let _ := + let~ val := M.alloc (| Value.Integer 27 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7710,8 +7766,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7722,20 +7778,20 @@ Module opcode. [ M.read (| Value.String "SHL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 27 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 28 |) in - let _ := + let~ val := M.alloc (| Value.Integer 28 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7782,8 +7838,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7794,20 +7850,20 @@ Module opcode. [ M.read (| Value.String "SHR" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 28 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 29 |) in - let _ := + let~ val := M.alloc (| Value.Integer 29 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7854,8 +7910,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7866,20 +7922,20 @@ Module opcode. [ M.read (| Value.String "SAR" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 29 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 32 |) in - let _ := + let~ val := M.alloc (| Value.Integer 32 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7926,8 +7982,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -7938,20 +7994,20 @@ Module opcode. [ M.read (| Value.String "KECCAK256" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 32 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 48 |) in - let _ := + let~ val := M.alloc (| Value.Integer 48 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -7998,8 +8054,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8010,20 +8066,20 @@ Module opcode. [ M.read (| Value.String "ADDRESS" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 48 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 49 |) in - let _ := + let~ val := M.alloc (| Value.Integer 49 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8070,8 +8126,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8082,20 +8138,20 @@ Module opcode. [ M.read (| Value.String "BALANCE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 49 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 50 |) in - let _ := + let~ val := M.alloc (| Value.Integer 50 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8142,8 +8198,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8154,20 +8210,20 @@ Module opcode. [ M.read (| Value.String "ORIGIN" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 50 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 51 |) in - let _ := + let~ val := M.alloc (| Value.Integer 51 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8214,8 +8270,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8226,20 +8282,20 @@ Module opcode. [ M.read (| Value.String "CALLER" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 51 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 52 |) in - let _ := + let~ val := M.alloc (| Value.Integer 52 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8286,8 +8342,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8298,20 +8354,20 @@ Module opcode. [ M.read (| Value.String "CALLVALUE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 52 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 53 |) in - let _ := + let~ val := M.alloc (| Value.Integer 53 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8358,8 +8414,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8370,20 +8426,20 @@ Module opcode. [ M.read (| Value.String "CALLDATALOAD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 53 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 54 |) in - let _ := + let~ val := M.alloc (| Value.Integer 54 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8430,8 +8486,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8442,20 +8498,20 @@ Module opcode. [ M.read (| Value.String "CALLDATASIZE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 54 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 55 |) in - let _ := + let~ val := M.alloc (| Value.Integer 55 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8502,8 +8558,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8514,20 +8570,20 @@ Module opcode. [ M.read (| Value.String "CALLDATACOPY" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 55 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 56 |) in - let _ := + let~ val := M.alloc (| Value.Integer 56 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8574,8 +8630,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8586,27 +8642,27 @@ Module opcode. [ M.read (| Value.String "CODESIZE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 56 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 57 |) in - let _ := + let~ val := M.alloc (| Value.Integer 57 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8653,8 +8709,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8665,27 +8721,27 @@ Module opcode. [ M.read (| Value.String "CODECOPY" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 57 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 58 |) in - let _ := + let~ val := M.alloc (| Value.Integer 58 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8732,8 +8788,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8744,20 +8800,20 @@ Module opcode. [ M.read (| Value.String "GASPRICE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 58 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 59 |) in - let _ := + let~ val := M.alloc (| Value.Integer 59 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8804,8 +8860,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8816,27 +8872,27 @@ Module opcode. [ M.read (| Value.String "EXTCODESIZE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 59 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 60 |) in - let _ := + let~ val := M.alloc (| Value.Integer 60 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8883,8 +8939,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8895,27 +8951,27 @@ Module opcode. [ M.read (| Value.String "EXTCODECOPY" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 4; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 60 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 61 |) in - let _ := + let~ val := M.alloc (| Value.Integer 61 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -8962,8 +9018,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -8974,20 +9030,20 @@ Module opcode. [ M.read (| Value.String "RETURNDATASIZE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 61 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 62 |) in - let _ := + let~ val := M.alloc (| Value.Integer 62 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9034,8 +9090,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9046,20 +9102,20 @@ Module opcode. [ M.read (| Value.String "RETURNDATACOPY" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 62 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 63 |) in - let _ := + let~ val := M.alloc (| Value.Integer 63 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9106,8 +9162,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9118,27 +9174,27 @@ Module opcode. [ M.read (| Value.String "EXTCODEHASH" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 63 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 64 |) in - let _ := + let~ val := M.alloc (| Value.Integer 64 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9185,8 +9241,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9197,20 +9253,20 @@ Module opcode. [ M.read (| Value.String "BLOCKHASH" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 64 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 65 |) in - let _ := + let~ val := M.alloc (| Value.Integer 65 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9257,8 +9313,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9269,20 +9325,20 @@ Module opcode. [ M.read (| Value.String "COINBASE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 65 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 66 |) in - let _ := + let~ val := M.alloc (| Value.Integer 66 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9329,8 +9385,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9341,20 +9397,20 @@ Module opcode. [ M.read (| Value.String "TIMESTAMP" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 66 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 67 |) in - let _ := + let~ val := M.alloc (| Value.Integer 67 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9401,8 +9457,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9413,20 +9469,20 @@ Module opcode. [ M.read (| Value.String "NUMBER" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 67 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 68 |) in - let _ := + let~ val := M.alloc (| Value.Integer 68 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9473,8 +9529,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9485,20 +9541,20 @@ Module opcode. [ M.read (| Value.String "DIFFICULTY" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 68 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 69 |) in - let _ := + let~ val := M.alloc (| Value.Integer 69 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9545,8 +9601,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9557,20 +9613,20 @@ Module opcode. [ M.read (| Value.String "GASLIMIT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 69 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 70 |) in - let _ := + let~ val := M.alloc (| Value.Integer 70 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9617,8 +9673,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9629,20 +9685,20 @@ Module opcode. [ M.read (| Value.String "CHAINID" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 70 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 71 |) in - let _ := + let~ val := M.alloc (| Value.Integer 71 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9689,8 +9745,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9701,20 +9757,20 @@ Module opcode. [ M.read (| Value.String "SELFBALANCE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 71 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 72 |) in - let _ := + let~ val := M.alloc (| Value.Integer 72 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9761,8 +9817,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9773,20 +9829,20 @@ Module opcode. [ M.read (| Value.String "BASEFEE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 72 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 73 |) in - let _ := + let~ val := M.alloc (| Value.Integer 73 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9833,8 +9889,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9845,20 +9901,20 @@ Module opcode. [ M.read (| Value.String "BLOBHASH" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 73 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 74 |) in - let _ := + let~ val := M.alloc (| Value.Integer 74 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9905,8 +9961,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9917,20 +9973,20 @@ Module opcode. [ M.read (| Value.String "BLOBBASEFEE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 74 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 80 |) in - let _ := + let~ val := M.alloc (| Value.Integer 80 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -9977,8 +10033,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -9989,20 +10045,20 @@ Module opcode. [ M.read (| Value.String "POP" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 80 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 81 |) in - let _ := + let~ val := M.alloc (| Value.Integer 81 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10049,8 +10105,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10061,20 +10117,20 @@ Module opcode. [ M.read (| Value.String "MLOAD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 81 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 82 |) in - let _ := + let~ val := M.alloc (| Value.Integer 82 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10121,8 +10177,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10133,20 +10189,20 @@ Module opcode. [ M.read (| Value.String "MSTORE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 82 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 83 |) in - let _ := + let~ val := M.alloc (| Value.Integer 83 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10193,8 +10249,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10205,20 +10261,20 @@ Module opcode. [ M.read (| Value.String "MSTORE8" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 83 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 84 |) in - let _ := + let~ val := M.alloc (| Value.Integer 84 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10265,8 +10321,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10277,20 +10333,20 @@ Module opcode. [ M.read (| Value.String "SLOAD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 84 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 85 |) in - let _ := + let~ val := M.alloc (| Value.Integer 85 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10337,8 +10393,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10349,20 +10405,20 @@ Module opcode. [ M.read (| Value.String "SSTORE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 85 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 86 |) in - let _ := + let~ val := M.alloc (| Value.Integer 86 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10409,8 +10465,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10421,27 +10477,27 @@ Module opcode. [ M.read (| Value.String "JUMP" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 86 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 87 |) in - let _ := + let~ val := M.alloc (| Value.Integer 87 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10488,8 +10544,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10500,27 +10556,27 @@ Module opcode. [ M.read (| Value.String "JUMPI" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 87 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 88 |) in - let _ := + let~ val := M.alloc (| Value.Integer 88 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10567,8 +10623,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10579,27 +10635,27 @@ Module opcode. [ M.read (| Value.String "PC" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 88 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 89 |) in - let _ := + let~ val := M.alloc (| Value.Integer 89 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10646,8 +10702,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10658,20 +10714,20 @@ Module opcode. [ M.read (| Value.String "MSIZE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 89 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 90 |) in - let _ := + let~ val := M.alloc (| Value.Integer 90 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10718,8 +10774,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10730,27 +10786,27 @@ Module opcode. [ M.read (| Value.String "GAS" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 90 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 91 |) in - let _ := + let~ val := M.alloc (| Value.Integer 91 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10797,8 +10853,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10809,20 +10865,20 @@ Module opcode. [ M.read (| Value.String "JUMPDEST" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 91 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 92 |) in - let _ := + let~ val := M.alloc (| Value.Integer 92 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10869,8 +10925,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10881,20 +10937,20 @@ Module opcode. [ M.read (| Value.String "TLOAD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 92 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 93 |) in - let _ := + let~ val := M.alloc (| Value.Integer 93 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -10941,8 +10997,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -10953,20 +11009,20 @@ Module opcode. [ M.read (| Value.String "TSTORE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 93 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 94 |) in - let _ := + let~ val := M.alloc (| Value.Integer 94 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11013,8 +11069,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11025,20 +11081,20 @@ Module opcode. [ M.read (| Value.String "MCOPY" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 94 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 95 |) in - let _ := + let~ val := M.alloc (| Value.Integer 95 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11085,8 +11141,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11097,20 +11153,20 @@ Module opcode. [ M.read (| Value.String "PUSH0" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 95 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 96 |) in - let _ := + let~ val := M.alloc (| Value.Integer 96 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11157,8 +11213,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11169,27 +11225,27 @@ Module opcode. [ M.read (| Value.String "PUSH1" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 96 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 97 |) in - let _ := + let~ val := M.alloc (| Value.Integer 97 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11236,8 +11292,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11248,27 +11304,27 @@ Module opcode. [ M.read (| Value.String "PUSH2" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 97 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 98 |) in - let _ := + let~ val := M.alloc (| Value.Integer 98 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11315,8 +11371,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11327,27 +11383,27 @@ Module opcode. [ M.read (| Value.String "PUSH3" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 3 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 98 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 99 |) in - let _ := + let~ val := M.alloc (| Value.Integer 99 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11394,8 +11450,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11406,27 +11462,27 @@ Module opcode. [ M.read (| Value.String "PUSH4" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 4 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 99 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 100 |) in - let _ := + let~ val := M.alloc (| Value.Integer 100 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11473,8 +11529,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11485,27 +11541,27 @@ Module opcode. [ M.read (| Value.String "PUSH5" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 5 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 100 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 101 |) in - let _ := + let~ val := M.alloc (| Value.Integer 101 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11552,8 +11608,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11564,27 +11620,27 @@ Module opcode. [ M.read (| Value.String "PUSH6" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 6 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 101 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 102 |) in - let _ := + let~ val := M.alloc (| Value.Integer 102 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11631,8 +11687,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11643,27 +11699,27 @@ Module opcode. [ M.read (| Value.String "PUSH7" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 7 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 102 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 103 |) in - let _ := + let~ val := M.alloc (| Value.Integer 103 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11710,8 +11766,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11722,27 +11778,27 @@ Module opcode. [ M.read (| Value.String "PUSH8" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 8 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 103 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 104 |) in - let _ := + let~ val := M.alloc (| Value.Integer 104 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11789,8 +11845,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11801,27 +11857,27 @@ Module opcode. [ M.read (| Value.String "PUSH9" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 9 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 104 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 105 |) in - let _ := + let~ val := M.alloc (| Value.Integer 105 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11868,8 +11924,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11880,27 +11936,27 @@ Module opcode. [ M.read (| Value.String "PUSH10" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 10 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 105 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 106 |) in - let _ := + let~ val := M.alloc (| Value.Integer 106 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -11947,8 +12003,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -11959,27 +12015,27 @@ Module opcode. [ M.read (| Value.String "PUSH11" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 11 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 106 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 107 |) in - let _ := + let~ val := M.alloc (| Value.Integer 107 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12026,8 +12082,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12038,27 +12094,27 @@ Module opcode. [ M.read (| Value.String "PUSH12" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 12 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 107 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 108 |) in - let _ := + let~ val := M.alloc (| Value.Integer 108 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12105,8 +12161,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12117,27 +12173,27 @@ Module opcode. [ M.read (| Value.String "PUSH13" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 13 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 108 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 109 |) in - let _ := + let~ val := M.alloc (| Value.Integer 109 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12184,8 +12240,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12196,27 +12252,27 @@ Module opcode. [ M.read (| Value.String "PUSH14" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 14 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 109 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 110 |) in - let _ := + let~ val := M.alloc (| Value.Integer 110 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12263,8 +12319,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12275,27 +12331,27 @@ Module opcode. [ M.read (| Value.String "PUSH15" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 15 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 110 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 111 |) in - let _ := + let~ val := M.alloc (| Value.Integer 111 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12342,8 +12398,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12354,27 +12410,27 @@ Module opcode. [ M.read (| Value.String "PUSH16" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 16 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 111 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 112 |) in - let _ := + let~ val := M.alloc (| Value.Integer 112 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12421,8 +12477,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12433,27 +12489,27 @@ Module opcode. [ M.read (| Value.String "PUSH17" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 17 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 112 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 113 |) in - let _ := + let~ val := M.alloc (| Value.Integer 113 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12500,8 +12556,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12512,27 +12568,27 @@ Module opcode. [ M.read (| Value.String "PUSH18" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 18 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 113 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 114 |) in - let _ := + let~ val := M.alloc (| Value.Integer 114 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12579,8 +12635,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12591,27 +12647,27 @@ Module opcode. [ M.read (| Value.String "PUSH19" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 19 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 114 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 115 |) in - let _ := + let~ val := M.alloc (| Value.Integer 115 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12658,8 +12714,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12670,27 +12726,27 @@ Module opcode. [ M.read (| Value.String "PUSH20" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 20 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 115 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 116 |) in - let _ := + let~ val := M.alloc (| Value.Integer 116 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12737,8 +12793,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12749,27 +12805,27 @@ Module opcode. [ M.read (| Value.String "PUSH21" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 21 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 116 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 117 |) in - let _ := + let~ val := M.alloc (| Value.Integer 117 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12816,8 +12872,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12828,27 +12884,27 @@ Module opcode. [ M.read (| Value.String "PUSH22" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 22 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 117 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 118 |) in - let _ := + let~ val := M.alloc (| Value.Integer 118 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12895,8 +12951,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12907,27 +12963,27 @@ Module opcode. [ M.read (| Value.String "PUSH23" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 23 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 118 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 119 |) in - let _ := + let~ val := M.alloc (| Value.Integer 119 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -12974,8 +13030,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -12986,27 +13042,27 @@ Module opcode. [ M.read (| Value.String "PUSH24" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 24 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 119 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 120 |) in - let _ := + let~ val := M.alloc (| Value.Integer 120 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13053,8 +13109,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13065,27 +13121,27 @@ Module opcode. [ M.read (| Value.String "PUSH25" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 25 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 120 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 121 |) in - let _ := + let~ val := M.alloc (| Value.Integer 121 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13132,8 +13188,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13144,27 +13200,27 @@ Module opcode. [ M.read (| Value.String "PUSH26" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 26 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 121 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 122 |) in - let _ := + let~ val := M.alloc (| Value.Integer 122 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13211,8 +13267,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13223,27 +13279,27 @@ Module opcode. [ M.read (| Value.String "PUSH27" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 27 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 122 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 123 |) in - let _ := + let~ val := M.alloc (| Value.Integer 123 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13290,8 +13346,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13302,27 +13358,27 @@ Module opcode. [ M.read (| Value.String "PUSH28" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 28 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 123 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 124 |) in - let _ := + let~ val := M.alloc (| Value.Integer 124 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13369,8 +13425,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13381,27 +13437,27 @@ Module opcode. [ M.read (| Value.String "PUSH29" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 29 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 124 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 125 |) in - let _ := + let~ val := M.alloc (| Value.Integer 125 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13448,8 +13504,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13460,27 +13516,27 @@ Module opcode. [ M.read (| Value.String "PUSH30" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 30 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 125 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 126 |) in - let _ := + let~ val := M.alloc (| Value.Integer 126 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13527,8 +13583,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13539,27 +13595,27 @@ Module opcode. [ M.read (| Value.String "PUSH31" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 31 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 126 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 127 |) in - let _ := + let~ val := M.alloc (| Value.Integer 127 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13606,8 +13662,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13618,27 +13674,27 @@ Module opcode. [ M.read (| Value.String "PUSH32" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 32 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 127 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 128 |) in - let _ := + let~ val := M.alloc (| Value.Integer 128 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13685,8 +13741,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13697,20 +13753,20 @@ Module opcode. [ M.read (| Value.String "DUP1" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 128 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 129 |) in - let _ := + let~ val := M.alloc (| Value.Integer 129 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13757,8 +13813,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13769,20 +13825,20 @@ Module opcode. [ M.read (| Value.String "DUP2" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 3 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 129 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 130 |) in - let _ := + let~ val := M.alloc (| Value.Integer 130 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13829,8 +13885,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13841,20 +13897,20 @@ Module opcode. [ M.read (| Value.String "DUP3" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 4 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 130 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 131 |) in - let _ := + let~ val := M.alloc (| Value.Integer 131 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13901,8 +13957,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13913,20 +13969,20 @@ Module opcode. [ M.read (| Value.String "DUP4" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 4; Value.Integer 5 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 131 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 132 |) in - let _ := + let~ val := M.alloc (| Value.Integer 132 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -13973,8 +14029,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -13985,20 +14041,20 @@ Module opcode. [ M.read (| Value.String "DUP5" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 5; Value.Integer 6 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 132 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 133 |) in - let _ := + let~ val := M.alloc (| Value.Integer 133 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14045,8 +14101,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14057,20 +14113,20 @@ Module opcode. [ M.read (| Value.String "DUP6" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 6; Value.Integer 7 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 133 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 134 |) in - let _ := + let~ val := M.alloc (| Value.Integer 134 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14117,8 +14173,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14129,20 +14185,20 @@ Module opcode. [ M.read (| Value.String "DUP7" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 7; Value.Integer 8 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 134 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 135 |) in - let _ := + let~ val := M.alloc (| Value.Integer 135 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14189,8 +14245,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14201,20 +14257,20 @@ Module opcode. [ M.read (| Value.String "DUP8" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 8; Value.Integer 9 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 135 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 136 |) in - let _ := + let~ val := M.alloc (| Value.Integer 136 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14261,8 +14317,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14273,20 +14329,20 @@ Module opcode. [ M.read (| Value.String "DUP9" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 9; Value.Integer 10 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 136 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 137 |) in - let _ := + let~ val := M.alloc (| Value.Integer 137 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14333,8 +14389,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14345,20 +14401,20 @@ Module opcode. [ M.read (| Value.String "DUP10" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 10; Value.Integer 11 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 137 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 138 |) in - let _ := + let~ val := M.alloc (| Value.Integer 138 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14405,8 +14461,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14417,20 +14473,20 @@ Module opcode. [ M.read (| Value.String "DUP11" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 11; Value.Integer 12 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 138 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 139 |) in - let _ := + let~ val := M.alloc (| Value.Integer 139 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14477,8 +14533,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14489,20 +14545,20 @@ Module opcode. [ M.read (| Value.String "DUP12" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 12; Value.Integer 13 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 139 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 140 |) in - let _ := + let~ val := M.alloc (| Value.Integer 140 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14549,8 +14605,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14561,20 +14617,20 @@ Module opcode. [ M.read (| Value.String "DUP13" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 13; Value.Integer 14 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 140 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 141 |) in - let _ := + let~ val := M.alloc (| Value.Integer 141 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14621,8 +14677,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14633,20 +14689,20 @@ Module opcode. [ M.read (| Value.String "DUP14" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 14; Value.Integer 15 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 141 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 142 |) in - let _ := + let~ val := M.alloc (| Value.Integer 142 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14693,8 +14749,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14705,20 +14761,20 @@ Module opcode. [ M.read (| Value.String "DUP15" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 15; Value.Integer 16 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 142 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 143 |) in - let _ := + let~ val := M.alloc (| Value.Integer 143 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14765,8 +14821,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14777,20 +14833,20 @@ Module opcode. [ M.read (| Value.String "DUP16" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 16; Value.Integer 17 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 143 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 144 |) in - let _ := + let~ val := M.alloc (| Value.Integer 144 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14837,8 +14893,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14849,20 +14905,20 @@ Module opcode. [ M.read (| Value.String "SWAP1" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 144 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 145 |) in - let _ := + let~ val := M.alloc (| Value.Integer 145 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14909,8 +14965,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14921,20 +14977,20 @@ Module opcode. [ M.read (| Value.String "SWAP2" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 3 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 145 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 146 |) in - let _ := + let~ val := M.alloc (| Value.Integer 146 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -14981,8 +15037,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -14993,20 +15049,20 @@ Module opcode. [ M.read (| Value.String "SWAP3" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 4; Value.Integer 4 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 146 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 147 |) in - let _ := + let~ val := M.alloc (| Value.Integer 147 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15053,8 +15109,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15065,20 +15121,20 @@ Module opcode. [ M.read (| Value.String "SWAP4" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 5; Value.Integer 5 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 147 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 148 |) in - let _ := + let~ val := M.alloc (| Value.Integer 148 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15125,8 +15181,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15137,20 +15193,20 @@ Module opcode. [ M.read (| Value.String "SWAP5" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 6; Value.Integer 6 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 148 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 149 |) in - let _ := + let~ val := M.alloc (| Value.Integer 149 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15197,8 +15253,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15209,20 +15265,20 @@ Module opcode. [ M.read (| Value.String "SWAP6" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 7; Value.Integer 7 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 149 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 150 |) in - let _ := + let~ val := M.alloc (| Value.Integer 150 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15269,8 +15325,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15281,20 +15337,20 @@ Module opcode. [ M.read (| Value.String "SWAP7" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 8; Value.Integer 8 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 150 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 151 |) in - let _ := + let~ val := M.alloc (| Value.Integer 151 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15341,8 +15397,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15353,20 +15409,20 @@ Module opcode. [ M.read (| Value.String "SWAP8" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 9; Value.Integer 9 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 151 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 152 |) in - let _ := + let~ val := M.alloc (| Value.Integer 152 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15413,8 +15469,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15425,20 +15481,20 @@ Module opcode. [ M.read (| Value.String "SWAP9" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 10; Value.Integer 10 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 152 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 153 |) in - let _ := + let~ val := M.alloc (| Value.Integer 153 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15485,8 +15541,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15497,20 +15553,20 @@ Module opcode. [ M.read (| Value.String "SWAP10" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 11; Value.Integer 11 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 153 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 154 |) in - let _ := + let~ val := M.alloc (| Value.Integer 154 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15557,8 +15613,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15569,20 +15625,20 @@ Module opcode. [ M.read (| Value.String "SWAP11" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 12; Value.Integer 12 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 154 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 155 |) in - let _ := + let~ val := M.alloc (| Value.Integer 155 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15629,8 +15685,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15641,20 +15697,20 @@ Module opcode. [ M.read (| Value.String "SWAP12" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 13; Value.Integer 13 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 155 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 156 |) in - let _ := + let~ val := M.alloc (| Value.Integer 156 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15701,8 +15757,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15713,20 +15769,20 @@ Module opcode. [ M.read (| Value.String "SWAP13" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 14; Value.Integer 14 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 156 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 157 |) in - let _ := + let~ val := M.alloc (| Value.Integer 157 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15773,8 +15829,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15785,20 +15841,20 @@ Module opcode. [ M.read (| Value.String "SWAP14" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 15; Value.Integer 15 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 157 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 158 |) in - let _ := + let~ val := M.alloc (| Value.Integer 158 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15845,8 +15901,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15857,20 +15913,20 @@ Module opcode. [ M.read (| Value.String "SWAP15" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 16; Value.Integer 16 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 158 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 159 |) in - let _ := + let~ val := M.alloc (| Value.Integer 159 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15917,8 +15973,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -15929,20 +15985,20 @@ Module opcode. [ M.read (| Value.String "SWAP16" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 17; Value.Integer 17 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 159 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 160 |) in - let _ := + let~ val := M.alloc (| Value.Integer 160 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -15989,8 +16045,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16001,20 +16057,20 @@ Module opcode. [ M.read (| Value.String "LOG0" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 160 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 161 |) in - let _ := + let~ val := M.alloc (| Value.Integer 161 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16061,8 +16117,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16073,20 +16129,20 @@ Module opcode. [ M.read (| Value.String "LOG1" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 161 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 162 |) in - let _ := + let~ val := M.alloc (| Value.Integer 162 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16133,8 +16189,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16145,20 +16201,20 @@ Module opcode. [ M.read (| Value.String "LOG2" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 4; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 162 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 163 |) in - let _ := + let~ val := M.alloc (| Value.Integer 163 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16205,8 +16261,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16217,20 +16273,20 @@ Module opcode. [ M.read (| Value.String "LOG3" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 5; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 163 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 164 |) in - let _ := + let~ val := M.alloc (| Value.Integer 164 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16277,8 +16333,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16289,20 +16345,20 @@ Module opcode. [ M.read (| Value.String "LOG4" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 6; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 164 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 208 |) in - let _ := + let~ val := M.alloc (| Value.Integer 208 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16349,8 +16405,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16361,20 +16417,20 @@ Module opcode. [ M.read (| Value.String "DATALOAD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 208 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 209 |) in - let _ := + let~ val := M.alloc (| Value.Integer 209 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16421,8 +16477,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16433,27 +16489,27 @@ Module opcode. [ M.read (| Value.String "DATALOADN" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 209 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 210 |) in - let _ := + let~ val := M.alloc (| Value.Integer 210 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16500,8 +16556,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16512,20 +16568,20 @@ Module opcode. [ M.read (| Value.String "DATASIZE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 210 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 211 |) in - let _ := + let~ val := M.alloc (| Value.Integer 211 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16572,8 +16628,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16584,20 +16640,20 @@ Module opcode. [ M.read (| Value.String "DATACOPY" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 0 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 211 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 224 |) in - let _ := + let~ val := M.alloc (| Value.Integer 224 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16644,8 +16700,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16656,34 +16712,34 @@ Module opcode. [ M.read (| Value.String "RJUMP" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 2 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 224 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 225 |) in - let _ := + let~ val := M.alloc (| Value.Integer 225 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16730,8 +16786,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16742,27 +16798,27 @@ Module opcode. [ M.read (| Value.String "RJUMPI" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 225 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 226 |) in - let _ := + let~ val := M.alloc (| Value.Integer 226 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16809,8 +16865,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16821,27 +16877,27 @@ Module opcode. [ M.read (| Value.String "RJUMPV" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 226 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 227 |) in - let _ := + let~ val := M.alloc (| Value.Integer 227 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16888,8 +16944,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16900,27 +16956,27 @@ Module opcode. [ M.read (| Value.String "CALLF" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 2 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 227 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 228 |) in - let _ := + let~ val := M.alloc (| Value.Integer 228 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -16967,8 +17023,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -16979,27 +17035,27 @@ Module opcode. [ M.read (| Value.String "RETF" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 228 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 229 |) in - let _ := + let~ val := M.alloc (| Value.Integer 229 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17046,8 +17102,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17058,34 +17114,34 @@ Module opcode. [ M.read (| Value.String "JUMPF" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 2 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 229 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 230 |) in - let _ := + let~ val := M.alloc (| Value.Integer 230 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17132,8 +17188,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17144,27 +17200,27 @@ Module opcode. [ M.read (| Value.String "DUPN" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 230 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 231 |) in - let _ := + let~ val := M.alloc (| Value.Integer 231 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17211,8 +17267,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17223,27 +17279,27 @@ Module opcode. [ M.read (| Value.String "SWAPN" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 231 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 232 |) in - let _ := + let~ val := M.alloc (| Value.Integer 232 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17290,8 +17346,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17302,27 +17358,27 @@ Module opcode. [ M.read (| Value.String "EXCHANGE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 232 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 236 |) in - let _ := + let~ val := M.alloc (| Value.Integer 236 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17369,8 +17425,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17381,27 +17437,27 @@ Module opcode. [ M.read (| Value.String "EOFCREATE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 4; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 236 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 237 |) in - let _ := + let~ val := M.alloc (| Value.Integer 237 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17448,8 +17504,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17460,20 +17516,20 @@ Module opcode. [ M.read (| Value.String "TXCREATE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 5; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 237 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 238 |) in - let _ := + let~ val := M.alloc (| Value.Integer 238 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17520,8 +17576,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17532,34 +17588,34 @@ Module opcode. [ M.read (| Value.String "RETURNCONTRACT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::immediate_size", [] |), [ M.read (| info |); Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 238 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 240 |) in - let _ := + let~ val := M.alloc (| Value.Integer 240 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17606,8 +17662,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17618,27 +17674,27 @@ Module opcode. [ M.read (| Value.String "CREATE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 240 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 241 |) in - let _ := + let~ val := M.alloc (| Value.Integer 241 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17685,8 +17741,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17697,27 +17753,27 @@ Module opcode. [ M.read (| Value.String "CALL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 7; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 241 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 242 |) in - let _ := + let~ val := M.alloc (| Value.Integer 242 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17764,8 +17820,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17776,27 +17832,27 @@ Module opcode. [ M.read (| Value.String "CALLCODE" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 7; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 242 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 243 |) in - let _ := + let~ val := M.alloc (| Value.Integer 243 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17843,8 +17899,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17855,27 +17911,27 @@ Module opcode. [ M.read (| Value.String "RETURN" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 243 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 244 |) in - let _ := + let~ val := M.alloc (| Value.Integer 244 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -17922,8 +17978,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -17934,27 +17990,27 @@ Module opcode. [ M.read (| Value.String "DELEGATECALL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 6; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 244 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 245 |) in - let _ := + let~ val := M.alloc (| Value.Integer 245 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18001,8 +18057,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18013,27 +18069,27 @@ Module opcode. [ M.read (| Value.String "CREATE2" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 4; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 245 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 247 |) in - let _ := + let~ val := M.alloc (| Value.Integer 247 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18080,8 +18136,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18092,20 +18148,20 @@ Module opcode. [ M.read (| Value.String "RETURNDATALOAD" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 247 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 248 |) in - let _ := + let~ val := M.alloc (| Value.Integer 248 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18152,8 +18208,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18164,20 +18220,20 @@ Module opcode. [ M.read (| Value.String "EXTCALL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 4; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 248 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 249 |) in - let _ := + let~ val := M.alloc (| Value.Integer 249 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18224,8 +18280,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18236,20 +18292,20 @@ Module opcode. [ M.read (| Value.String "EXFCALL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 249 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 250 |) in - let _ := + let~ val := M.alloc (| Value.Integer 250 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18296,8 +18352,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18308,27 +18364,27 @@ Module opcode. [ M.read (| Value.String "STATICCALL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 6; Value.Integer 1 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 250 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 251 |) in - let _ := + let~ val := M.alloc (| Value.Integer 251 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18375,8 +18431,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18387,20 +18443,20 @@ Module opcode. [ M.read (| Value.String "EXTSCALL" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 3; Value.Integer 1 ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 251 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 253 |) in - let _ := + let~ val := M.alloc (| Value.Integer 253 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18447,8 +18503,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18459,27 +18515,27 @@ Module opcode. [ M.read (| Value.String "REVERT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 2; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 253 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 254 |) in - let _ := + let~ val := M.alloc (| Value.Integer 254 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18526,8 +18582,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18538,27 +18594,27 @@ Module opcode. [ M.read (| Value.String "INVALID" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 0; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 254 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] |) in - let val := M.alloc (| Value.Integer 255 |) in - let _ := + let~ val := M.alloc (| Value.Integer 255 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -18605,8 +18661,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := M.write (| prev, M.read (| val |) |) in - let info := + let~ _ := M.write (| prev, M.read (| val |) |) in + let~ info := M.alloc (| M.call_closure (| M.get_associated_function (| @@ -18617,28 +18673,28 @@ Module opcode. [ M.read (| Value.String "SELFDESTRUCT" |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::stack_io", [] |), [ M.read (| info |); Value.Integer 1; Value.Integer 0 ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::not_eof", [] |), [ M.read (| info |) ] |) |) in - let info := + let~ info := M.alloc (| M.call_closure (| M.get_function (| "revm_interpreter::opcode::terminating", [] |), [ M.read (| info |) ] |) |) in - let _ := + let~ _ := M.write (| M.SubPointer.get_array_field (| map, M.alloc (| Value.Integer 255 |) |), Value.StructTuple "core::option::Option::Some" [ M.read (| info |) ] @@ -21208,4 +21264,6 @@ Module opcode. |))) | _, _ => M.impossible end. + + Axiom Function_instruction : M.IsFunction "revm_interpreter::opcode::instruction" instruction. End opcode. diff --git a/CoqOfRust/revm/opcode/eof_printer.v b/CoqOfRust/revm/opcode/eof_printer.v index 4325a226a..986a696b7 100644 --- a/CoqOfRust/revm/opcode/eof_printer.v +++ b/CoqOfRust/revm/opcode/eof_printer.v @@ -66,7 +66,7 @@ Module opcode. ltac:(M.monadic (let code := M.alloc (| code |) in M.read (| - let i := M.alloc (| Value.Integer 0 |) in + let~ i := M.alloc (| Value.Integer 0 |) in M.loop (| ltac:(M.monadic (M.match_operator (| @@ -90,9 +90,9 @@ Module opcode. |)) in let _ := M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in - let op := + let~ op := M.copy (| M.SubPointer.get_array_field (| M.read (| code |), i |) |) in - let opcode := + let~ opcode := M.alloc (| M.SubPointer.get_array_field (| M.get_constant (| @@ -114,7 +114,7 @@ Module opcode. 0 |) in let opcode := M.alloc (| γ1_0 |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -149,10 +149,10 @@ Module opcode. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - M.rust_cast + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path @@ -161,8 +161,7 @@ Module opcode. [] |), [ M.read (| opcode |) ] - |)) - |)) + |)))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -182,8 +181,8 @@ Module opcode. M.alloc (| M.never_to_any (| M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -228,8 +227,8 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -280,7 +279,7 @@ Module opcode. |) |) in M.alloc (| Value.Tuple [] |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -306,8 +305,8 @@ Module opcode. M.read (| γ |), Value.Bool true |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| "std::io::stdio::_print", [] |), @@ -378,26 +377,24 @@ Module opcode. "core::ops::range::Range" [ ("start", - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (M.read (| i - |), - Value.Integer - 1 - |)); + |)) + (Value.Integer + 1)); ("end_", - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i - |), - Value.Integer - 1 - |), - M.rust_cast + |)) + (Value.Integer + 1)) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path @@ -410,8 +407,7 @@ Module opcode. opcode |) ] - |)) - |)) + |)))) ] ] |) @@ -432,8 +428,9 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let rjumpv_additional_immediates := M.alloc (| Value.Integer 0 |) in - let _ := + let~ rjumpv_additional_immediates := + M.alloc (| Value.Integer 0 |) in + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -455,40 +452,37 @@ Module opcode. M.read (| γ |), Value.Bool true |) in - let max_index := + let~ max_index := M.alloc (| M.rust_cast (M.read (| M.SubPointer.get_array_field (| M.read (| code |), M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1) |) |) |)) |) in - let len := + let~ len := M.alloc (| - BinOp.Panic.add (| - Integer.Usize, - M.read (| max_index |), - Value.Integer 1 - |) + BinOp.Wrap.add + Integer.Usize + (M.read (| max_index |)) + (Value.Integer 1) |) in - let _ := + let~ _ := M.write (| rjumpv_additional_immediates, - BinOp.Panic.mul (| - Integer.Usize, - M.read (| len |), - Value.Integer 2 - |) + BinOp.Wrap.mul + Integer.Usize + (M.read (| len |)) + (Value.Integer 2) |) in - let _ := + let~ _ := M.match_operator (| M.alloc (| Value.Tuple [] |), [ @@ -498,17 +492,15 @@ Module opcode. M.use (M.alloc (| BinOp.Pure.ge - (BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 1 - |), - M.read (| + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer 1)) + (M.read (| rjumpv_additional_immediates - |) - |)) + |))) (M.call_closure (| M.get_associated_function (| Ty.apply @@ -528,8 +520,8 @@ Module opcode. M.alloc (| M.never_to_any (| M.read (| - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -600,7 +592,7 @@ Module opcode. (let iter := M.copy (| γ |) in M.loop (| ltac:(M.monadic - (let _ := + (let~ _ := M.match_operator (| M.alloc (| M.call_closure (| @@ -620,7 +612,12 @@ Module opcode. [ fun γ => ltac:(M.monadic - (M.alloc (| + (let _ := + M.is_struct_tuple (| + γ, + "core::option::Option::None" + |) in + M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) @@ -635,7 +632,7 @@ Module opcode. |) in let vtablei := M.copy (| γ0_0 |) in - let offset := + let~ offset := M.alloc (| M.rust_cast (M.call_closure (| @@ -669,28 +666,27 @@ Module opcode. |) ] |); - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - M.read (| i |), - Value.Integer 2 - |), - BinOp.Panic.mul (| - Integer.Usize, - Value.Integer 2, - M.read (| + BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (M.read (| i |)) + (Value.Integer + 2)) + (BinOp.Wrap.mul + Integer.Usize + (Value.Integer + 2) + (M.read (| vtablei - |) - |) - |) + |))) ] |) ] |)) |) in - let _ := - let _ := + let~ _ := + let~ _ := M.alloc (| M.call_closure (| M.get_function (| @@ -922,19 +918,19 @@ Module opcode. fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |))) ] |) in - let _ := + let~ _ := let β := i in M.write (| β, - BinOp.Panic.add (| - Integer.Usize, - M.read (| β |), - BinOp.Panic.add (| - Integer.Usize, - BinOp.Panic.add (| - Integer.Usize, - Value.Integer 1, - M.rust_cast + BinOp.Wrap.add + Integer.Usize + (M.read (| β |)) + (BinOp.Wrap.add + Integer.Usize + (BinOp.Wrap.add + Integer.Usize + (Value.Integer 1) + (M.rust_cast (M.call_closure (| M.get_associated_function (| Ty.path "revm_interpreter::opcode::OpCodeInfo", @@ -942,11 +938,8 @@ Module opcode. [] |), [ M.read (| opcode |) ] - |)) - |), - M.read (| rjumpv_additional_immediates |) - |) - |) + |)))) + (M.read (| rjumpv_additional_immediates |))) |) in M.alloc (| Value.Tuple [] |))) ] @@ -956,7 +949,7 @@ Module opcode. (M.alloc (| M.never_to_any (| M.read (| - let _ := + let~ _ := M.alloc (| M.never_to_any (| M.read (| M.break (||) |) |) |) in M.alloc (| Value.Tuple [] |) |) @@ -968,5 +961,8 @@ Module opcode. |))) | _, _ => M.impossible end. + + Axiom Function_print_eof_code : + M.IsFunction "revm_interpreter::opcode::eof_printer::print_eof_code" print_eof_code. End eof_printer. End opcode. diff --git a/CoqOfRust/revm/simulations/gas.v b/CoqOfRust/revm/simulations/gas.v index bdb6fe6c6..86049bb0b 100644 --- a/CoqOfRust/revm/simulations/gas.v +++ b/CoqOfRust/revm/simulations/gas.v @@ -3,6 +3,9 @@ Require Import CoqOfRust.proofs.M. Require Import CoqOfRust.simulations.M. Require core.num.mod. Require core.num.simulations.mod. +Require core.simulations.clone. +Require core.simulations.cmp. +Require core.simulations.default. Require Import revm.gas. @@ -37,6 +40,19 @@ Module Gas. }. Module SubPointer. + Definition get_limit : SubPointer.Runner.t t Z := {| + SubPointer.Runner.index := + Pointer.Index.StructRecord "revm_interpreter::gas::Gas" "limit"; + SubPointer.Runner.projection x := Some x.(limit); + SubPointer.Runner.injection x y := Some (x <| limit := y |>); + |}. + + Lemma get_limit_is_valid : + SubPointer.Runner.Valid.t get_limit. + Proof. + hauto l: on. + Qed. + Definition get_remaining : SubPointer.Runner.t t Z := {| SubPointer.Runner.index := Pointer.Index.StructRecord "revm_interpreter::gas::Gas" "remaining"; @@ -49,9 +65,75 @@ Module Gas. Proof. hauto l: on. Qed. + + Definition get_refunded : SubPointer.Runner.t t Z := {| + SubPointer.Runner.index := + Pointer.Index.StructRecord "revm_interpreter::gas::Gas" "refunded"; + SubPointer.Runner.projection x := Some x.(refunded); + SubPointer.Runner.injection x y := Some (x <| refunded := y |>); + |}. + + Lemma get_refunded_is_valid : + SubPointer.Runner.Valid.t get_refunded. + Proof. + hauto l: on. + Qed. End SubPointer. End Gas. +Module Impl_Clone. + Definition run_impl `{State.Trait} : clone.Clone.RunImpl Gas.t. + Proof. + constructor. + { eexists; split. + { eapply IsTraitMethod.Explicit. + { apply gas.Impl_core_clone_Clone_for_revm_interpreter_gas_Gas.Implements. } + { reflexivity. } + } + { intros state pointer [value H_pointer] **. + run_symbolic. + eapply Run.CallPrimitiveStateRead. { + apply H_pointer. + } + run_symbolic. + } + } + Defined. +End Impl_Clone. + +Module Impl_Default. + Definition run_impl `{State.Trait} : default.Default.RunImpl Gas.t (Φ Gas.t). + Proof. + constructor. + { eexists; split. + { eapply IsTraitMethod.Explicit. + { apply gas.Impl_core_default_Default_for_revm_interpreter_gas_Gas.Implements. } + { reflexivity. } + } + { intros. + run_symbolic. + destruct core.simulations.default.Impl_core_default_Default_for_i64.run_impl as [ + [default_i64 [H_default_i64 run_default_i64]] + ]. + destruct core.simulations.default.Impl_core_default_Default_for_u64.run_impl as [ + [default_u64 [H_default_u64 run_default_u64]] + ]. + repeat ( + eapply Run.CallPrimitiveGetTraitMethod; + try apply H_default_i64; + try apply H_default_u64; + eapply Run.CallClosure; + try apply run_default_i64; + try apply run_default_u64; + intros; run_symbolic + ). + { now instantiate (1 := Gas.Build_t _ _ _). } + { congruence. } + } + } + Defined. +End Impl_Default. + Module State. Definition t : Set := Gas.t. @@ -68,8 +150,268 @@ Module State. End State. Module Impl_revm_interpreter_gas_Gas. - Definition run_record_cost (state : State.t) (cost : Z) : - {{ tt, fun _ => Value.Tuple [], state | + (* + pub const fn new(limit: u64) -> Self { + Self { + limit, + remaining: limit, + refunded: 0, + } + } + *) + Definition run_new (limit : Z) : + {{ _, _ | + gas.Impl_revm_interpreter_gas_Gas.new [] [φ limit] ⇓ + fun (v : Gas.t) => inl (φ v) + | _ }}. + Proof. + intros. + run_symbolic. + now instantiate (1 := Gas.Build_t _ _ _). + Defined. + + (* + pub const fn new_spent(limit: u64) -> Self { + Self { + limit, + remaining: 0, + refunded: 0, + } + } + *) + Definition run_new_spent (limit : Z) : + {{ _, _ | + gas.Impl_revm_interpreter_gas_Gas.new_spent [] [φ limit] ⇓ + fun (v : Gas.t) => inl (φ v) + | _ }}. + Proof. + intros. + run_symbolic. + now instantiate (1 := Gas.Build_t _ _ _). + Defined. + + (* + pub const fn limit(&self) -> u64 { + self.limit + } + *) + Definition run_limit (state : State.t) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.limit [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ) + ] ⇓ + fun (v : Z) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_limit_is_valid); [reflexivity|]. + run_symbolic. + Defined. + + (* + pub const fn memory(&self) -> u64 { + 0 + } + *) + Definition run_memory (state : State.t) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.memory [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ) + ] ⇓ + fun (v : Z) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + Defined. + + (* + pub const fn refunded(&self) -> i64 { + self.refunded + } + *) + Definition run_refunded (state : State.t) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.refunded [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ) + ] ⇓ + fun (v : Z) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_refunded_is_valid); [reflexivity|]. + run_symbolic. + Defined. + + (* + pub const fn spent(&self) -> u64 { + self.limit - self.remaining + } + *) + Definition run_spent (state : State.t) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.spent [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ) + ] ⇓ + fun (v : Z) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_limit_is_valid); [reflexivity|]. + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_remaining_is_valid); [reflexivity|]. + run_symbolic. + Defined. + + (* + pub const fn spend(&self) -> u64 { + self.spent() + } + *) + Definition run_spend (state : State.t) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.spend [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ) + ] ⇓ + fun (v : Z) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + eapply Run.CallPrimitiveGetAssociatedFunction. { + apply gas.Impl_revm_interpreter_gas_Gas.AssociatedFunction_spent. + } + run_symbolic. + eapply Run.CallClosure. { + apply run_spent. + } + intros; run_symbolic. + Defined. + + (* + pub const fn remaining(&self) -> u64 { + self.remaining + } + *) + Definition run_remaining (state : State.t) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.remaining [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ) + ] ⇓ + fun (v : Z) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_remaining_is_valid); [reflexivity|]. + run_symbolic. + Defined. + + (* + pub fn erase_cost(&mut self, returned: u64) { + self.remaining += returned; + } + *) + Definition run_erase_cost (state : State.t) (returned : Z) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.erase_cost [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ); + φ returned + ] ⇓ + fun (v : unit) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_remaining_is_valid); [reflexivity|]. + run_symbolic. + eapply Run.Let with (P_state_inter := fun _ => True). { + run_symbolic. + } + intros; run_symbolic. + now instantiate (1 := tt). + Defined. + + (* + pub fn spend_all(&mut self) { + self.remaining = 0; + } + *) + Definition run_spend_all (state : State.t) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.spend_all [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ) + ] ⇓ + fun (v : unit) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + eapply Run.Let with (P_state_inter := fun _ => True). { + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_remaining_is_valid); [reflexivity|]. + run_symbolic. + } + intros; run_symbolic. + now instantiate (1 := tt). + Defined. + + (* + pub fn record_refund(&mut self, refund: i64) { + self.refunded += refund; + } + *) + Definition run_record_refund (state : State.t) (refund : Z) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.record_refund [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ); + φ refund + ] ⇓ + fun (v : unit) => inl (φ v) + | fun _ => True }}. + Proof. + intros. + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_refunded_is_valid); [reflexivity|]. + run_symbolic. + eapply Run.Let with (P_state_inter := fun _ => True). { + run_symbolic. + } + intros; run_symbolic. + now instantiate (1 := tt). + Defined. + + (* + pub fn set_final_refund(&mut self, is_london: bool) { + let max_refund_quotient = if is_london { 5 } else { 2 }; + self.refunded = (self.refunded() as u64).min(self.spent() / max_refund_quotient) as i64; + } + *) + Definition run_set_final_refund (state : State.t) (is_london : bool) : + {{ _, state | + gas.Impl_revm_interpreter_gas_Gas.set_final_refund [] [ + Value.Pointer (Pointer.mutable (A := Gas.t) tt φ); + φ is_london + ] ⇓ + fun (v : unit) => inl (φ v) + | fun _ => True }}. + Proof. + intros; run_symbolic. + eapply Run.Let with (P_state_inter := fun _ => True). { + run_symbolic. + destruct is_london; run_symbolic. + } + intros; run_symbolic. + eapply Run.Let with (P_state_inter := fun _ => True). { + run_symbolic. + apply (SubPointer.run Gas.SubPointer.get_refunded_is_valid); [reflexivity|]. + Admitted. + + (* Definition run_record_cost (state : State.t) (cost : Z) : + {{ _, state | gas.Impl_revm_interpreter_gas_Gas.record_cost [] [ Value.Pointer (Pointer.mutable (A := Gas.t) tt φ); φ cost @@ -81,6 +423,7 @@ Module Impl_revm_interpreter_gas_Gas. eapply Run.CallPrimitiveGetAssociatedFunction. { apply core.num.mod.num.Impl_u64.AssociatedFunction_overflowing_sub. } + run_symbolic. apply (SubPointer.run Gas.SubPointer.get_remaining_is_valid); [reflexivity|]. run_symbolic. eapply Run.CallClosure. { @@ -90,20 +433,28 @@ Module Impl_revm_interpreter_gas_Gas. destruct overflow; run_symbolic. apply (SubPointer.run Gas.SubPointer.get_remaining_is_valid); [reflexivity|]. run_symbolic. - Defined. + Defined. *) End Impl_revm_interpreter_gas_Gas. Module Test. Definition dummy_gas : Gas.t := {| - Gas.limit := 0; + Gas.limit := 100; Gas.remaining := 12; Gas.refunded := 0; |}. - Definition compute_gas (cost : Z) := + (* Definition compute_gas (cost : Z) := evaluate (Impl_revm_interpreter_gas_Gas.run_record_cost dummy_gas cost). Compute compute_gas 3. Compute compute_gas 12. - Compute compute_gas 23. + Compute compute_gas 23. *) + + Goal + fst (evaluate ( + Impl_revm_interpreter_gas_Gas.run_spent dummy_gas (Value.Tuple []) + )) = + 88. + reflexivity. + Qed. End Test. diff --git a/lib/src/coq.rs b/lib/src/coq.rs index 4ab951926..cdeb1d11f 100644 --- a/lib/src/coq.rs +++ b/lib/src/coq.rs @@ -80,7 +80,7 @@ pub(crate) enum Expression { }, Let { name: Option, - is_monadic: bool, + is_user: bool, ty: Option>, init: Rc, body: Rc, @@ -495,7 +495,7 @@ impl<'a> Expression { } Self::Let { name, - is_monadic, + is_user, ty, init, body, @@ -514,7 +514,7 @@ impl<'a> Expression { nest([ nest([ text("let"), - optional_insert(!*is_monadic, text("*")), + optional_insert(!*is_user, text("~")), line(), text(name), ]), diff --git a/lib/src/expression.rs b/lib/src/expression.rs index 4e3928740..72f0f4b97 100644 --- a/lib/src/expression.rs +++ b/lib/src/expression.rs @@ -105,7 +105,7 @@ pub(crate) enum Expr { }, Let { name: Option, - is_monadic: bool, + is_user: bool, init: Rc, body: Rc, }, @@ -251,7 +251,7 @@ impl Expr { } => elements.iter().any(|element| element.has_return()), Expr::Tuple { elements } => elements.iter().any(|element| element.has_return()), Expr::Let { - is_monadic: _, + is_user: _, name: _, init, body, @@ -537,12 +537,12 @@ impl Expr { } Expr::Let { name, - is_monadic, + is_user, init, body, } => coq::Expression::Let { name: name.to_owned(), - is_monadic: *is_monadic, + is_user: *is_user, ty: None, init: Rc::new(init.to_coq()), body: Rc::new(body.to_coq()), diff --git a/lib/src/thir_expression.rs b/lib/src/thir_expression.rs index e8c762108..5bcc0516d 100644 --- a/lib/src/thir_expression.rs +++ b/lib/src/thir_expression.rs @@ -36,16 +36,16 @@ fn path_of_bin_op( }; match bin_op { - BinOp::Add => ("BinOp.Panic.add", CallKind::Effectful, additional_args), - BinOp::Sub => ("BinOp.Panic.sub", CallKind::Effectful, additional_args), - BinOp::Mul => ("BinOp.Panic.mul", CallKind::Effectful, additional_args), - BinOp::Div => ("BinOp.Panic.div", CallKind::Effectful, additional_args), - BinOp::Rem => ("BinOp.Panic.rem", CallKind::Effectful, additional_args), + BinOp::Add => ("BinOp.Wrap.add", CallKind::Pure, additional_args), + BinOp::Sub => ("BinOp.Wrap.sub", CallKind::Pure, additional_args), + BinOp::Mul => ("BinOp.Wrap.mul", CallKind::Pure, additional_args), + BinOp::Div => ("BinOp.Wrap.div", CallKind::Pure, additional_args), + BinOp::Rem => ("BinOp.Wrap.rem", CallKind::Pure, additional_args), BinOp::BitXor => ("BinOp.Pure.bit_xor", CallKind::Pure, additional_args), BinOp::BitAnd => ("BinOp.Pure.bit_and", CallKind::Pure, additional_args), BinOp::BitOr => ("BinOp.Pure.bit_or", CallKind::Pure, additional_args), - BinOp::Shl => ("BinOp.Panic.shl", CallKind::Effectful, additional_args), - BinOp::Shr => ("BinOp.Panic.shr", CallKind::Effectful, additional_args), + BinOp::Shl => ("BinOp.Wrap.shl", CallKind::Pure, additional_args), + BinOp::Shr => ("BinOp.Wrap.shr", CallKind::Pure, additional_args), BinOp::Eq => ("BinOp.Pure.eq", CallKind::Pure, additional_args), BinOp::Ne => ("BinOp.Pure.ne", CallKind::Pure, additional_args), BinOp::Lt => ("BinOp.Pure.lt", CallKind::Pure, additional_args), @@ -60,7 +60,7 @@ fn path_of_bin_op( pub(crate) fn allocate_bindings(bindings: &[String], body: Rc) -> Rc { bindings.iter().rfold(body, |body, binding| { Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(binding.clone()), init: Expr::local_var(binding).alloc(), body, @@ -82,7 +82,7 @@ fn build_inner_match( is_with_ref, pattern, } => Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(name.clone()), init: if *is_with_ref { Expr::local_var(&scrutinee).alloc() @@ -114,7 +114,7 @@ fn build_inner_match( .enumerate() .rfold(body, |body, (index, (field_name, _))| { Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(format!("γ{depth}_{index}")), init: Rc::new(Expr::Call { func: Expr::local_var("M.SubPointer.get_struct_record_field"), @@ -140,9 +140,9 @@ fn build_inner_match( depth + 1, ); - patterns.iter().enumerate().rfold(body, |body, (index, _)| { + let body = patterns.iter().enumerate().rfold(body, |body, (index, _)| { Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(format!("γ{depth}_{index}")), init: Rc::new(Expr::Call { func: Expr::local_var("M.SubPointer.get_struct_tuple_field"), @@ -155,10 +155,30 @@ fn build_inner_match( }), body, }) - }) + }); + + // We add a test to cover the case where there are no parameters to the constructor, + // but we still need to check that we have the right one. + if patterns.is_empty() { + return Rc::new(Expr::Let { + is_user: false, + name: None, + init: Rc::new(Expr::Call { + func: Expr::local_var("M.is_struct_tuple"), + args: vec![ + Expr::local_var(&scrutinee), + Rc::new(Expr::InternalString(path.to_string())), + ], + kind: CallKind::Effectful, + }), + body, + }); + } + + body } Pattern::Deref(pattern) => Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(scrutinee.clone()), init: Expr::local_var(&scrutinee).read(), body: build_inner_match( @@ -227,7 +247,7 @@ fn build_inner_match( patterns.iter().enumerate().rfold(body, |body, (index, _)| { Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(format!("γ{depth}_{index}")), init: Rc::new(Expr::Call { func: Expr::local_var("M.SubPointer.get_tuple_field"), @@ -242,7 +262,7 @@ fn build_inner_match( }) } Pattern::Literal(literal) => Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: None, init: Rc::new(Expr::Call { func: Expr::local_var("M.is_constant_or_break_match"), @@ -292,7 +312,7 @@ fn build_inner_match( .rev() .rfold(body, |body, (index, _)| { Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(format!("γ{depth}_rev{index}")), init: Rc::new(Expr::Call { func: Expr::local_var("M.SubPointer.get_slice_rev_index"), @@ -309,7 +329,7 @@ fn build_inner_match( let body = match slice_pattern { None => body, Some(_) => Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(format!("γ{depth}_rest")), init: Rc::new(Expr::Call { func: Expr::local_var("M.SubPointer.get_slice_rest"), @@ -329,7 +349,7 @@ fn build_inner_match( .enumerate() .rfold(body, |body, (index, _)| { Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some(format!("γ{depth}_{index}")), init: Rc::new(Expr::Call { func: Expr::local_var("M.SubPointer.get_slice_index"), @@ -361,7 +381,7 @@ pub(crate) fn build_match(scrutinee: Rc, arms: Vec) -> Rc .into_iter() .rfold(body, |body, (pattern, guard)| { Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some("γ".to_string()), init: guard, body: build_inner_match(vec![("γ".to_string(), pattern)], body, 0), @@ -664,7 +684,7 @@ pub(crate) fn compile_expr<'a>( let rhs = compile_expr(env, generics, thir, rhs); Rc::new(Expr::Let { - is_monadic: false, + is_user: false, name: Some("β".to_string()), init: lhs, body: Rc::new(Expr::Call { @@ -1164,7 +1184,7 @@ fn compile_stmts<'a>( pattern: None, is_with_ref: false, } => Rc::new(Expr::Let { - is_monadic: false, + is_user: true, name: Some(name.clone()), init: init.copy(), body, @@ -1188,7 +1208,7 @@ fn compile_stmts<'a>( } Rc::new(Expr::Let { - is_monadic: false, + is_user: true, name: None, init, body, diff --git a/lib/src/top_level.rs b/lib/src/top_level.rs index dd9b0f426..04bc68387 100644 --- a/lib/src/top_level.rs +++ b/lib/src/top_level.rs @@ -1328,7 +1328,7 @@ impl FunDefinition { body: if !generic_tys.is_empty() && !with_extra_self_ty { coq::Expression::Let { name: Some("Self".to_string()), - is_monadic: false, + is_user: false, ty: Some(Rc::new(coq::Expression::just_name("Ty.t"))), init: Rc::new( coq::Expression::just_name("Self").apply_many( @@ -1404,7 +1404,7 @@ impl ImplItemKind { body: if !generic_tys.is_empty() { coq::Expression::Let { name: Some("Self".to_string()), - is_monadic: false, + is_user: false, ty: Some(Rc::new(coq::Expression::just_name("Ty.t"))), init: Rc::new( coq::Expression::just_name("Self").apply_many(